[Libav-user] Syncing multiple sources.
hivanov.ffmailing at gmail.com
Thu Jan 31 13:41:14 EET 2019
> How can I reproduce this (major?) issue with ffmpeg (the application)?
.\ffmpeg.exe -y -loop 1 -r 30 -t 5 -i .\frame.png -filter_complex
-map [out] -c:v h264 -vsync 0 -f mp4 out.mp4
Here is the previous filter broken down:
'-loop 1 -r 30 -t 5 -i .\frame.png' and '[tb]split[s0][s1]' just an easy
way to get two sources.
'settb=expr=1/60[tb]' as I explained in my follow up email the
timebases in use are also relevant.
'[s1]setpts=PTS+1[offset]' as also explained in my follow up email the
ptss must be interleaved.
'-vsync 0' we must cancel the vsync, having the vsync active is the
equivalent to the solution I proposed in my first email.
I know that having the ptss of the two sources interleaved is uncommon, in
fact in my program it happens because once decoded the frames I have some
logic that modifies the ptss.
Here is a less shady case, sources with different framerate, where this
problems can also be seen:
.\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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user