splitfilemux - robust to unexpected shutdowns

jcbrock jcbrockschmidt at gmail.com
Mon Oct 5 11:36:08 UTC 2020


I am trying to figure out how to make videos created by splitfilesink robust
to unexpected shutdowns. For a mp4mux+filesink, I usually just create an
atom file and recover it later if something goes wrong. However for
splitfilemux I don't appear to have this option from what I can tell.

Suggestions I've come across recommend using the reserved-max-duration,
reserved-moov-update-period, max-size-time, and use-robust-muxing
properties. I've tried this with several configurations to no avail. Here's
the pipeline I've come up with so far (the tees are included since this is a
trimmed down version of a larger pipeline I'm working on):

gst-launch-1.0 v4l2src device=/dev/video0 ! videoscale !
'video/x-raw,width=1280,height=720,framerate=30/1' ! videoconvert ! tee !
queue ! x264enc speed-preset=ultrafast tune=zerolatency ! tee ! queue !
h264parse ! splitmuxsink location="videos/video%02d.mov"
reserved-max-duration=3000000000000000000
reserved-moov-update-period=1000000000 max-size-time=900000000000
use-robust-muxing=1

If I change the pipeline so the EOS propagates on shutdown (i.e. adding the
-e option) the video file is playable. However if I ctrl-C or kill the
process otherwise, the resulting video file is unplayable. Furthermore, I
don't know of any way to recover files after the fact.

My questions are as follows:
 1) Is it possible to configure splitfilemux so the files it creates are
readable after unexpected shutdowns?
 2) Is it possible to recover corrupted files created by splitfilemux?

Thanks,
Jaclyn



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


More information about the gstreamer-devel mailing list