On Fri, 23 Aug 2013 08:59:59 +0200, FG <[email protected]> wrote:
> Hello. I'm having trouble producing a fluid motion picture with
> libavcodec and libx264, but let's stick to the command line for now,
> because the problems are visible there as well.
> 
> I had a clip, exactly 1-minute-long, encoded with libx264 baseline
> at 24 FPS. Then I have issued the following commands:
> 
>      avconv -i test.mp4 test_%04d.png
>      avconv -i test_%04d.png -an -c:v libx264 -r 24 glued.mp4
>      avconv -i glued.mp4 glued_%04d.png
> 
> The playback of glued.mp4 isn't smooth and it's missing frames:
> There last test image is test_1440.png, as expected, but as for glued
> it's only glued_1382.png. 58 frames are missing throughout the movie.
> 
> What am I doing wrong?

When you decompose the files to a sequence of images in the first step, you lose
the timing information (i.e. the framerate, or frame timestamps in vfr case).

The image2 demuxer that puts the images together then has no way to know what
timestamps each frame originally had, so by default it assumes that the input is
at 25 fps (you can modify this with the -framerate option or a shortcut -r
before -i).

Then, when you write -r 24 as an output option, it means that you want to drop
or duplicate input frames to get 24 fps. In this case, since the input is 25
fps, it results in dropped frames.

-- 
Anton Khirnov
_______________________________________________
libav-tools mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-tools

Reply via email to