I am producing a video matrix with variable input stream lengths. How to stop writing to file upon compleation of shortest video clip?
This is important because I don't want to see empty videobox elements once the clip has finished playing.
Does gstreamer provide some functionality to stop processing after some timeout period?
GST_DEBUG=2 gst-launch-0.10 -e videomixer2 name=mix ! ffmpegcolorspace ! jpegenc ! avimux ! filesink location=test.avi \
uridecodebin uri="file:///home/me/1.wmv" ! videoscale ! videorate ! "video/x-raw-yuv,width=300,height=200, framerate=25/1" ! videobox border-alpha=0 top=0 left=0 ! mix. \
uridecodebin uri="file:///home/me/2.wmv" ! videoscale ! videorate ! "video/x-raw-yuv,width=300,height=200,framerate=25/1" ! videobox border-alpha=0 top=0 left=-300 ! mix. \
uridecodebin uri="file:///home/me/3.wmv" ! videoscale ! videorate ! "video/x-raw-yuv,width=300,height=200,framerate=25/1" ! videobox border-alpha=0 top=-200 left=0 ! mix. \
uridecodebin uri="file:///home/me/4.wmv" ! videoscale ! videorate ! "video/x-raw-yuv,width=300,height=200,framerate=25/1" ! videobox border-alpha=0 top=-200 left=-300 ! mix. \
If you'd would know the shortest duration, you could use a seek-event with a stop time. EOS is per definition when the whole pipeline is done. You might be able to use pad-probes to catch the EOS on the sink-pads of videomixer and then stop.