How to embed live vlc video stream into html

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
tinyang
Blank Cone
Blank Cone
Posts: 19
Joined: 17 Mar 2009 20:52

How to embed live vlc video stream into html

Postby tinyang » 03 Apr 2009 22:53

I have a machine using vlc to serve video across my lan. right now I can use vlc to view the stream from any computer on the lan, but I need to get this working on a webpage, so I'm trying to figure out how to embed the video object into the html. I have a couple questions:

Do I need to use an sdp file for this? My streaming protocol is http.

Or should I be using the virtual streaming file?

Here is a code snippet I have tried so far which is not working:

<OBJECT
CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab"
WIDTH="352" HEIGHT="240" >
<PARAM NAME="src" VALUE="http://192.168.0.33:8080/stream">
<PARAM NAME="autoplay" VALUE="true" >
<EMBED SRC="QTMimeType.pntg" TYPE="image/x-macpaint"
PLUGINSPAGE="http://www.apple.com/quicktime/download"
QTSRC="http://192.168.254.33:8080/stream" WIDTH="352" HEIGHT="240"
AUTOPLAY="true" >
</EMBED>
</OBJECT>

My codec is mjpeg, and my encapsultation is mp4.

Thanks!!

iwata
Blank Cone
Blank Cone
Posts: 27
Joined: 31 Mar 2009 00:52

Re: How to embed live vlc video stream into html

Postby iwata » 04 Apr 2009 01:05

Mjpeg video as .mp4 ? what program does allow for this :?:

tinyang
Blank Cone
Blank Cone
Posts: 19
Joined: 17 Mar 2009 20:52

Re: How to embed live vlc video stream into html

Postby tinyang » 06 Apr 2009 16:22

Quicktime allows for this. But I'll use any encapsulation method and any client plugin for the browser that will do the trick! What do you suggest?

iwata
Blank Cone
Blank Cone
Posts: 27
Joined: 31 Mar 2009 00:52

Re: How to embed live vlc video stream into html

Postby iwata » 08 Apr 2009 17:42

hoooo, I doubt that Quicktime will issue an .mp4 movie with Mjpeg codec used as for the videdo (image) track ! it almost definitely requires a video track encoded as mpeg4 part2 or part10... and even 'worse' with very strict conformance in the inner aspects of the media Mpeg4 tracks ( atom structure, etc..)

now if we sum' up , is it correct to assume the situation is actually as follow :

1) as for the server side you have precised using VLC ; this point is clear

2) while it is not very clear from your post if you intend your viewers to go for a playing solution using the VLC Plugin/ActiveX , or using the QT plugin , as for the web page embed ; from your description you actually call for the QT plugin

then , there can be some 'conformance' issues if you deliver via VLC an .mp4 stream that QT player will not accept

last point: in addition to Mjpeg (for video) , what codec do you use for audio , with all finalised as.mp4 ?

at a glance , it seems you 'trust' VLC encoding any kind of codecs , wrapped in an .mp4 container ; it is true that VLC will do it , but *it won't work with QT* , since this is totally out of the MP4 standard ; and QT is right here, and VLC 'at fault'

now I ,however, appreciate that it does allow such 'experiments' , for any personl reason you may have to try something like this, but then it also assumes that you know it won't play everywhere...

tinyang
Blank Cone
Blank Cone
Posts: 19
Joined: 17 Mar 2009 20:52

Re: How to embed live vlc video stream into html

Postby tinyang » 08 Apr 2009 20:54

I think I made a beginner's mistake. I tried to access the mp4 stream in a browser and it prompted me to use QT, so I assumed that QT would work. I'm sure you are correct then, I will defer to your expertise. I am technologically inclined, but the whole streaming server/codecs thing is a new experience for me so I still have lots to learn. I was trying QT, but I think the best case scenario would be multicasting/broadcasting the live stream in a standard format that would allow the people who access the website to view the stream to use any plugin of their choice that supports that standard format. I actually want to be cross browser compatible, so hoping to avoid activeX or other proprietary methods. Above was a try at embedding the video in the webpage.

I am streaming video only, no audio.

So then are you suggesting that I stream mpeg codec? What would be the best encapsulation for that? My IPcamera stream is mjpeg, but I imagine I can have the streaming server transcode that in real time to almost any standard format.

For the specific way I and trying to accomplish this (broadcast to website), what do you suggest is the best protocol, http, rtsp, rtp over udp or something else?

Also, how do I embed that in a webpage? Do I need an sdp file? If so, how do I create one?

Thank you very much iwata for your continued replies and advice in my thread, your help is very much appreciated! :)

iwata
Blank Cone
Blank Cone
Posts: 27
Joined: 31 Mar 2009 00:52

Re: How to embed live vlc video stream into html

Postby iwata » 08 Apr 2009 22:52

we all have lots to learn, I am also trying to learn more , and as always practice, mistake, solution is the usual trio for all of us

first , afaik, but too lazy to check tonight (lol) , you can't create a valid 'conforming' .mp4 stream ...without an audio track ! strange as it can seem.. I may be wrong , but I suspect I am right ! indeed if it is the case you can use of some dummy audio track, or any trick that will do okay

but first, I pickup one word from your post that seems important : "IPcamera"

is its something of that kind , for instance :
http://www.planet.com.tw/en/product/pro ... 8&id2=5259
http://www.planet.com.tw/en/product/pro ... uct_8&id=8
etc...

I mean some kind of video camera , at first designed for surveillance purpose, even if you use it for other thing .

In case yes, then these may use of some proprietary IPcamera solution(s) , to send the video stream to a web browser ; do you have any app' that came with the camera ? with some user config' menus, like an IP setting ( 192.168.x.x)

I have no practice of using IPcameras over the web , but it may be the occasion for me to learn , as well ; so let's see....step by step ; may be you can precise the reference of the product

tinyang
Blank Cone
Blank Cone
Posts: 19
Joined: 17 Mar 2009 20:52

Re: How to embed live vlc video stream into html

Postby tinyang » 08 Apr 2009 23:17

That makes sense about an mp4 stream. Maybe vlc creates it's own dummy audio track because I never put any settings in for audio. Or maybe that is why qt did not like it.

Yes, my camera is a security ip cam even though like you say I will not be using it for security. I plan to deploy it on a website so that visitors to the website can remote control the pan/tilt/zoom (ptz) camera in a nature setting and observe/photograph wildlife and nature within range of the camera. I already built the ptz remote control panel that is working and same with taking pictures. Now I am just working on the database backend to catalogue the pics, and also of course the streaming because the rest of the website is useless if they can't see what the camera sees! :)

The camera model is the Acti ACM-8511. It came with no software because it has a built in web server with a CGI which provides the http interface. But it is non-configurable (the http interface, not the camera) so I can't modify it to my purposes. :(

I am also looking at this product and trying to get this working with the trial because it is not too expensive to buy if it does what I want it to do:

http://www.h264soft.com/

And it is also designed for IP cameras. But a free solution would be ideal and I still think it could work with vlc! So please tell me, what audio codec, video codec, encapsulation, and format standards do you recommend for me to try together for streaming?

Thanks again for you fast reply! I look forward to learning with you. :)

iwata
Blank Cone
Blank Cone
Posts: 27
Joined: 31 Mar 2009 00:52

Re: How to embed live vlc video stream into html

Postby iwata » 09 Apr 2009 16:20

so oki, not much time at the moment, but a very quick Google search for the user manual(s) leads here :

http://www.acti.com/Web_AdministratorV2 ... 7022FA.PDF
http://www.acti.com/Web_AdministratorV2 ... F2DE8A.PDF

as I mentioned above you should get access to some configuration panel (with the matching correct IP address of the device , just like for a router for instance)

in your case you should enter : is 192.168.0.100 in your browser as Default IP of this IP camera , to get access to config

as for video compression, it provides choice for Mpeg4 SP ; if the codec complies to the standard, you have much better chances that a QT player plugin , for instance , will accept such video as .mp4 stream

let's see this yet ; back later ...

tinyang
Blank Cone
Blank Cone
Posts: 19
Joined: 17 Mar 2009 20:52

Re: How to embed live vlc video stream into html

Postby tinyang » 09 Apr 2009 20:03

Hi iwata. You are correct about the manual. But I need to stream mjpeg via rtsp stream to video server, then transcode stream to whatever (some standard format) and broadcast to any clients that connect. I cannot stream to client directly from camera either. I will try this just as a test, but the options and granularity that are available with mjpeg via settings in the camera are something I require for my final solution. This is why I keep asking what settings I should use in vlc to transcode the incoming stream and broadcast it as.

Just as a test, I have succeeded in getting a vlc plugin player embedded in a webpage to play a direct mjpeg stream from the camera.

I will post back with the results of my QT test. :)

sikandar24
New Cone
New Cone
Posts: 1
Joined: 07 Jul 2010 10:00

Re: How to embed live vlc video stream into html

Postby sikandar24 » 07 Jul 2010 10:12

i am streaming a video file from one pc to another using vlc by giving http protocol now we want this video file to be accessed on our html page but we are not able to do it. any 1 working on it can help

Slavi2588
New Cone
New Cone
Posts: 2
Joined: 15 May 2012 06:18

Re: How to embed live vlc video stream into html

Postby Slavi2588 » 15 May 2012 08:58

I'm in the same boat right now and trying all kinds of stuff and nothing seems to work. Did anybody figure this out?? I know it's an old thread but still somebody might be listening ; )

Stan1026
New Cone
New Cone
Posts: 2
Joined: 18 May 2012 21:33

Re: How to embed live vlc video stream into html

Postby Stan1026 » 18 May 2012 21:38

I am also researching this same topic. I can get a IP camera to live stream to the desktop VLC media player but not to the embedded HTML control. Any ideas would be very much appreciated.


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 8 guests