[FFmpeg-user] Bad A/V Sync Using ffmpeg on V4L2 Input Device
olivier at trillion01.com
Sat Mar 29 04:24:49 CET 2014
On Tue, 2014-03-25 at 01:32 -0700, Leo L. Schwab wrote:
> LANGLOIS Olivier PIS wrote:
> > Notice the start times of each input. For alsa, it uses abs time and by
> > default, webcam uses monotonic time. Something that I was about to try and
> > perhaps you try it out to see if it helps is to use ts abs for the v4l2
> > input.
> As illustrated in my response to Lou's message, adding '-ts abs' to
> the command line doesn't help; I still see the sync issue.
> > However, it might not be enough. Check if your webcam is using the
> > uvcvideo driver. [ ... ]
> Nope. This one uses the em28xx driver.
how about -ts mono2abs ?
BTW, I tried out the uvcvideo clock=realtime param and it didn't work
before applying a patch that I have submitted.
uvcvideo maintainer did bring a very good point. Why ffmpeg does not use
monotonic clock for ALSA audio packets instead of doing the opposite
conversion with v4l2 ts?
If curious, you can see the discussion at:
Besides portability concerns, in general should not monotonic ts be a
superior choice for a multimedia application?
What would happen to ffmpeg if the time goes backward after a NTP
More information about the ffmpeg-user