linuxgstreamergst-launch

Last clip created by splitmuxsink is not working


I am working on a pipeline to screen record and save them regularly like once in 10 mins. This pipeline is recording and saving properly but when I terminate the program with CTRL-C or the system falls abnormally the last clip created is not working properly. It can not be playyed even on gst-player or ffplay or any other players. All other clips except the last one, is working pretty okay.

My pipe is:

gst-launch-1.0 \
ximagesrc startx=0 \
! 'video/x-raw, framerate=15/1' \
! videoscale \
! videoconvert \
! x264enc speed-preset=superfast tune=zerolatency key-int-max=10 \
! h264parse \
! splitmuxsink location=video%02d.mkv \
async-finalize=true \
muxer-factory=matroskamux \
max-size-time=60000000000 \
muxer-properties="properties, streamable=true"

My purpose is track a system that another ones working on it and it sometimes crashes and falls. So i can watch this records.

I am still searching on gstreamer web site and documents. I tries that async-finalize false and true but nothing changed.


Solution

  • To the ones did same mistake like me the reason was async-finalize=true in my case. The stable form of the pipeline is below:

    gst-launch-1.0 \
    ximagesrc startx=0 \
    ! 'video/x-raw, framerate=10/1' \
    ! videoconvert \
    ! x264enc speed-preset=veryfast tune=zerolatency key-int-max=10 pass=cbr bitrate=1024 \
    ! h264parse \
    ! splitmuxsink location=video%02d.mkv \
    max-size-time=600000000000 \
    muxer-properties="properties, streamable=true" \
    muxer=matroskamux \
    max-files=10