rtsp to html5 video tag
ITwrx.org
info at itwrx.org
Fri Jan 20 18:51:19 UTC 2017
On 01/20/2017 03:09 AM, Carlos Rafael Giani wrote:
>
> A big blunder indeed. HTML5 video adds a lot of restrictions. The only
> two options I found to work are:
>
> 1) Demux the RTSP stream, re-mux it into fragmented MP4, send this
> over HTTP (using EOF encoding, that is: no keepalive, no
> content-length, "message" ends when the server closes the socket); may
> also require transcoding to make sure the right audio and video codecs
> are used, and can be tricky with one-to-many streaming
>
this sounds like what i'm trying to do. any chance you could provide an
example gst-launch-1.0 command that does this (maybe minus the
transcoding)? one-to-many would be nice, but one-to-one would work for
my current requirements.
>
> 2) Similar to (1), but transmit using HLS or DASH instead - these may
> be more useful for one-to-many streaming (since chunks can be shared
> between connections), but they are considerably more complex, and can
> cause problems if the stream isn't always there (for example, if an
> HLS stream starts on-demand, when the first client connects, then in
> the beginning, there is no .m3u8 file present yet)
>
> Without HTML5, it becomes considerably easier, yes. Although I prefer
> Matroska over MPEGTS.
>
thanks for all the info either way.
>
>
> On 2017-01-20 09:54, Dimitrios Katsaros wrote:
>> 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
>> <mailto: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
>> <http://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
>> <mailto:gstreamer-devel at lists.freedesktop.org>
>> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>> <https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel>
>>
>>
>>
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
--
Information Technology Works
https://ITwrx.org
@ITwrxorg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170120/cde0a19e/attachment-0001.html>
More information about the gstreamer-devel
mailing list