[solved] accessing 2 different web cams on the same pc

*nix specific usage questions
glok_twen
Blank Cone
Blank Cone
Posts: 11
Joined: 25 Feb 2009 05:27

[solved] accessing 2 different web cams on the same pc

Postby glok_twen » 27 Feb 2009 01:28

hi. i have been able to make some good progress on streaming a web cam both via the gui and command line.

so i've added a second web cam to the same pc. when both web cams are in, i can access the local gui and get a picture on each one separately by first using /dev/video0, stopping that capture, then doing a separate capture also via the gui but this time on /dev/video1. that works as expected.

also i can start 2 instances of vlc and access the both webcams at the same time via manual gui use of the capture input option for each on in each of the 2 vlc instances. this also works fine.

but, when i try to stream them both at the same time i never can. each time i get an error. i have tried this both by starting 2 separate instances of vlc. and also by running it via vlm.

can you please help?

here is my vlm config file:

new channel1 broadcast enabled
setup channel1 input v4l2://dev/video0:norm=secam:frequency=543250:size=640x480:channel=0:adev=/dev/video0:audio=0
setup channel1 output #transcode{vcodec=mp4v,vb=800,scale=1,acodec=mp4a,ab=128,channels=2}:standard{access=http,mux=ogg,dst=192.168.1.5:1234}

new channel2 broadcast enabled
setup channel2 input v4l2://dev/video1:norm=secam:frequency=543250:size=640x480:channel=0:adev=/dev/video1:audio=0
setup channel2 output #transcode{vcodec=mp4v,vb=800,scale=1,acodec=mp4a,ab=128,channels=2}:standard{access=http,mux=ogg,dst=192.168.1.5:1235}

control channel1 play
control channel2 play

usb devices:

glok@glok:~/Documents$ lsusb
Bus 005 Device 004: ID 046d:09a1 Logitech, Inc.
Bus 005 Device 003: ID 046d:09a1 Logitech, Inc.
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 002: ID 413c:02b0 Dell Computer Corp.
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000



and here is the error log:

[00000362] main http server warning: cannot add '/dialogs/vlm' (url already defined)
[00000384] http interface debug: file=/usr/local/share/vlc/http/dialogs/footer (url=/dialogs/footer)
[00000362] main http server warning: cannot add '/dialogs/footer' (url already defined)
[00000384] http interface debug: file=/usr/local/share/vlc/http/dialogs/input (url=/dialogs/input)
[00000362] main http server warning: cannot add '/dialogs/input' (url already defined)
[00000384] http interface debug: file=/usr/local/share/vlc/http/vlm_export.html (url=/vlm_export.html)
[00000362] main http server warning: cannot add '/vlm_export.html' (url already defined)
[00000384] http interface debug: file=/usr/local/share/vlc/http/favicon.ico (url=/favicon.ico)
[00000362] main http server warning: cannot add '/favicon.ico' (url already defined)
[00000384] http interface debug: file=/usr/local/share/vlc/http/style.css (url=/style.css)
[00000362] main http server warning: cannot add '/style.css' (url already defined)
[00000384] http interface error: cannot find any file in directory /usr/local/share/vlc/http
[00000367] main http server debug: httpd_HostDelete: host still used
[00000374] [Media: channel1] v4l2 demux debug: Available control: Saturation (980902)
[00000374] [Media: channel1] v4l2 demux debug: integer control
[00000374] [Media: channel1] v4l2 demux debug: valid values: 0 to 255 by steps of 1
[00000374] [Media: channel1] v4l2 demux debug: default value: 28
[00000374] [Media: channel1] v4l2 demux debug: current value: 28
[00000386] [Media: channel2] v4l2 access warning: unknown option norm=secam
[00000386] [Media: channel2] v4l2 access warning: unknown option frequency=543250
[00000386] [Media: channel2] v4l2 access warning: unknown option size=640x480
[00000386] [Media: channel2] v4l2 access warning: unknown option channel=0
[00000386] [Media: channel2] v4l2 access warning: unknown option audio=0
[00000386] [Media: channel2] v4l2 access debug: main device='dev/video1'
[00000386] [Media: channel2] v4l2 access debug: trying device 'dev/video1' as video
[00000386] [Media: channel2] v4l2 access error: cannot open video device (No such file or directory)
[00000386] [Media: channel2] v4l2 access debug: opening '/dev/video0' as video
[00000374] [Media: channel1] v4l2 demux debug: Available control: White Balance Temperature, Auto (98090c)
[00000374] [Media: channel1] v4l2 demux debug: boolean control
[00000374] [Media: channel1] v4l2 demux debug: default value: 1
[00000374] [Media: channel1] v4l2 demux debug: current value: 1
[00000386] [Media: channel2] v4l2 access debug: V4L2 device: UVC Camera (046d:09a1) using driver: uvcvideo (version: 0.1.0) on usb-0000:00:1d.7-1
[00000386] [Media: channel2] v4l2 access debug: the device has the capabilities: (X) Video Capure, ( ) Audio, ( ) Tuner
[00000386] [Media: channel2] v4l2 access debug: supported I/O methods are: (X) Read/Write, (X) Streaming, ( ) Asynchronous
[00000386] [Media: channel2] v4l2 access debug: video input 0 (Camera 1) has type: External analog input *
[00000386] [Media: channel2] v4l2 access debug: device supports chroma MJPG [MJPEG, MJPG]
[00000386] [Media: channel2] v4l2 access debug: device supports size 160x120
[00000386] [Media: channel2] v4l2 access debug: device supports size 176x144
[00000386] [Media: channel2] v4l2 access debug: device supports size 320x240
[00000386] [Media: channel2] v4l2 access debug: device supports size 352x288
[00000386] [Media: channel2] v4l2 access debug: device supports size 640x480
[00000386] [Media: channel2] v4l2 access debug: device supports size 960x720
[00000386] [Media: channel2] v4l2 access debug: device supports chroma YUY2 [YUV 4:2:2 (YUYV), YUYV]
[00000386] [Media: channel2] v4l2 access debug: device supports size 160x120
[00000386] [Media: channel2] v4l2 access debug: device supports size 176x144
[00000386] [Media: channel2] v4l2 access debug: device supports size 320x240
[00000386] [Media: channel2] v4l2 access debug: device supports size 352x288
[00000386] [Media: channel2] v4l2 access debug: device supports size 640x480
[00000386] [Media: channel2] v4l2 access debug: device supports size 960x720
[00000386] [Media: channel2] v4l2 access debug: device supports size 1280x960
[00000386] [Media: channel2] v4l2 access debug: device supports chroma YUYV [YUV 4:2:2 (YUYV), YUYV]
[00000386] [Media: channel2] v4l2 access debug: device supports size 160x120
[00000386] [Media: channel2] v4l2 access debug: device supports size 176x144
[00000386] [Media: channel2] v4l2 access debug: device supports size 320x240
[00000386] [Media: channel2] v4l2 access debug: device supports size 352x288
[00000386] [Media: channel2] v4l2 access debug: device supports size 640x480
[00000386] [Media: channel2] v4l2 access debug: device supports size 960x720
[00000386] [Media: channel2] v4l2 access debug: device supports size 1280x960
[00000386] [Media: channel2] v4l2 access debug: device supports chroma RV24 [RGB3, RGB3]
[00000386] [Media: channel2] v4l2 access debug: device supports size 160x120
[00000386] [Media: channel2] v4l2 access debug: device supports size 176x144
[00000386] [Media: channel2] v4l2 access debug: device supports size 320x240
[00000386] [Media: channel2] v4l2 access debug: device supports size 352x288
[00000386] [Media: channel2] v4l2 access debug: device supports size 640x480
[00000386] [Media: channel2] v4l2 access debug: device supports size 960x720
[00000386] [Media: channel2] v4l2 access debug: device supports size 1280x960
[00000386] [Media: channel2] v4l2 access debug: device supports chroma RV24 [BGR3, BGR3]
[00000386] [Media: channel2] v4l2 access debug: device supports size 160x120
[00000386] [Media: channel2] v4l2 access debug: device supports size 176x144
[00000386] [Media: channel2] v4l2 access debug: device supports size 320x240
[00000386] [Media: channel2] v4l2 access debug: device supports size 352x288
[00000386] [Media: channel2] v4l2 access debug: device supports size 640x480
[00000386] [Media: channel2] v4l2 access debug: device supports size 960x720
[00000386] [Media: channel2] v4l2 access debug: device supports size 1280x960
[00000386] [Media: channel2] v4l2 access debug: device supports chroma I420 [YU12, YU12]
[00000386] [Media: channel2] v4l2 access debug: device supports size 160x120
[00000386] [Media: channel2] v4l2 access debug: device supports size 176x144
[00000386] [Media: channel2] v4l2 access debug: device supports size 320x240
[00000386] [Media: channel2] v4l2 access debug: device supports size 352x288
[00000386] [Media: channel2] v4l2 access debug: device supports size 640x480
[00000386] [Media: channel2] v4l2 access debug: device supports size 960x720
[00000386] [Media: channel2] v4l2 access debug: device supports size 1280x960
[00000386] [Media: channel2] v4l2 access error: cannot set input (Device or resource busy)
[00000386] [Media: channel2] main access warning: no access module matching "v4l2" could be loaded
[00000386] [Media: channel2] main access debug: TIMER module_Need() : 18.896 ms - Total 18.896 ms / 1 intvls (Avg 18.896 ms)
[00000355] [Media: channel2] main input error: open of `v4l2://dev/video1:norm=secam:frequency=543250:size=640x480:channel=0:adev=/dev/video1:audio=0' failed: could not create access
[00000361] main stream out debug: destroying chain... (name=transcode)
[00000366] main stream out debug: destroying chain... (name=standard)
[00000379] mux_ogg mux: Close
[00000379] main mux debug: removing module "mux_ogg"
[00000373] main http server debug: waitpipe: object killed
[00000373] main http server debug: thread ended
[00000373] main http server debug: thread 2981014416 joined (network/httpd.c:1164)
[00000373] main http server debug: HTTP host removed
[00000370] access_output_http access out debug: Close
[00000370] main access out debug: removing module "access_output_http"
[00000366] main stream out debug: removing module "stream_out_standard"
[00000366] main stream out debug: destroying chain done
[00000374] [Media: channel1] v4l2 demux debug: Available control: Gain (980913)
[00000374] [Media: channel1] v4l2 demux debug: integer control
[00000374] [Media: channel1] v4l2 demux debug: valid values: 0 to 255 by steps of 1
[00000374] [Media: channel1] v4l2 demux debug: default value: 0
[00000374] [Media: channel1] v4l2 demux debug: current value: 0
[00000361] main stream out debug: removing module "stream_out_transcode"
[00000361] main stream out debug: destroying chain done
[00000374] [Media: channel1] v4l2 demux debug: Available control: Power Line Frequency (980918)
[00000374] [Media: channel1] v4l2 demux debug: menu control
[00000374] [Media: channel1] v4l2 demux debug: 0: Disabled
[00000374] [Media: channel1] v4l2 demux debug: 1: 50 Hz
[00000374] [Media: channel1] v4l2 demux debug: 2: 60 Hz
[00000374] [Media: channel1] v4l2 demux debug: default value: 2
[00000374] [Media: channel1] v4l2 demux debug: current value: 2
[00000374] [Media: channel1] v4l2 demux debug: Available control: White Balance Temperature (98091a)
[00000374] [Media: channel1] v4l2 demux debug: integer control
[00000374] [Media: channel1] v4l2 demux debug: valid values: 0 to 10000 by steps of 10
[00000374] [Media: channel1] v4l2 demux debug: default value: 4000
[00000374] [Media: channel1] v4l2 demux debug: current value: 2519
[00000374] [Media: channel1] v4l2 demux debug: Available control: Sharpness (98091b)
[00000374] [Media: channel1] v4l2 demux debug: integer control
[00000374] [Media: channel1] v4l2 demux debug: valid values: 0 to 255 by steps of 1
[00000374] [Media: channel1] v4l2 demux debug: default value: 180
[00000374] [Media: channel1] v4l2 demux debug: current value: 180
[00000374] [Media: channel1] v4l2 demux debug: Available control: Backlight Compensation (98091c)
[00000374] [Media: channel1] v4l2 demux debug: integer control
[00000374] [Media: channel1] v4l2 demux debug: valid values: 0 to 2 by steps of 1
[00000374] [Media: channel1] v4l2 demux debug: default value: 1
[00000374] [Media: channel1] v4l2 demux debug: current value: 1
[00000374] [Media: channel1] v4l2 demux debug: Available private control: Exposure, Auto (9a0901)
[00000374] [Media: channel1] v4l2 demux debug: menu control
[00000374] [Media: channel1] v4l2 demux debug: 0: Auto Mode
[00000374] [Media: channel1] v4l2 demux debug: 1: Manual Mode
[00000374] [Media: channel1] v4l2 demux debug: 2: Shutter Priority Mode
[00000374] [Media: channel1] v4l2 demux debug: 3: Aperture Priority Mode
[00000374] [Media: channel1] v4l2 demux debug: default value: 3
[00000374] [Media: channel1] v4l2 demux debug: current value: 3
[00000384] qt4 interface error: Could not connect to X server
[00000384] skins2 interface error: Cannot open display
[00000384] skins2 interface error: cannot initialize OSFactory
[00000374] [Media: channel1] v4l2 demux debug: Available private control: Exposure (Absolute) (9a0902)
Remote control interface initialized. Type `help' for help.
[00000374] [Media: channel1] v4l2 demux debug: integer control
[00000374] [Media: channel1] v4l2 demux debug: valid values: 1 to 10000 by steps of 1
[00000374] [Media: channel1] v4l2 demux debug: default value: 166
[00000374] [Media: channel1] v4l2 demux debug: current value: 166
[00000374] [Media: channel1] v4l2 demux debug: Available private control: Exposure, Auto Priority (9a0903)
[00000374] [Media: channel1] v4l2 demux debug: boolean control
[00000374] [Media: channel1] v4l2 demux debug: default value: 0
[00000374] [Media: channel1] v4l2 demux debug: current value: 1
[00000374] [Media: channel1] v4l2 demux debug: Available private control: Privacy (9a0910)
[00000374] [Media: channel1] v4l2 demux debug: boolean control
[00000374] [Media: channel1] v4l2 demux debug: default value: 0
[00000384] main interface debug: using interface module "rc"
[00000384] main interface debug: TIMER module_Need() : 97.763 ms - Total 97.763 ms / 1 intvls (Avg 97.763 ms)
[00000384] main interface debug: thread started
[00000384] main interface debug: thread 2981014416 (interface) created at priority 0 (interface/interface.c:168)
[00000374] [Media: channel1] v4l2 demux debug: current value: 0
[00000355] [Media: channel2] main input debug: thread ended
[00000355] [Media: channel2] main input debug: thread 3027979152 joined (input/vlm.c:776)
[00000355] [Media: channel2] main input debug: TIMER input launching for '(null)' : 217.141 ms - Total 217.141 ms / 1 intvls (Avg 217.141 ms)
[00000374] [Media: channel1] v4l2 demux debug: supported frame intervals for I420, 320x240:
[00000374] [Media: channel1] v4l2 demux debug: supported frame interval: 1/30
[00000374] [Media: channel1] v4l2 demux debug: supported frame interval: 1/25
[00000374] [Media: channel1] v4l2 demux debug: supported frame interval: 1/20
[00000374] [Media: channel1] v4l2 demux debug: supported frame interval: 1/15
[00000374] [Media: channel1] v4l2 demux debug: supported frame interval: 1/10
[00000374] [Media: channel1] v4l2 demux debug: supported frame interval: 1/5
[00000374] [Media: channel1] v4l2 demux debug: added new video es I420 320x240
[00000349] [Media: channel1] main input debug: selecting program id=0
[00000374] [Media: channel1] v4l2 demux debug: opening '/dev/video0' as audio
[00000374] [Media: channel1] main demux debug: using access_demux module "v4l2"
[00000374] [Media: channel1] main demux debug: TIMER module_Need() : 554.651 ms - Total 554.651 ms / 1 intvls (Avg 554.651 ms)
[00000393] [Media: channel1] main packetizer debug: looking for packetizer module: 16 candidates
[00000393] [Media: channel1] main packetizer debug: using packetizer module "rawvideo"
[00000393] [Media: channel1] main packetizer debug: TIMER module_Need() : 4.915 ms - Total 4.915 ms / 1 intvls (Avg 4.915 ms)
[00000393] [Media: channel1] main packetizer debug: thread started
[00000393] [Media: channel1] main packetizer debug: thread 3027979152 (decoder) created at priority 0 (input/decoder.c:217)
[00000349] [Media: channel1] main input debug: starting in async mode
[00000349] [Media: channel1] main input debug: `v4l2://dev/video0:norm=secam:frequency=543250:size=640x480:channel=0:adev=/dev/video0:audio=0' successfully opened
[00000349] [Media: channel1] main input debug: control type=1
[00000350] [Media: channel1] main stream output debug: adding a new sout input (sout_input:0xb6a05070)
[00000351] [Media: channel1] stream_out_transcode stream out debug: creating video transcoding from fcc=`I420' to fcc=`mp4v'
[00000401] [Media: channel1] main decoder debug: looking for decoder module: 22 candidates
[00000401] [Media: channel1] main decoder debug: using decoder module "rawvideo"
[00000401] [Media: channel1] main decoder debug: TIMER module_Need() : 15.178 ms - Total 15.178 ms / 1 intvls (Avg 15.178 ms)
[00000402] [Media: channel1] main encoder debug: looking for encoder module: 5 candidates
[00000402] [Media: channel1] avcodec encoder debug: libavcodec initialized (interface 3352064 )
[00000402] [Media: channel1] avcodec encoder debug: removing common factors from framerate
(mpeg4@0x81724c0)
[00000402] [Media: channel1] avcodec encoder debug: found encoder MPEG-4 Video
[00000402] [Media: channel1] main encoder debug: using encoder module "avcodec"
[00000402] [Media: channel1] main encoder debug: TIMER module_Need() : 13.915 ms - Total 13.915 ms / 1 intvls (Avg 13.915 ms)
[00000402] [Media: channel1] main encoder debug: removing module "avcodec"
[00000351] [Media: channel1] stream_out_transcode stream out debug: decoder aspect is 576000:432000
[00000351] [Media: channel1] stream_out_transcode stream out debug: source pixel aspect is 1.000000:1
[00000351] [Media: channel1] stream_out_transcode stream out debug: scaled pixel aspect is 1.000000:1
[00000351] [Media: channel1] stream_out_transcode stream out debug: source 320x240, destination 320x240
[00000351] [Media: channel1] stream_out_transcode stream out debug: encoder aspect is 576000:432000
[00000351] [Media: channel1] stream_out_transcode stream out debug: destination (after video filters) 320x240
[00000402] [Media: channel1] main encoder debug: looking for encoder module: 5 candidates
[00000402] [Media: channel1] avcodec encoder debug: libavcodec already initialized
[00000402] [Media: channel1] avcodec encoder debug: removing common factors from framerate
(mpeg4@0x818b550)
[00000402] [Media: channel1] avcodec encoder debug: found encoder MPEG-4 Video
[00000402] [Media: channel1] main encoder debug: using encoder module "avcodec"
[00000402] [Media: channel1] main encoder debug: TIMER module_Need() : 5.114 ms - Total 5.114 ms / 1 intvls (Avg 5.114 ms)
[00000368] [Media: channel1] main mux debug: adding a new input
[00000368] [Media: channel1] mux_ogg mux debug: adding input
[00000368] [Media: channel1] mux_ogg mux debug: mp4v stream
[00000393] [Media: channel1] main packetizer debug: switching to sync mode
[00000368] [Media: channel1] mux_ogg mux debug: writing header
[00000368] [Media: channel1] mux_ogg mux debug: creating header for mp4v
[00000368] [Media: channel1] mux_ogg mux debug: writing extra data
Last edited by glok_twen on 27 Feb 2009 15:58, edited 1 time in total.

xtophe
Big Cone-huna
Big Cone-huna
Posts: 1209
Joined: 24 Nov 2003 10:12
Location: Bristol, England

Re: accessing 2 different web cams on the same pc

Postby xtophe » 27 Feb 2009 11:57

there is a mistake in your command line.
it should be v4l2:///dev/video0 2/ for :// and 1 / for /dev
Xtophe

glok_twen
Blank Cone
Blank Cone
Posts: 11
Joined: 25 Feb 2009 05:27

Re: accessing 2 different web cams on the same pc

Postby glok_twen » 27 Feb 2009 14:46

thank you.

so i changed my config file to this:

new channel1 broadcast enabled
setup channel1 input v4l2:///dev/video0:norm=secam:frequency=543250:size=640x480:channel=0:adev=/dev/video0:audio=0
setup channel1 output #transcode{vcodec=mp4v,vb=800,scale=1,acodec=mp4a,ab=128,channels=2}:standard{access=http,mux=ogg,dst=192.168.1.5:1234}

new channel2 broadcast enabled
setup channel2 input v4l2:///dev/video1:norm=secam:frequency=543250:size=640x480:channel=0:adev=/dev/video1:audio=0
setup channel2 output #transcode{vcodec=mp4v,vb=800,scale=1,acodec=mp4a,ab=128,channels=2}:standard{access=http,mux=ogg,dst=192.168.1.5:1235}

control channel1 play
control channel2 play


it made the errors go away. but now i get this when using a single vlc command with the ///'s:

[00000364] main input debug: `v4l2:///dev/video0:norm=secam:frequency=543250:size=640x480:channel=0:adev=/dev/video0:audio=0' gives access `v4l2' demux `' path `/dev/video0:norm=secam:frequency=543250:size=640x480:channel=0:adev=/dev/video0:audio=0'
[00000364] main input debug: creating demux: access='v4l2' demux='' path='/dev/video0:norm=secam:frequency=543250:size=640x480:channel=0:adev=/dev/video0:audio=0'
[00000376] main demux debug: looking for access_demux module: 1 candidate
[00000376] v4l2 demux warning: unknown option norm=secam
[00000376] v4l2 demux warning: unknown option frequency=543250
[00000376] v4l2 demux warning: unknown option size=640x480
[00000376] v4l2 demux warning: unknown option channel=0
[00000376] v4l2 demux warning: unknown option audio=0
[00000376] v4l2 demux debug: main device='/dev/video0'
[00000376] v4l2 demux debug: trying device '/dev/video0' as video
[00000376] v4l2 demux error: cannot open video device (No such file or directory)
[00000376] v4l2 demux debug: trying device '/dev/video0' as audio
[00000376] v4l2 demux error: cannot open device /dev/video0 for OSS audio (No such file or directory)
[00000376] v4l2 demux debug: opening '/dev/video0' as video
[00000376] v4l2 demux error: cannot open video device (No such file or directory)
[00000376] v4l2 demux debug: opening '/dev/video0' as audio
[00000376] main demux warning: no access_demux module matching "v4l2" could be loaded
[00000376] main demux debug: TIMER module_Need() : 6.634 ms - Total 6.634 ms / 1 intvls (Avg 6.634 ms)
[00000364] main input debug: creating access 'v4l2' path='/dev/video0:norm=secam:frequency=543250:size=640x480:channel=0:adev=/dev/video0:audio=0'
[00000379] main access debug: looking for access module: 1 candidate
[00000379] v4l2 access warning: unknown option norm=secam
[00000379] v4l2 access warning: unknown option frequency=543250
[00000379] v4l2 access warning: unknown option size=640x480
[00000379] v4l2 access warning: unknown option channel=0
[00000379] v4l2 access warning: unknown option audio=0
[00000379] v4l2 access debug: main device='/dev/video0'
[00000379] v4l2 access debug: trying device '/dev/video0' as video
[00000379] v4l2 access error: cannot open video device (No such file or directory)
[00000379] v4l2 access debug: opening '/dev/video0' as video
[00000379] v4l2 access error: cannot open video device (No such file or directory)
[00000379] main access warning: no access module matching "v4l2" could be loaded
[00000379] main access debug: TIMER module_Need() : 5.131 ms - Total 5.131 ms / 1 intvls (Avg 5.131 ms)
[00000364] main input error: open of `v4l2:///dev/video0:norm=secam:frequency=543250:size=640x480:channel=0:adev=/dev/video0:audio=0' failed: could not create access


suggestions?

glok_twen
Blank Cone
Blank Cone
Posts: 11
Joined: 25 Feb 2009 05:27

Re: accessing 2 different web cams on the same pc

Postby glok_twen » 27 Feb 2009 15:32

i did another experiment and collected some more data about this. there is still a very big difficulty running 2 web cams. to test it, i tried just simple command line commands to show the 2 cams locally at the same time. it seems somewhere my system is getting confused there are indeed 2 cameras.

first here is the setup. there are 2 webcams connected, both are logitech quickcam communicate mps:

glok@glok:~$ ls /dev/vid*
/dev/video0 /dev/video1

glok@glok:~$ lsusb
Bus 005 Device 008: ID 046d:09a1 Logitech, Inc.
Bus 005 Device 007: ID 046d:09a1 Logitech, Inc.
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 002: ID 413c:02b0 Dell Computer Corp.
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000

then i run a command to view the first one, /dev/video0. this one comes up and displays fine:

glok@glok:~/practice$ vlc v4l2:// /dev/video0
VLC media player 0.9.8a Grishenko
[00000001] main libvlc debug: VLC media player - version 0.9.8a Grishenko - (c) 1996-2008 the VideoLAN team
[00000001] main libvlc debug: libvlc was configured with ./configure '--enable-v4l2'
[00000001] main libvlc debug: translation test: code is "C"
[00000345] main interface: creating httpd
[00000001] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.

while the above is still running, i try the next command to see the other cam at the same time. i get the errors shown. no video display comes up. can you please help?

glok@glok:~$ vlc -vvv 4vl2:// /dev/video1
VLC media player 0.9.8a Grishenko
[00000001] main libvlc debug: VLC media player - version 0.9.8a Grishenko - (c) 1996-2008 the VideoLAN team
[00000001] main libvlc debug: libvlc was configured with ./configure '--enable-v4l2'
[00000001] main libvlc debug: translation test: code is "C"
[00000001] main libvlc debug: checking builtin modules
[00000001] main libvlc debug: checking plugin modules
[00000001] main libvlc debug: loading plugins cache file /home/glok/.cache/vlc/plugins-04041e.dat
[00000001] main libvlc debug: recursively browsing `/usr/local/lib/vlc'
[00000001] main libvlc debug: module bank initialized, found 234 modules
[00000001] main libvlc debug: opening config file (/home/glok/.config/vlc/vlcrc)
[00000001] main libvlc debug: CPU has capabilities 486 586 MMX MMXEXT SSE SSE2 FPU
[00000001] main libvlc debug: looking for memcpy module: 3 candidates
[00000001] main libvlc debug: using memcpy module "memcpymmxext"
[00000317] main interaction debug: thread started
[00000317] main interaction debug: thread 3082623888 (Interaction control) created at priority 0 (interface/interaction.c:382)
[00000319] main input debug: Creating an input for 'Media Library'
[00000319] main input debug: Input is a meta file: disabling unneeded options
[00000319] main input debug: `file/xspf-open:///home/glok/.local/share/vlc/ml.xspf' gives access `file' demux `xspf-open' path `/home/glok/.local/share/vlc/ml.xspf'
[00000319] main input debug: creating access 'file' path='/home/glok/.local/share/vlc/ml.xspf'
[00000320] main access debug: looking for access module: 3 candidates
[00000320] access_file access debug: opening file `/home/glok/.local/share/vlc/ml.xspf'
[00000320] main access debug: using access module "access_file"
[00000320] main access debug: TIMER module_Need() : 1.820 ms - Total 1.820 ms / 1 intvls (Avg 1.820 ms)
[00000325] main stream debug: Using AStream*Stream
[00000325] main stream debug: pre-buffering...
[00000325] main stream debug: received first data for our buffer
[00000319] main input debug: creating demux: access='file' demux='xspf-open' path='/home/glok/.local/share/vlc/ml.xspf'
[00000326] main demux debug: looking for demux module: 1 candidate
[00000326] playlist demux debug: using XSPF playlist reader
[00000326] main demux debug: using demux module "playlist"
[00000326] main demux debug: TIMER module_Need() : 0.929 ms - Total 0.929 ms / 1 intvls (Avg 0.929 ms)
[00000319] main input debug: `file/xspf-open:///home/glok/.local/share/vlc/ml.xspf' successfully opened
[00000341] main xml debug: looking for xml module: 1 candidate
[00000341] main xml debug: using xml module "xtag"
[00000341] main xml debug: TIMER module_Need() : 0.528 ms - Total 0.528 ms / 1 intvls (Avg 0.528 ms)
[00000326] playlist demux debug: parsed 0 tracks successfully
[00000341] main xml debug: removing module "xtag"
[00000319] main input debug: EOF reached
[00000319] main input debug: control type=1
[00000326] main demux debug: removing module "playlist"
[00000320] main access debug: removing module "access_file"
[00000319] main input debug: TIMER input launching for 'Media Library' : 7.839 ms - Total 7.839 ms / 1 intvls (Avg 7.839 ms)
[00000343] main preparser debug: thread started
[00000343] main preparser debug: waiting for thread initialization
[00000343] main preparser debug: thread 3074186128 (preparser) created at priority 0 (playlist/thread.c:79)
[00000344] main fetcher debug: thread started
[00000344] main fetcher debug: waiting for thread initialization
[00000344] main fetcher debug: thread 3061500816 (fetcher) created at priority 0 (playlist/thread.c:108)
[00000318] main playlist debug: thread started
[00000318] main playlist debug: waiting for thread initialization
[00000318] main playlist debug: rebuilding array of current - root Playlist
[00000318] main playlist debug: rebuild done - 0 items, index -1
[00000318] main playlist debug: thread 3053108112 (playlist) created at priority 0 (playlist/thread.c:117)
[00000345] main interface debug: looking for interface module: 1 candidate
[00000345] http interface debug: base :8080
[00000345] main interface: creating httpd
[00000345] main interface debug: net: listening to port 8080
[00000345] main interface error: socket bind error (Permission denied)
[00000345] main interface error: socket bind error (Permission denied)
[00000345] main interface error: cannot create socket(s) for HTTP host
[00000348] main http server debug: waitpipe: object killed
[00000345] http interface error: cannot listen on :8080
[00000345] main interface warning: no interface module matching "http,none" could be loaded
[00000345] main interface debug: TIMER module_Need() : 2.584 ms - Total 2.584 ms / 1 intvls (Avg 2.584 ms)
[00000345] main interface error: no suitable interface module
[00000001] main libvlc error: interface "http,none" initialization failed
[00000349] main interface debug: looking for interface module: 1 candidate
[00000349] main interface debug: using interface module "hotkeys"
[00000349] main interface debug: TIMER module_Need() : 0.561 ms - Total 0.561 ms / 1 intvls (Avg 0.561 ms)
[00000349] main interface debug: thread started
[00000349] main interface debug: thread 3044715408 (interface) created at priority 0 (interface/interface.c:168)
[00000351] main interface debug: looking for interface module: 1 candidate
[00000351] main interface debug: using interface module "inhibit"
[00000351] main interface debug: TIMER module_Need() : 26.670 ms - Total 26.670 ms / 1 intvls (Avg 26.670 ms)
[00000351] main interface debug: thread started
[00000351] main interface debug: thread 3036322704 (interface) created at priority 0 (interface/interface.c:168)
[00000353] main interface debug: looking for interface module: 1 candidate
[00000353] main interface debug: using interface module "screensaver"
[00000353] main interface debug: TIMER module_Need() : 0.926 ms - Total 0.926 ms / 1 intvls (Avg 0.926 ms)
[00000353] main interface debug: thread started
[00000353] main interface debug: thread 3027930000 (interface) created at priority 0 (interface/interface.c:168)
[00000318] main playlist debug: adding item `video1' ( /dev/video1 )
[00000318] main playlist debug: rebuilding array of current - root Playlist
[00000318] main playlist debug: rebuild done - 1 items, index -1
[00000318] main playlist debug: adding item `4vl2://' ( 4vl2:// )
[00000355] main interface debug: looking for interface module: 19 candidates
[00000355] main interface debug: using interface module "signals"
[00000355] main interface debug: TIMER module_Need() : 1.090 ms - Total 1.090 ms / 1 intvls (Avg 1.090 ms)
[00000355] main interface debug: thread started
[00000355] main interface debug: thread 3011144592 (interface) created at priority 0 (interface/interface.c:168)
[00000001] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[00000357] main interface debug: looking for interface module: 3 candidates
[00000357] main interface debug: using interface module "qt4"
[00000357] main interface debug: TIMER module_Need() : 96.766 ms - Total 96.766 ms / 1 intvls (Avg 96.766 ms)
[00000357] main interface debug: thread started
[00000357] main interface debug: thread 2990541712 (interface) created at priority 0 (interface/interface.c:168)
[00000318] main playlist debug: rebuilding array of current - root Playlist
[00000318] main playlist debug: rebuild done - 2 items, index -1
[00000318] main playlist debug: starting new item
[00000318] main playlist debug: processing request item null node Playlist skip 0
[00000318] main playlist debug: creating new input thread
[00000360] main input debug: Creating an input for '4vl2://'
[00000360] main input debug: thread started
[00000360] main input debug: waiting for thread initialization
[00000360] main input debug: `4vl2://' gives access `4vl2' demux `' path `'
[00000360] main input debug: creating demux: access='4vl2' demux='' path=''
[00000361] main demux debug: looking for access_demux module: 0 candidates
[00000361] main demux warning: no access_demux module matched "4vl2"
[00000361] main demux debug: TIMER module_Need() : 0.273 ms - Total 0.273 ms / 1 intvls (Avg 0.273 ms)
[00000360] main input debug: creating access '4vl2' path=''
[00000362] main access debug: looking for access module: 0 candidates
[00000362] main access error: no access module matched "4vl2"
[00000362] main access debug: TIMER module_Need() : 0.254 ms - Total 0.254 ms / 1 intvls (Avg 0.254 ms)
[00000360] main input error: open of `4vl2://' failed: could not create access: no access module matched "4vl2"
[00000360] main input debug: thread 2982149008 (input) created at priority 10 (input/input.c:370)
[00000318] main playlist debug: finished input
[00000318] main playlist debug: dying input
[00000318] main playlist debug: dying input
[00000360] main input debug: thread ended
[00000318] main playlist debug: dead input
[00000360] main input debug: thread 2982149008 joined (playlist/engine.c:244)
[00000360] main input debug: TIMER input launching for '4vl2://' : 132.515 ms - Total 132.515 ms / 1 intvls (Avg 132.515 ms)
[00000318] main playlist debug: starting new item
[00000318] main playlist debug: changing item without a request (current 0/2)
[00000318] main playlist debug: using item 1
[00000318] main playlist debug: creating new input thread
[00000363] main input debug: Creating an input for 'video1'
[00000363] main input debug: thread started
[00000363] main input debug: waiting for thread initialization
[00000363] main input debug: `/dev/video1' gives access `' demux `' path `/dev/video1'
[00000363] main input debug: creating demux: access='' demux='' path='/dev/video1'
[00000364] main demux debug: looking for access_demux module: 1 candidate
[00000364] main demux debug: TIMER module_Need() : 2.501 ms - Total 2.501 ms / 1 intvls (Avg 2.501 ms)
[00000363] main input debug: creating access '' path='/dev/video1'
[00000367] main access debug: looking for access module: 5 candidates
[00000367] vcd access error: could not read TOCHDR
[00000367] vcd access error: no movie tracks found
[00000367] access_file access debug: opening file `/dev/video1'
[00000367] main access debug: using access module "access_file"
[00000367] main access debug: TIMER module_Need() : 1.987 ms - Total 1.987 ms / 1 intvls (Avg 1.987 ms)
[00000369] main stream debug: Using AStream*Stream
[00000369] main stream debug: pre-buffering...
[00000367] access_file access error: read failed (No such device)
[00000369] main stream error: cannot pre fill buffer
[00000363] main input warning: cannot create a stream_t from access
[00000367] main access debug: removing module "access_file"
[00000367] main access debug: waitpipe: object killed
[00000363] main input debug: thread 2982149008 (input) created at priority 10 (input/input.c:370)
[00000318] main playlist debug: finished input
[00000318] main playlist debug: dying input
[00000318] main playlist debug: dying input
[00000363] main input debug: thread ended
[00000318] main playlist debug: dead input
[00000363] main input debug: thread 2982149008 joined (playlist/engine.c:244)
[00000363] main input debug: TIMER input launching for 'video1' : 135.993 ms - Total 135.993 ms / 1 intvls (Avg 135.993 ms)
[00000318] main playlist debug: starting new item
[00000318] main playlist debug: changing item without a request (current 1/2)
[00000318] main playlist debug: nothing to play
[00000357] qt4 interface debug: Error while initializing qt-specific localization

glok_twen
Blank Cone
Blank Cone
Posts: 11
Joined: 25 Feb 2009 05:27

Re: [solved] accessing 2 different web cams on the same pc

Postby glok_twen » 27 Feb 2009 16:06

got this working with the following command and vlm config file. thanks to all who read/helped.

command:
vlc -I http --vlm-conf vlm1.conf

vlm configuration file:

new channel1 broadcast enabled
setup channel1 input v4l2:///dev/video0:norm=secam:frequency=543250:size=640x480:channel=0:adev=/dev/video0:audio=0
setup channel1 output #transcode{vcodec=mp4v,vb=800,scale=1,acodec=mp4a,ab=128,channels=2}:standard{access=http,mux=ogg,dst=192.168.1.5:1234}

new channel2 broadcast enabled
setup channel2 input v4l2:///dev/video1:norm=secam:frequency=543250:size=640x480:channel=0:adev=/dev/video1:audio=0
setup channel2 output #transcode{vcodec=mp4v,vb=800,scale=1,acodec=mp4a,ab=128,channels=2}:standard{access=http,mux=ogg,dst=192.168.1.5:1235}

control channel1 play
control channel2 play

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: [solved] accessing 2 different web cams on the same pc

Postby Jean-Baptiste Kempf » 27 Feb 2009 16:14

What did you changed?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

glok_twen
Blank Cone
Blank Cone
Posts: 11
Joined: 25 Feb 2009 05:27

Re: [solved] accessing 2 different web cams on the same pc

Postby glok_twen » 27 Feb 2009 17:37

it boiled down to what xtophe said, that v4l2 needed to be followed by 3 slashes. i had originally used only 2. so when i went to v4l2:///dev/vid... it worked.

i had also made some typos along the way. the bottom line of what works though is posted in my previous post in case others find it useful.


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 28 guests