New segment and mp4mux

Grégoire Gentil gregoire at gentil.com
Tue Oct 9 17:26:26 UTC 2018


I'm using this test case

https://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/icles/test-segment-seeks.c

and I have simply replaced the pipeline by:

filesrc location=%s ! qtdemux name=demux ! queue ! h264parse ! queue ! 
mpegpsmux name=mux ! filesink location=/tmp/a.mp4

This works OK. Here is the full file:

https://pastebin.com/Ue2HRReX



But if I replace mpegpsmux by mp4mux (everything else unchanged), the 
resulting video is broken. This unfortunately makes sense because the 
timestamps of the video are not correct anymore and mp4mux care about this.

What kind of event am I supposed to send downstream to make happy 
mp4mux? I have tried many things including sending new segment events, 
changing the buffer_dts timestamp in a pad sink callback. Nothing works.

I have read the code of splitmuxsink which faces a similar situation but 
it's also slightly different because the plugin resets when each new 
file is created,

Grégoire


More information about the gstreamer-devel mailing list