LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   streaming a webcam (https://www.linuxquestions.org/questions/ubuntu-63/streaming-a-webcam-779805/)

Skaperen 01-04-2010 03:57 PM

streaming a webcam
 
I have a USB webcam. I pointed it at something other than my face so as not to break it. I'd like to stream this to the net. Since I'm behind a firewall, and my bandwidth is limited, what I'd like to do is send one stream out to a server I have in the cloud, and make it streamable from there. The desktop where the camera is plugged in is Ubuntu and the remote server runs Debian. I'd also like to cut the frame rate on it to reduce the bandwidth, such as one frame per second. Any suggestions on which packages/programs to do that with?

Simon Bridge 01-04-2010 04:02 PM

VLC will do it.
http://www.wikihow.com/Stream-Your-Webcam

This requires VLC to play the stream though.

note: consider ogv for making video available online - html5 compatible browsers (everything except IE) can view this format via the <video> tag with no additional fiddling about. Indeed: local ogv files will play in your browser just by rt-click > open-with browser.

Skaperen 01-05-2010 09:34 AM

Looks like VLC might do it. I'll still have to experiment because I need to make the connection to the server via SSH over TCP (the source cannot be reached from the net). So that might be as simple as forwarding a port on SSH (listening only on 127.0.0.1 so the world can't get to it).

I'm also looking for another USB camera, supported by Linux of course, that can do HD at 1920x1080pXX where XX can be a low number (as low as 1 will be fine for me).

Simon Bridge 01-05-2010 07:19 PM

You want to stream high definition over the internet?!!
Cannot help you there - NZ has rotten bandwidth.

Skaperen 01-06-2010 11:45 AM

Yes, high definition ... just very low frame rate ... 1 per second or even 1 per minute.

Simon Bridge 01-06-2010 06:12 PM

Oh I get you - it's basically going to be a time lapse camera and you want hi res stills.

how about:
1. Creative Live! Cam Socialize HD
2. Logitech Portable Webcam C905
3. Logitech QuickCam Pro for Notebooks
4. Logitech Webcam C600 HD
5. Logitech Webcam Pro 9000 for Business
6. Microsoft LifeCam Cinema

I'd look into the logitech offerings at your local stores, make a list of what's available and google them.

unSpawn 01-06-2010 07:53 PM

Quote:

Originally Posted by Skaperen (Post 3814969)
Looks like VLC might do it.

If you don't want or need to run the UI VLC has a commandline companion called 'cvlc' so you can run something like 'cvlc v4l:// --v4l-vdev=/dev/video0 --sout=#transcode{vcodec=mp2v,vb=800,scale=1,acodec=mpga,ab=128,channels=2} --duplicate{dst=std{access=http,mux=ts,dst=$LOCAL_IP:$LOCAL_PORT}}'.


Quote:

Originally Posted by Skaperen (Post 3814969)
I'll still have to experiment because I need to make the connection to the server via SSH over TCP (the source cannot be reached from the net). So that might be as simple as forwarding a port on SSH (listening only on 127.0.0.1 so the world can't get to it).

Once you've got the SSH tunnel thing going ("-L$LOCAL_PORT:$REMOTE_IP:$REMOTE_PORT") try adding your key to SSH's authentication agent and use 'autossh' instead of SSH as it'll reestablish connections automagically when b0rked.


All times are GMT -5. The time now is 10:36 AM.