rtsp to html5 video tag

Dimitrios Katsaros patcherwork at gmail.com
Fri Jan 20 08:54:34 UTC 2017


The video tag in html is a bit problematic. The idea behind it was to be
able to play any video in a browser but it requires that the browser
implement the logic for handing the media types, which is a big blunder.
Here is a table with a few media types:

https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats

>From what I see you are trying to reencode h264. Is there any reason why
h264parse is not enough? h264 is a video compression standard but it does
not provide any information on duration, metadata about the stream etc. You
need to put the video in a container format that will handle all that for
you. If you intend on streaming to a media player you can use tsmux to get
an mpegts stream. However, you will need a compatible player on the client
side like the vlc embedded player. That has it's own problem in that you
need to assume that the client has vlc or any other player installed. One
other alternative is to go for hls or mpeg dash. That will require that you
create a fragmented stream, create the media descriptor file for the
fragmented stream and then provide it via a http server. The nice thing
about this approach is that there are javascript based players you can
embed in your webpage. But it requires a lot of work to implement all the
requirements.

I am sure people can suggest more alternatives, but these are the ones I
have played around with. If you want something simple I would try the
mpegts stream to vlc. you will have a client to start with and can then
work towarsd embedding it into your site.

Dimitrios


On Wed, Jan 18, 2017 at 9:07 PM, ITwrx.org <info at itwrx.org> wrote:

> hi,
>
> i'm trying to use gstreamer to get an rtsp stream from an ip cam into my
> browser(html video tag). I'm currently trying to use
>
> "gst-launch-1.0 rtspsrc location=rtsp://user:password@192.168.1.5:554 !
> rtph264depay ! h264parse ! decodebin ! x264enc ! tcpserversink
> host=127.0.0.1 port=8080"
>
> which seems to be sending something, but firefox won't display the video
> and reports that it has mime type "text/plain".
>
> Could anyone recommend the proper command for accomplishing this?
>
> thanks
>
> --
> Information Technology Works
> https://ITwrx.org
> @ITwrxorg
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170120/91b850f4/attachment.html>


More information about the gstreamer-devel mailing list