Page 1 of 1

streaming webcam from Ubuntu w/o X

Posted: 18 Apr 2011 08:47
by rebeltaz
I am trying to stream a webcam over a local network through a computer that is currently acting as a webserver which therefore has no X GUI. Through a lot of experimentation and trial-and-error, I have gotten the following command to work on my laptop:

Code: Select all

vlc v4l2:///dev/video0 --sout "#transcode{vcodec=h264,vb=800,scale=1}:std{access=http,mux=ts,dst=192.168.1.5:8080}" –noaudio
I can then point Totem to the IP address and I have streaming video. So then I installedl vlc on the computer I want to set this up on and issue the same command (substituting v4l in place of v4l2) and I get this output:

Code: Select all

[00000283] main private: creating httpd status change: ( new input: v4l:///dev/video0 ) status change: ( audio volume: 256 ) status change: ( play state: 1 ) [00000288] v4l demuxer error: chroma selection failed [00000288] v4l demuxer error: cannot open audio device (Device or resource busy) [00000288] v4l demuxer error: cannot open device (No such file or directory) [00000288] v4l demuxer error: cannot open audio device (No such file or directory) [00000290] vcd access error: could not read TOCHDR [00000290] vcd access error: no movie tracks found [00000290] access_file access error: cannot open file /dev/video0 (Device or resource busy) [00000275] main input error: no suitable access module for `v4l:///dev/video0' status change: ( stop state: 0 ) [00000303] main private: creating httpd status change: ( new input: –noaudio ) status change: ( audio volume: 256 ) status change: ( play state: 1 ) libdvdnav: Using dvdnav version 0.1.10 from http://dvd.sf.net libdvdread: Encrypted DVD support unavailable. libdvdread: Can't stat –noaudio No such file or directory libdvdnav: vm: faild to open/read the DVD [00000298] main input error: no suitable access module for `–noaudio' [00000267] main playlist: nothing to play status change: ( stop state: 0 )
By removing the '-noaudio' option, I can get the message down to:

Code: Select all

[00000283] main private: creating httpd status change: ( new input: v4l:///dev/video0 ) status change: ( audio volume: 256 ) status change: ( play state: 1 ) [00000288] v4l demuxer error: chroma selection failed [00000288] v4l demuxer error: cannot open audio device (Device or resource busy) [00000288] v4l demuxer error: cannot open device (No such file or directory) [00000288] v4l demuxer error: cannot open audio device (No such file or directory) [00000290] vcd access error: could not read TOCHDR [00000290] vcd access error: no movie tracks found [00000290] access_file access error: cannot open file /dev/video0 (Device or resource busy) [00000275] main input error: no suitable access module for `v4l:///dev/video0' status change: ( stop state: 0 ) [00000267] main playlist: nothing to play
I tried installing 'v4l-conf' and it's associated dependencies, but that didn't make a difference. Does it matter that the computer I want to run this command on does not have a GUI installed? It is simply a command-line server system. Is there anyway to get this to work on that computer? Or is there another way to do it? Thanks...

Re: streaming webcam from Ubuntu w/o X

Posted: 18 Apr 2011 15:36
by Rémi Denis-Courmont
Why the heck did you switch from V4L2 to V4L anyway?!

Re: streaming webcam from Ubuntu w/o X

Posted: 18 Apr 2011 18:44
by rebeltaz
The camera that I am using (an old IBM web cam) didn't work with v4l2 but it did work with v4l...

Re: streaming webcam from Ubuntu w/o X

Posted: 19 Apr 2011 11:10
by Rémi Denis-Courmont
The error message very much implies that the camera does not support V4L1 or is already used by another application...

Re: streaming webcam from Ubuntu w/o X

Posted: 19 Apr 2011 18:30
by rebeltaz
well, I know it does support v4l1 because I can access it when I connect it to my laptop. As for it being in use, I can't image how. I can't think of any program that should be using it. All this computer is is a command-line environment web server.