Double rtspsrc, single mkv containter; plus multifilesrc and multifilesink
The task: record from two IP cameras via rtsp, and save them into a
continuous stream of files, each lasting 5 minuets, and having each file
containing two video streams; two different angles of the same area.
Then I need another pipeline to 'glue' together any interval of
recordings, still keeping the two streams in one container file.
The two feeds needs to be timed within as few frames as possible of each
other, and there has to be no frame loss between the files, so as to not
have any drop in quality in the finished product. For this reason,
multifilesink/src seemed like the best option, as the splitmuxsink
element has some frame-drop issues.
Which works - sometimes. Sometimes, it stitches the clips together fine,
and it looks like the streams are synchronous, without any frame-loss.
Other times, it simply stalls out, the output looks frozen, and the file
doesn't grow beyond a certain size. The produced file will then have
maybe one or two seconds of video in it - no matter how long I leave it
Now, I can run the second pipeline as many times on the same recordings
as I'd like, and the outcome will be the same. Alternately, on some
recordings - everything goes fine, and the second pipeline runs smoothly
through. Due to this, I think the problem is in the first pipeline, and
in how the recordings are made in the first place..?
I know if I try to shove the rtspsrc recordings directly into a simple
filesink to .mkv file, that time timestamp is wrong, and maybe this has
something to do with my issue?
I've tried doing some experimentation, and if I substitute the rtspsrc
with some two videotestsrc, it's never a problem to stitch the files
together. Like so: