Gstreamer 1.8.2 installed on an embedded device using a C920. Debian linux. I have a nice Gstreamer pipeline that uses the new splitmuxsink and almost works. I do have splitmuxsink working on a 'basic pipeline' nicely.
The first pipeline works and writes one long file mp4, audio and video and at the same time passes a preview jpeg stream to a separately handled appsink which works. Hope this is useful in any case for someone.
self.pipeline=Gst.parse_launch('uvch264src auto-start=true iframe-period=1000 name=src1 src1.vfsrc ! queue ! appsink drop=true name=asink max-buffers=2 emit-signals=true sync=false src1.vidsrc ! video/x-h264,width=1280,height=720,framerate=30/1,stream-format=byte-stream ! queue ! h264parse ! muxout.video_0 alsasrc do-timestamp=true device="plughw:CARD=C920,DEV=0" ! audio/x-raw,format=S16LE,rate=32000,depth=16,channels=1 ! queue ! voaacenc ! queue ! aacparse ! muxout.audio_0 mp4mux name=muxout ! filesink sync=false location=%s' % location1)
But when I convert the filesink to a 'splitmuxsink', it only creates previews, and does not start the file recording side of the stream. I do not know how (programmatically in Python) to set the attributes of splitmuxsink to replicate the sync=false that I am doing on the filesink plugin. Do I attach to a pad on splitmuxsink, or somehow setup the sink=xxx label and get_static_pad or element to then adjust the properties of that 'child' element? I believe this problem is what is causing the file splitting part of the pipeline to fail. I am looking for something like: How to resume playing after paused using gstreamer? based on this answer: gstreamer pipeline with VADER element stalls on PAUSE when used with a tee
Pipeline v2 (runs the appsink side, but splitmuxsink stays paused)
self.pipeline=Gst.parse_launch('uvch264src auto-start=true async-handling=false message-forward=true iframe-period=1000 name=src1 src1.vfsrc ! queue ! appsink drop=true name=asink max-buffers=200 emit-signals=true sync=true src1.vidsrc ! video/x-h264,width=1280,height=720,framerate=30/1,stream-format=byte-stream ! queue ! h264parse ! queue ! splitmuxsink max-size-time=20000000000 max-size-bytes=5000000 name=muxout location=video2%05d.mp4 alsasrc do-timestamp=true device="plughw:CARD=C920,DEV=0" ! audio/x-raw,forma=S16LE,rate=32000,depth=16,channels=1 ! queue ! voaacenc ! queue ! aacparse ! muxout.audio_0
As you can see, pipeline v2 has no explicit reference to sync=false as splitmuxsink does not have that property. And so that side does not start after PAUSED.
I am sure this is just going to be a tiny adjustment to create the right label and set its attributes after my
self.muxp = self.pipeline.get_by_name('muxout')
to set the child element to async false, but I just can't see it - the muxout element (my label for splitmuxsink) does not have an async property.