Splitting qtmux with multiple video streams into a series of files

AndyH ajhogan at outlook.com
Fri Jun 1 11:14:30 UTC 2018


I'm looking to record 2x video and 1x audio stream into a single file using
qtmux. I can successfully generate a file containing 2x video and 1x audio
stream with the following command:

[Note: The example runs on an iMX6, but I don't think my problem is
platform-specific]
gst-launch-1.0 -v 
videotestsrc name="video_hd" pattern=ball num-buffers=250 ! video/x-raw,
format="RGB", framerate=25/1, width=1280, height=960 ! imxvideoconvert_ipu !
vpuenc_h264 ! h264parse ! queue ! muxer.video_0 
videotestsrc name="video_sd" pattern=ball num-buffers=250 ! video/x-raw,
format="RGB", framerate=25/1, width=640, height=480 ! imxvideoconvert_ipu !
vpuenc_h264 ! h264parse ! queue ! muxer.video_1 
audiotestsrc name="audio_common" num-buffers=425 ! imxmp3enc ! muxer.audio_0 
qtmux name="muxer" ! filesink location=video.mov

This only works as I've used the num-buffers parameters on each stream to
get the muxer to finish the file after a period of time.

I want to record continuous feeds (2x video + 1x audio) and split it up into
a series of small files (e.g. a new file every 10 seconds). I would normally
use a splitmuxsink to do this, 
using the max-size-time parameter. For example, I can create a series of
files containing a single video and audio stream with:

gst-launch-1.0 -v 
videotestsrc name="video" pattern=ball ! video/x-raw, format="RGB",
framerate=25/1, width=640, height=480 ! imxvideoconvert_ipu ! vpuenc_h264 !
h264parse ! queue ! splitmux.video 
audiotestsrc name="audio" ! imxmp3enc ! splitmux.audio_0 
splitmuxsink name="splitmux" max-files=10 max-size-time=10000000000
muxer=qtmux location=video%02d.mov

My problem is that the splitmuxsink only appears to support a single video
stream, so i can't mux both videos. Is there a way to split 2x video and 1x
audio tracks into a sequence of files?

Thanks.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list