Streaming from Command Line

About encoding, codec settings, muxers and filter usage
vwlowen
New Cone
New Cone
Posts: 4
Joined: 18 Nov 2013 15:16

Streaming from Command Line

Postby vwlowen » 18 Nov 2013 15:29

Hi,

I've seen this asked several times but none of the answers have solved my problem so I'm hoping someone can help.

Basically, I'm trying to stream live video to a webpage using HTML5. I can set up VLC manually by selecting the video source, selecting the HTTP protocol and the Theora + Vorbis (OGG) profile and it streams perfectly to a simple HTLM5 page:

Code: Select all

<html> <head> </head> <body> <video width="480" height="320" autoplay muted> <source src="http://home-vwlowen.no-ip.org:81/" type="video/ogg"> </video> </body> </html>


However, I'm trying to set it up through a batch file so that it can start up automatically if/when the server crashes. The 'Generated stream output string' from the manual setup is:

:sout=#transcode{vcodec=theo,vb=100,scale=1,acodec=vorb,ab=128,channels=2,samplerate=44100}:duplicate{dst=http{mux=ogg,dst=:81/},
dst=display} :sout-keep

The full command line batch file is:

Code: Select all

"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" dshow:// :dshow-vdev="Osprey-100 Video Device 1" :dshow-adev=none:live- caching=300:sout=#transcode{vcodec=theo,vb=100,scale=1,acodec=vorb,ab=128,channels=2,samplerate=44100}:duplicate{dst=http {mux=ogg,dst=:81/},dst=display} :sout-keep
The local Display shows the correct video source but there's nothing streaming to the webpage.

Any suggestions would be appreciated,

Thanks,

John.

nobody.loopback
Cone that earned his stripes
Cone that earned his stripes
Posts: 109
Joined: 08 Mar 2005 01:20

Re: Streaming from Command Line

Postby nobody.loopback » 18 Nov 2013 16:32

I assume the actual video is on a machine behind a NAT firewall/router, and, your Server i in the internet hosted somewhere ?

is port 81 connectable from the outside world to your PC where vlc is running ?
Do you think that streaming will start if there is a request on port 81 ?

I dont know, if the code on the web-page is correct, but for serving the video, You have to run the vlc batch inside an endless loop.
Also, first try to view the video from the outside of your network, without the Web-page.

vwlowen
New Cone
New Cone
Posts: 4
Joined: 18 Nov 2013 15:16

Re: Streaming from Command Line

Postby vwlowen » 18 Nov 2013 17:23

Thanks for the reply.

Yes, Port Forwarding etc is all set up. As long as I set up VLC manually, it works fine. Anyone visiting the webpage sees the video.

I don't understand what you mean about calling the batch file in an endless loop but I suspect I'm not doing that :-) ???

This is the website page: http://vwlowen.co.uk/temp/videotest.htm I've set up and started VLC manually and it's working behind the NAT ok.

(Anyone checking out the webpage later may find it blank if I'm not running VLC manually at the time)

John.

nobody.loopback
Cone that earned his stripes
Cone that earned his stripes
Posts: 109
Joined: 08 Mar 2005 01:20

Re: Streaming from Command Line

Postby nobody.loopback » 19 Nov 2013 21:47

Try this ? Dont know if this helps, but it will help in case VLC ends the playback.

Code: Select all

:START "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" dshow:// :dshow-vdev="Osprey-100 Video Device 1" :dshow-adev=none:live- caching=300:sout=#transcode{vcodec=theo,vb=100,scale=1,acodec=vorb,ab=128,channels=2,samplerate=44100}:duplicate{dst=http {mux=ogg,dst=:81/},dst=display} :sout-keep GOTO START


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 12 guests