Lipsync problem using mp4mux with v4l2src
frederic.sureau at veo-labs.com
Thu Jun 11 02:21:00 PDT 2015
I am facing lipsync problems while muxing live sources into an mp4 file.
Here is the pipeline:
gst-launch-1.0 -ev mp4mux name=mux ! filesink location=test.mp4
v4l2src device=/dev/v4l/by-path/ipu1-capture io-mode=dmabuf !
h264parse ! queue ! mux.
alsasrc device=hw:sndcard0,0 ! "audio/x-raw, rate=48000" ! faac !
aacparse ! queue ! mux.
The v4l2src element takes some time to initialize, so the first buffer
arrives after 300ms or 400ms.
Timestamps start accordingly around 0:00:00.300
Timestamps are conserved after the encoder element (checked using identity)
Sound start immediately at 0
Audio/video sync is OK when using matroskamux, flvmux or tsmux but
desynchronized when using mp4mux. This is weird because *video* is late,
as if the real lateness was compensated 2 times.
Then I fixed the problem by removing calls to update_edit_list function
in the qtmux element:
I have the feeling that this is not a good thing to do, but can't say
why as I am not familiar at all with mp4 container.
Any suggestion on that?
More information about the gstreamer-devel