New segment and mp4mux

Grégoire Gentil gregoire at gentil.com
Wed Oct 10 02:33:41 UTC 2018



On 10/09/2018 10:26 AM, Grégoire Gentil wrote:
> 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


I have tried adding config-interval=1 but the mp4 video is still broken.

Also, the mpegpsmux video is kind of flaky every second with a "shake".

I'm confused what I need to do. Are the timestamps in the mp4 video even 
h264parse or is mp4mux taking the timestamp provided in BUFFER_DTS after 
h264parse? Could I / should I add a probe callback after h264parse and 
edit the timestamp(s) of GstBuffer? I have tried that but it didn't seem 
to work.

Grégoire


More information about the gstreamer-devel mailing list