15

I'm looking for a way to broadcast a live video taken from a webcam or camera rooted to a PC. The broadcast should be displayed in a HTML5 page using the tag (which support rtp, and rtsp I think).

The user viewing the stream should not have to install any plug-in or video player such as QuickTime.

I need the video to be in mp4 format such as: rtsp://www.mywebsite/streaming/video.mp4

This would be the link I'd put as the src of the html 5 video tag.

So I'd like to know if it's possible, what are my options to do such things.

user702470
  • 151
  • 1
  • 1
  • 3

3 Answers3

3

It's possible. But you will have major problems if you're looking for cross browser support. What you can do is offer HTML5 video to the browsers supporting it and then offer QuickTime for browsers not supporting it.

<video src="stream.mp4">

    <!-- Don't support <video> -->
    <object>
        <param name="src" value="video.mp4" />
        
    <param name="autoplay" value="true" />
        
    <param name="type" value="video/quicktime" height="256" width="320" />
        
    
    <embed src="video.mp4" height="256" width="320" autoplay="true" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/" />
    </object>

</video>

Also see: Streaming via RTSP or RTP in HTML5

Community
  • 1
  • 1
Karl Laurentius Roos
  • 4,110
  • 1
  • 31
  • 38
  • The cross browser issue won't be a problem since I only have to support IE9. I already read the link you sent me, but i do not find it very usefull on how to send my stream to a server. Do you know a step-by-step guide that show how to record the stream, send it to a server, then how to obtain the rtp path to the live stream (which would be my src in the video tag) – user702470 Apr 11 '11 at 15:53
  • Then you shouldn't have any problems with a regular H.264 stream. – Karl Laurentius Roos Apr 11 '11 at 15:58
  • Yes, I already did find most of the infos about file format supported and stuff like that. But I do need help on the server side: How to stream from my webcam to a server, How to retrieve the path to display it in the html 5 video tag. All i could find so far on streaming servers are some companies providing streaming on flash server streaming (which is not what i need) It has to be live stream in the video tag without using flash or quicktime plug-ins – user702470 Apr 11 '11 at 16:02
1

I don't think it is possible now to "cheat" the HTML5 browser to encapsulate the live video stream to a ".mp4" file. I believe HTML5 will consider live video support in a near future. What you can do is just wait. :)

ciphor
  • 7,322
  • 7
  • 46
  • 69
0

For maximum compatibility, here’s what our video workflow will look like, Make one version that uses H.264 baseline video and AAC “low complexity” audio in an MP4 container & Make another version that uses WebM (VP8 + Vorbis) or Theora video and Vorbis audio in an Ogg container. I think this combination solves your problem & it plays on most of browsers. You should required at least two versions of Video to play in all the browsers.

pg200890
  • 11
  • 2