Segmenting mp4 output files with audio and video

dean deanan at
Wed Oct 3 00:54:02 PDT 2012

I'm trying to write out a long stream of video into many mp4 files and am
what's the best way to start/stop the segments so each file is a proper mp4
file with
the headers. 

The pipeline is roughly rtspsrc -> rtph264depay -> capsfilt -> mp4mux ->
with audio going through rtspsrc -> rtpmp4gdepay -> aacparse -> mp4mux ->

I have the files segmenting on I frames but getting the audio to 
match cleanly hasn't been successful yet. It's close but
there is a slight pop in the audio when you put them together into 
an editor like premiere. Also at the start of recording, I haven't
been able to get the start of audio to be trimmed and  in sync with start of 
the first I frame. 

Any recommendations on the best approaches to do something like this?

(I've tried multifile sync but I haven't been able to get properly formatted
mp4 files out and there's still a audio pop between files. Mpeg ts would
also but IOS doesn't seem to like the ts files produced either)


View this message in context:
Sent from the GStreamer-devel mailing list archive at

More information about the gstreamer-devel mailing list