How to see a livestream file with webrtc into html5 page - javascript

I need to embed a live video with url rtsp. I'm using webrtc, but I'm able to get just local camera live video. I'm streaming with vlc server several files, and I need to receive this video with rtsp live protocol due to network latency. How can I put it into html5 page using webrtc api?

I think webRTC is not the technology you are looking for.
What you need is just to use a HTML5 video element to receive the streaming. Take a look at https://github.com/Streamedian/html5_rtsp_player/wiki/HTML5-RTSP-Player

Related

Show a RTSP stream in html

I want to show a stream of an IP camera in html website.IP camera send data with RTSP protocol. I used some codes like html5 RTSP && Google WebRTC. But I feeled these codes can't receive and show RTSP streams and not worked for me. I tested some methods that uses VLC but I wan't to show stream without using VLC and I want to implement this program as client side program.
There is no simple and good way to play RTSP directly in browser. It is possible to do it on old Android devices, on some STB or with VLC plugin which is not a good way to go.
You will have to install media server that will convert your RTSP to something for browser.
It is possible to take ffmpeg that will convert your rtsp to hls and have a live video translation from camera, but if you want more feature like stream management or recording you can look at commercial options like Flussonic (I'm working on it) or Wowza.
You can also google something like "streaming server" and look for RTSP and HLS/RTMP protocols in specification.
There has media source extensions(MSE) can support live h264 with very low latency(Chrome Firefox Safari below 1s). but there need a gateway to convert RTSP to fragmented MP4.

Embed video in HTML page

I have an IP CAM which provides access to the audio/video using RTSP protocol. I can see the video using VLC player but I would like to be able to embed this video in a HTML5 page.
I know most browsers cant handle RTSP with HTML5. So I was wondering: is there any PHP code that I can use to parse RTSP video and output a compatible Chrome video format that I can play using <video> tag? Is there someway PHP output some stream of data so I can send it to the browser parse it into HTML5 video container?
You could use ffmpeg to trascode from RTSP and HLS and then display that in a browser which supports it:
Something like this will give you a starting point, though you may need to tune it. If you're going off your own local network though you may need to use a 3rd party streaming solution like Azure Media Services or Wowza
ffmpeg -i rtsp:<stream> -fflags flush_packets -max_delay 1 -an -flags -global_header -hls_time 1 -hls_list_size 3 -hls_wrap 3 -vcodec copy -y <file>.m3u8

How to stream video over rtsp protocol for Live555 server on web browser

I am already using rtsp protocol to stream video on windows application and Silver-light web application. I have built rtsp server using Live555 library, which connects with video source and multicast with different users(clients).
But now I want to stream video source in web browser to replace silver-light component. So please some one can help me to do this on web browser.
Is there any standard way/solution to do rtsp video streaming on web browser? Please help me for video streaming over tcp socket on web browser. Currently, I am using rtsp over tcp protocol for video streaming.
You can do this in 3 ways:
Write a plug in for live555 server which converts RTSP stream into RTMP. Then stream RTMP to web browser. From web browser using Flash player open RTMP stream.
Use third party server (e.g. wowza) which take RTSP stream from live555 as a input and stream out as RTMP. From web browser using Flash player open RTMP stream.
Recently live555 developer has added webrtc streaming in library. You can use this feature for web browser streaming. live555-webrtc-demo. This feature stream direct to web browser. But you need webrtc compatible web browser (e.g. firefox, chrome, opera).
I personally used second option as a web browser streaming solution.
I hope this will help you.

how to make RTSP request in html5 or in javascript?

How to make request "rtsp://localhost:554/sample_100kbit.mp4"? (in HTML5 or Javascript)
I want to access video streaming data which source is present on Darwin server
I don't believe it's possible without an additional browser plugin.
The <video> tag in HTML5 requires the content to be served over HTTP.
Flash supports streaming using their own protocol (RTMP) and there are products available that will proxy between RTSP and RTMP. However that would require you to run your own server and provision the bandwidth between user -> proxy -> content.
HTML5 don't support rtsp URL, and maybe MSE or WebRTC can help
refer RTSP solution for JavaScript/HTML5

Streaming Audio on my website

I am interested in streaming audio on my website, but I have no clue where to begin. There are two types of streaming I hope to achieve. The first would be streaming a playlist of songs stored on the server and the second would be live audio streaming. Can anybody recomend any good sites or plugins to use?
SoundManager2 could cover the client side stuff (cross-platform, uses flash) and any web server can be used to serve audio files that could be used in a playlist. Live streaming is a bit more complicated but could be accomplished using IceCast or mpd.
What you're looking for is a streaming audio server.
A Google search should help you locate a server or software that best fits your needs.

Categories