Issues with writing multi-stream MP4 file

Florian Echtler via gstreamer-devel <[email protected]>
Newsgroups gmane.comp.video.gstreamer.devel
Message-ID <[email protected]>
Hello everyone,

my Gstreamer application is writing two H.264 video streams and one Opus audio 
stream to a MP4 file. The relevant parts of the pipeline looks as follows:

------------------------------------------------------------------------------

queue max-size-time=100000000 leaky=downstream ! x264enc bitrate=1500 
speed-preset=ultrafast tune=zerolatency key-int-max=15 ! 
video/x-h264,profile=constrained-baseline,stream-format=avc ! queue ! mux.
(this part is present twice)

queue max-size-time=100000000 leaky=downstream ! opusenc bitrate-type=vbr 
inband-fec=true ! queue ! opusparse ! mux.

mp4mux name=mux fragment-duration=1000 latency=100000000 ! filesink sync=true 
location=out.mp4

------------------------------------------------------------------------------

The result is an MP4 file which I can play just fine in Totem on Ubuntu, and 
even switch between video streams using "Switch angles".

However, none of the following work:

- play it in VLC (plays a few seconds, then freezes)
- do anything with FFMPEG, e.g. split the streams (results are garbage)
- seek in the video (even in Totem)

In all cases, I get some messages about "Invalid NAL unit size" and/or 
"non-monotonous DTS". So what would I need to do to my output pipeline to get a 
"compliant" MP4 file?

Thanks and best, Florian
-- 
SENT FROM MY DEC VT50 TERMINAL
OpenPGP_signature (application/pgp-signature, 203 B) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.