Video stream of webcam

About encoding, codec settings, muxers and filter usage
c.monty
New Cone
New Cone
Posts: 2
Joined: 11 Mar 2008 21:44

Video stream of webcam

Postby c.monty » 11 Mar 2008 22:14

Hi!
I'm struggling with the following topic:
Linked to a laptop located in Australia, let's call it "PC-Aussie", a webcam is connected.
The live video of PC-Aussie should be available on another laptop, let's call it "PC-remote".

Is it feasible to stream the video using VLC from source PC-Aussie (server) to target PC-remote (client) over internet.
It must be considered that both laptops are located behind a router.

Thanks for your ideas.

johansyd
Blank Cone
Blank Cone
Posts: 25
Joined: 27 Feb 2008 11:10

Re: Video stream of webcam

Postby johansyd » 13 Mar 2008 10:06

Yes, but it isn't very easy. You have to set up a shoutcast server so you can stream over http rather then rtsp which will be blocked by the firewall. You can ofcourse open up the ports you need in the router for the video traffic. I don't know what is more easier for you. If you have admin rights to both of the routers, you might just open up the ports and stream it over rtsp since it is a bit better bandwice. If the stream is travelling a long way, you might get problems with latency. I have tested skype between Norway and Australia and found that it was severly buggy. You may get problems even with a small stream. 160x120 px is probably max of what you can get. Direct show is a feature in the windows version of vlc that can interact with a camera (only on windows). On linux you have to do it through the comandline:

http://musa.poperbu.net/index.php?optio ... =1&lang=en

FireW0lf
Blank Cone
Blank Cone
Posts: 27
Joined: 20 Jan 2005 08:01

Re: Video stream of webcam

Postby FireW0lf » 27 Apr 2008 10:13

Actually, it's incredibly easy, and does not require a shoutcast server at all

Also, you can have half decent image size too...

1. On the webcam PC fire up VLC and "Open Capture Device"
2. Click "Refresh List" for both Video src and Audio srv
3. Select the model of your webcam in the Video src, and select None in the Audio src
4. Check "Stream/Save" and click "Settings"
5. Check "MMSH", select "Encapsulation method ASF"
6. Under "Transcoding options" check "Video codec". Select "h264" and give it a bitrate that you can cope with (64 will do fine actually for a webcam)
7. Click "OK" and "OK"

Now go to your other PC, fire up VLC, and "Open Network Stream"

Select "HTTP/HTTPS/FTP/MMS" And enter the URL of your Server box - remember to put the port number at the end eg MMS://10.20.30.40:1234
Click "OK"

That's all there is to it

Notes: If you need to forward a port (like port 1234 on your server PC), go to http://www.portforward.com - it will guide you through how to do it

Also, you are not limited to using VLC to watch the stream - any network-capable Media Player should work fine (except WMP because it doesnt like the combination of ASF and h264)
Depending what player you use you might need to put MMS://your-server-address:1234 or MMSH://your-server-address:1234

Hope this helps

Aliby
Blank Cone
Blank Cone
Posts: 31
Joined: 20 Mar 2006 09:19
Location: South Africa

Re: Video stream of webcam

Postby Aliby » 16 May 2008 12:27

I really hope this is not a silly question - something I should know about networking - where do I find what port I should enter?
Is it to do with network ports etc. ( eg. HTTP is on 80). In that case I am not sure how to find what port MMS is broadcasting on. Do I set that in my home network router?

:?:

FireW0lf
Blank Cone
Blank Cone
Posts: 27
Joined: 20 Jan 2005 08:01

Re: Video stream of webcam

Postby FireW0lf » 17 May 2008 20:56

Port 1234 is the default port set for MMS in VLC, as you will see in the serving instance of VLC, next to "MMSH" and the address input box (which you will leave blank)

Aliby
Blank Cone
Blank Cone
Posts: 31
Joined: 20 Mar 2006 09:19
Location: South Africa

Re: Video stream of webcam

Postby Aliby » 30 May 2008 15:34

I can't pick up the stream over the LAN at home on Windows Vista?
I have followed the instructions as above, streaming from Windows XP.

Unfortunately I don't have another PC to check it with so I am not sure if it is a problem with Vista or with the Wirelss Router.

Any trouble shooting tips?

FireW0lf
Blank Cone
Blank Cone
Posts: 27
Joined: 20 Jan 2005 08:01

Re: Video stream of webcam

Postby FireW0lf » 30 May 2008 18:12

I have it working successfully on XP/Vista

Troubleshoot.... Run 2 copies of VLC both on the XP machine

Set the first to stream using the above settings, and the second to receive and play the stream

If this works (as it should if you followed the instructions carefully) then it's most likely your firewall blocking the connection

MuraliKaundinya
New Cone
New Cone
Posts: 2
Joined: 11 Jun 2008 03:17

Re: Video stream of webcam

Postby MuraliKaundinya » 11 Jun 2008 03:36

I would like to stream the video from one PC to another, programmatically using the VLC API if possible.

I know how to use the VLC media player console to do open capture device from source-PC, stream it and play it from another target-PC. The question is whether I can do it programmatically so I can build this capability into an application.

Thanks in advance.

justd314
New Cone
New Cone
Posts: 2
Joined: 16 Feb 2009 05:09

Re: Video stream of webcam

Postby justd314 » 16 Feb 2009 05:12

how do i find out what the sever box url is?

justd314
New Cone
New Cone
Posts: 2
Joined: 16 Feb 2009 05:09

Re: Video stream of webcam

Postby justd314 » 16 Feb 2009 06:22

o ok never mind i figured it out. the other computers ip address.
well that was simple.


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 26 guests