Showing in browser an H264 TCP stream
Tim Müller
tim at centricular.com
Sun Mar 30 12:25:19 PDT 2014
On Thu, 2014-03-27 at 05:20 -0700, Kenairod wrote:
Hi,
> I'm trying to display the stream sent by this pipeline on a web browser :
> raspivid -t 999999 -h 240 -w 320 -fps 25 -b 2000000 -o - | \
> gst-launch-0.10 -v\
> fdsrc !\
> h264parse !\
> rtph264pay config-interval=1 pt=96 !\
> gdppay !\
> tcpserversink host=$ip port=5000
>
>
> I know H264 can't be read by every browser, but I'm trying it with chromium
> which supports it.
>
> I've been trying this technique :
> http://www.svesoftware.com/passkeeper/cms/article/streaming-media-using-gstreamer-web/
> <http://www.svesoftware.com/passkeeper/cms/article/streaming-media-using-gstreamer-web/>
>
> But the HTML5 video player stays black. I don't know why, because the
> pipeline works well otherwise.
Couple of comments:
- don't use raspivid + | + filesrc, use rpicamsrc instead, from:
https://github.com/thaytan/gst-rpicamsrc/
(what you're doing should still work though)
- drop the gdppay, the 'gdp' payloading is gstreamer-specific
to maintain packetisation and metadata across a data channel,
browsers won't understand it.
- drop the rtph264pay, that's needed only if you want to
stream H264 over UDP. Browsers won't expect RTP over a TCP
link (and the tcp stream won't maintain the packetisation
that udp requires).
This might work:
fdsrc ! h264parse ! tcpserversink
Or put the H.264 video in a container, like:
fdsrc ! h264parse ! mpegtsmux ! tcpserversink
Cheers
-Tim
--
Tim Müller, Centricular Ltd - http://www.centricular.com
More information about the gstreamer-devel
mailing list