playbin2 undecoded video and about-to-finish signal

Krutskikh Ivan stein.hak at gmail.com
Sun Mar 27 19:28:19 UTC 2016


Hi,

I'm developing a video recording/broadcasting server with gstreamer and
python.

Right now I'm facing 2 tasks:

- recording video from different sources (rtsp and http) and with different
codecs (mjpeg,mpeg4,h264,h265) in a series of mkv files

- broadcasting video from my archive to different clients using http and
rtsp.

Before discovering the playbin magic I used a number of template pipelines
to capture video from source, pass it to multifilesink and ffmpeg to finish
and store them in a convinient way, But if I could somehow feed my uri to
playbin and get an undecoded video/audio stream from it, I would be able to
put all my templates to single gstreamer pipeline: playbin uri=rtsp...
(magic here) ! mpegtsmux ! multifilesink...  And that would be very
convenient.

The second task is more ambitious. I want to feed the recorded video to my
clients as if it was a live source. Right now I have a file tree:

/basedir/cam_name/yearmonthday/hour/minutesecond-duration.mp4

Example:

archive-test:/archive/video/multi/160327/21 # ls
0120-00125.mp4  0730-00120.mp4  1335-00120.mp4  1940-00125.mp4
2545-00120.mp4  3150-00120.mp4  3755-00120.mp4  4400-00125.mp4
5005-00125.mp4  5610-00125.mp4
0325-00120.mp4  0930-00120.mp4  1535-00125.mp4  2145-00120.mp4
2745-00125.mp4  3350-00125.mp4  3955-00125.mp4  4605-00120.mp4
5210-00120.mp4  5815-00120.mp4
0525-00125.mp4  1130-00125.mp4  1740-00120.mp4  2345-00120.mp4
2950-00120.mp4  3555-00120.mp4  4200-00120.mp4  4805-00120.mp4
5410-00120.mp4

At some point in the future I recieve a request to play video from cam
multi from  21:05 160327. I can then find my started file, construct a
pipeline with playbin and multisocketsink, fast forward to the desired time
and replace the uri of the file upon each about-to-finish signal. The
complex part is that I also need an undecoded video stream since I plan to
broadcast it to remote client without re-encoding.

So my questions are:

1) Is this design possible?
2) Where can I find some examples of such pipelines, preferably in python.

Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160327/aba39536/attachment.html>


More information about the gstreamer-devel mailing list