Enabling server streaming of media from specific points in time

Tim Müller tim at centricular.com
Sat Nov 16 01:27:45 PST 2013


Hi,

usually you would just handle this entirely client-side, that is: simply preroll the pipeline (after setting show-preroll-frame on the videosink to false), then do a flushin seek in time format to 20mins and set pipeline to playing state (setting show-preroll-frame=true again).

This assumes the stream is seekable, but most are. This only requires range support server-side.

All depends a bit on the context of course. I'm assuming you are playing a file present on the server as-is.

Cheers
 -Tim

----- Original message -----
> In my gstreamer based app, I am storing the latest time for a playing
> media before the player is stopped. The idea is to auto start playback
> at the same point at which the user last closed the player instead of
> manually dragging the time slider to the last watch timestamp. In the
> current state, the media is being served by a http web server and the
> playbin2's uri property is set to the video file path (Just like the
> gstreamer tutorial examples).
> 
> Without downloading the entire media every time the media is played, how
> do I start streaming a media only from a specific point in time.
> For example, if the media was watched for 20 minutes the first time and
> then the app was closed - a next viewing of the same media should start
> from the same point in time (20th minute).
> 
> Once the player is closed, I am sending a http post message with the
> media file name that was played, played duration and subtitle language
> that was selected (if any). I guess some server side computing might
> have to be done for the webserver so that it serves the media from the
> desired point in time.
> 
> I am not sure on the right way to go about implementing this
> functionality.
> 
> Thanks in advance
> Dece



More information about the gstreamer-devel mailing list