[Libav-user] Syncing multiple sources.
hivanov.ffmailing at gmail.com
Thu Jan 31 16:58:18 EET 2019
> In this example, it looks as if the input already has 60fps.
The inputs is 30fps, set by the '-r' flag. Maybe the settb filter is
throwing you off, but it only changes the timebase to 1/60, the framerate
is kept to 30/1.
> Your original email gave the impression that vstack somehow changed the
framerate of your video from 30 to 60fps.
Yeah that is exactly what i meant.
> Please note that "-vsync 0 -f mp4" is not valid as FFmpeg's mp4 muxer
only support cfr.
Yeah, the generated file by this command is not playable by the default
windows player, but vlc plays the file fine.
If the first ffmpeg command confuses you take a look at the second one:
> .\ffmpeg.exe -y -loop 1 -r 30 -t 5 -i .\frame.png -loop 1 -r 25 -t 5 -i
.\frame.png -filter_complex "vstack[out]" -map [out] -c:v h264 -vsync
0 -f mp4 out.mp4
Here two inputs, 30fps and 25fps, are combined with vstack to produce a
50fps output. This command also print multiple warning messages about
'Non-monotonous PTS/DTS', those are caused by the timebases in use, here is
a command which resolves them(note we are only playing with timebases, no
framerate changes are made):
.\ffmpeg.exe -y -loop 1 -r 30 -t 5 -i .\frame.png -loop 1 -r 25 -t 5 -i
-map [out] -enc_time_base 1/150 -c:v h264 -vsync 0 -f mp4 out.mp4
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user