HTTP plugin in pull mode with Apache web server

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

HTTP plugin in pull mode with Apache web server

Suresh Kumar SHUKLA
Hi,
 
I am using Apache web server (2.4) for playback of media files. From server point of view, it’s as simple as progressive file data fetch. Playbin2 by default, uses souphttpsrc plugin, which works in push-mode and is showing up problems in trick-modes.
 
Is there an alternative for use with Apache web server in pull-mode?
 
Regards,
Suresh
 

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: HTTP plugin in pull mode with Apache web server

Edward Hervey
Hi,

  You can't efficiently do trick-modes (assuming you are doing high-rate
seeks or reverse seeks, and therefore wanting to seek in the source
(http) at a high rate or in reverse order) with standard HTTP.

  the http source is push-based because it can not do fast random access
(it takes the time to send a range-based request to the server, for the
server to aknowledge it, and finally for the source to start receiving
data from that offset).

  If you want to handle trick modes with http you either:
  * Are lucky that the server sends data fast enough and use queue2 to
buffer locally (the source pushes the data into queue2 and the demuxer
pulls data already downloaded). This will not work for reverse modes
though since you can't tell an HTTP server to send you data in reverse
GOP order (which it has no clue about).
  * You have an out-of-band system to notify the remote server it should
send you a stream with trick mode applied to it (also known as
server-side trick mode) and you start playing it back at a normal pace
(note: this is what UPnP/DLNA does).

  Summary : no, you can't efficiently do trick modes via HTTP without
some outside help.

    Edward

On Tue, 2013-04-30 at 11:49 +0800, Suresh Kumar SHUKLA wrote:

> Hi,
>  
> I am using Apache web server (2.4) for playback of media files. From
> server point of view, it’s as simple as progressive file data fetch.
> Playbin2 by default, uses souphttpsrc plugin, which works in push-mode
> and is showing up problems in trick-modes.
>  
> Is there an alternative for use with Apache web server in pull-mode?
>  
> Regards,
> Suresh
>  
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

RE: HTTP plugin in pull mode with Apache web server

Suresh Kumar SHUKLA
Hi Edward,

>   the http source is push-based because it can not do fast random access (it
> takes the time to send a range-based request to the server, for the server to
> aknowledge it, and finally for the source to start receiving data from that
> offset).
>

My test setup is on local LAN. I face partial/broken support in various demuxer plugins. This got me to reconsider of alternative design. I don't have Live streaming cases.
Can't this round-trip with latency still be worked out in pull-mode?

>   If you want to handle trick modes with http you either:
>   * Are lucky that the server sends data fast enough and use queue2 to buffer
> locally (the source pushes the data into queue2 and the demuxer pulls data
> already downloaded). This will not work for reverse modes though since you
> can't tell an HTTP server to send you data in reverse GOP order (which it has
> no clue about).
>

Can you share what kind of support is available in souphttpsrc plugin etc. for Media Server's (e.g. Adobe Media server)?

Thanks and regards,
Suresh
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: HTTP plugin in pull mode with Apache web server

Tim-Philipp Müller-2
In reply to this post by Suresh Kumar SHUKLA
On Tue, 2013-04-30 at 11:49 +0800, Suresh Kumar SHUKLA wrote:

Hi,
 
> I am using Apache web server (2.4) for playback of media files. From
> server point of view, it’s as simple as progressive file data fetch.
> Playbin2 by default, uses souphttpsrc plugin, which works in push-mode
> and is showing up problems in trick-modes.
>  
> Is there an alternative for use with Apache web server in pull-mode?

On playbin2 set the "ring-buffer-max-size" property to 5*1024*1024 or so
for http URIs. That should enable a queue2-based ringbuffer in RAM for
many media formats (there's a whitelist somewhere, but it should work
for e.g. quicktime/mp4). That allows demuxers to operate in pull mode.
It will make fast-forward/reverse + seeking work much better on a local
network.

If you're still using 0.10, make sure to use queue2 from git (0.10
branch) and souphttpsrc from git (0.10 branch) - there were a few bugs
that led to data corruption in this mode of operation, but it should
work well with 0.10 git (and any 1.x version of course).

If you have a local file system with lots of free space, you could also
enable download-buffering instead (then a temp file will be created
where content will be downloaded/cached to).

 Cheers
  -Tim


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

RE: HTTP plugin in pull mode with Apache web server

Suresh Kumar SHUKLA
> If you have a local file system with lots of free space, you could also enable
> download-buffering instead (then a temp file will be created where content
> will be downloaded/cached to).
>

How do I set this property/behavior?

Regards,
Suresh
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: HTTP plugin in pull mode with Apache web server

Tim-Philipp Müller-2
On Tue, 2013-04-30 at 18:08 +0800, Suresh Kumar SHUKLA wrote:

> > If you have a local file system with lots of free space, you could also enable
> > download-buffering instead (then a temp file will be created where content
> > will be downloaded/cached to).
> >
>
> How do I set this property/behavior?

via the "flags" property on playbin2 (see gst-inspect-0.10 playbin2).
You can hard-code the value listed there, it's not exposed in any header
file.

Cheers
 -Tim

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel