Best way to save streaming video so that I can seek through it locally?

Kevin Boos kevinaboos at gmail.com
Thu Nov 13 16:54:56 PST 2014


Hi Gstreamer folks,

I am having a tough time getting things to work, and I could really use some help. Basically I just want to record an incoming video stream on the client so that I can seek a few seconds backwards (rewind) without having to ask the server for a different portion of the video stream.

Here’s my setup: 

Server PC sends a h264 TS video stream to the client over TCP.
Client receives stream over TCP and needs to display it and potentially seek to a different portion of the stream.

Unfortunately, I wasn’t able to figure out a way to achieve this with a single pipeline on the client, because tcpclientsrc does not produce a seekable stream. I can display the stream but cannot seek to a different part of it. 
I’ve tried a variety of formats, but right now I’m using MPEG-TS because it apparently behaves the best in streaming applications (?). 

Next I tried this:  to enable seeking on the client, what I ended up doing is saving the incoming stream to a local file on the client (using filesink) and then creating a second, separate pipeline to play it back from the client’s local storage. 

The pipelines look like this: 

Server:  uridecodebin uri=file:///path/to/server/video.mp4 ! x264enc <options> ! mpegtsmux ! tcpserversink host=<client_IP> port=1234 
Client receive pipeline:  tcpclientsrc host=<client_IP> port=1234 ! queue ! filesink location=/path/to/client/tmp_video.ts
Client display pipeline:  uridecodebin uri=file:///path/to/client/tmp_video.ts ! videoconvert ! autovideosink 


I figured that since the Client display pipeline is just playing back local video, it should be able to seek. But I can’t even get the video to play at all, let alone at a different position than the front of the stream. 

Is this even possible? Or is there a much better way to simultaneously receive an incoming streaming video and display a different part of it? My way seems inefficient and naive. 


Thanks very much in advance,
Kevin Boos
Rice University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20141113/56cc47bb/attachment.html>


More information about the gstreamer-devel mailing list