LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   webcam streaming from virtual machine (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/webcam-streaming-from-virtual-machine-761952/)

muad'dib 10-14-2009 08:01 PM

webcam streaming from virtual machine
 
I'm running an Orb server in a virtual machine on my media server which is running Fedora 10. I have to use Fedora 10 because I'm running the Amahi server.

So in Fedora 10, I've been trying to get webcam streaming - via the Orb server - working.

So far the best result I've had was by installing Parallels and creating a Windows 7 virtual machine. The VM has to be Windows because Orb isn't available for Linux.

In the VM I created with Parallels, I can assign the webcam ith no problem and actually see the video when I load the Logitech application.

But Orb can't stream the video. The remote PC displays an error about the device being use, bad codec, etc.

Orb does stream the video if I use a real Win7 computer, but the whole idea here is to save on electrical costs.

Any suggestions? Like maybe disconnecting the webcam from Fedora somehow?

Help or suggestions are appreciated.

Tinkster 10-14-2009 08:40 PM

Something I've been doing (running windows and other linux VMs under VM Server
on Slackware) is to unload the modules for the devices forcefully on the host
to give the VM sole access. Works well for external HDDs, Nokia cell-phones, ...


Cheers,
Tink

dyasny 10-15-2009 07:38 AM

there's an interesting project for this:
usbip.sourceforge.com

muad'dib 10-15-2009 01:50 PM

Quote:

Originally Posted by Tinkster (Post 3719572)
Something I've been doing (running windows and other linux VMs under VM Server
on Slackware) is to unload the modules for the devices forcefully on the host
to give the VM sole access. Works well for external HDDs, Nokia cell-phones, ...


Cheers,
Tink

That's what I was thinking, but more specifically, I don't know how to determine which (loaded) modules are used by the webcam in Fedora.

Tinkster 10-15-2009 02:51 PM

Post the output of lsmod ;}

Or you post the exact make and model of the cam, and hope someone
a) has the same thing or b) is keen to go through the kernel driver
docu to find its name for you.



Cheers,
Tink

muad'dib 10-15-2009 09:17 PM

Camera is a Logitech C-120

Here is lsmod output -

Module Size Used by
uvcvideo 62344 0
compat_ioctl32 16512 1 uvcvideo
videodev 40704 2 uvcvideo,compat_ioctl32
vmnet 48452 3
parport_pc 34200 0
vsock 30224 0
vmci 56456 1 vsock
vmmon 75696 0
snd_usb_audio 100480 0
snd_seq_dummy 11396 0
snd_seq_oss 39232 0
snd_seq_midi_event 14848 1 snd_seq_oss
snd_seq 61968 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_pcm_oss 52352 0
snd_mixer_oss 23168 1 snd_pcm_oss
snd_pcm 85768 2 snd_usb_audio,snd_pcm_oss
snd_timer 30352 2 snd_seq,snd_pcm
snd_page_alloc 16656 1 snd_pcm
snd_usb_lib 24576 1 snd_usb_audio
snd_rawmidi 30848 1 snd_usb_lib
snd_seq_device 15380 4 snd_seq_dummy,snd_seq_oss,snd_seq,snd_rawmidi
snd_hwdep 16392 1 snd_usb_audio
v4l1_compat 21380 2 uvcvideo,videodev
snd 68984 12 snd_usb_audio,snd_seq_dummy,snd_seq_oss,snd_seq,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_usb_ lib,snd_rawmidi,snd_seq_device,snd_hwdep
soundcore 14992 1 snd
fuse 60992 2
nfsd 253160 17
lockd 72160 1 nfsd
nfs_acl 11264 1 nfsd
auth_rpcgss 45968 1 nfsd
exportfs 12672 1 nfsd
sco 19204 2
bridge 56352 0
stp 10756 1 bridge
bnep 21888 2
l2cap 28672 3 bnep
bluetooth 60196 5 sco,bnep,l2cap
ppdev 15752 0
parport 42912 2 parport_pc,ppdev
ipt_MASQUERADE 11264 1
iptable_nat 13840 1
nf_nat 25496 2 ipt_MASQUERADE,iptable_nat
tun 19716 1
sunrpc 191592 14 nfsd,lockd,nfs_acl,auth_rpcgss
ip6t_REJECT 12160 2
nf_conntrack_ipv6 22984 2
ip6table_filter 11136 1
ip6_tables 26128 1 ip6table_filter
ipv6 287912 82 ip6t_REJECT,nf_conntrack_ipv6
cpufreq_ondemand 15504 2
acpi_cpufreq 17552 0
freq_table 12928 2 cpufreq_ondemand,acpi_cpufreq
xfs 472304 1
dm_multipath 23832 0
vboxnetflt 94684 0
vboxdrv 1689724 2 vboxnetflt
uinput 16128 0
iTCO_wdt 20176 0
arcmsr 31744 1
iTCO_vendor_support 11652 1 iTCO_wdt
shpchp 38300 0
tg3 122372 0
joydev 19328 0
i2c_i801 17820 0
i2c_core 29216 1 i2c_i801
libphy 25600 1 tg3
pcspkr 11008 0
serio_raw 14084 0
ata_generic 13956 0
pata_acpi 13056 0

dyasny 10-16-2009 05:55 AM

btw, Redhat's RHEV project supports USB redirection in the VDI variant of the system

Tinkster 10-16-2009 04:21 PM

Quote:

Originally Posted by muad'dib (Post 3721013)
Camera is a Logitech C-120

Here is lsmod output -
Code:

Module                  Size  Used by
uvcvideo              62344  0
compat_ioctl32        16512  1 uvcvideo
videodev              40704  2 uvcvideo,compat_ioctl32

vmnet                  48452  3
parport_pc            34200  0
vsock                  30224  0
vmci                  56456  1 vsock
vmmon                  75696  0
snd_usb_audio        100480  0
snd_seq_dummy          11396  0
snd_seq_oss            39232  0
snd_seq_midi_event    14848  1 snd_seq_oss
snd_seq                61968  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_pcm_oss            52352  0
snd_mixer_oss          23168  1 snd_pcm_oss
snd_pcm                85768  2 snd_usb_audio,snd_pcm_oss
snd_timer              30352  2 snd_seq,snd_pcm
snd_page_alloc        16656  1 snd_pcm
snd_usb_lib            24576  1 snd_usb_audio
snd_rawmidi            30848  1 snd_usb_lib
snd_seq_device        15380  4 snd_seq_dummy,snd_seq_oss,snd_seq,snd_rawmidi
snd_hwdep              16392  1 snd_usb_audio
v4l1_compat            21380  2 uvcvideo,videodev
snd                    68984  12 snd_usb_audio,snd_seq_dummy,snd_seq_oss,snd_seq,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_usb_lib,snd_rawmidi,snd_seq_device,snd_hwdep
soundcore              14992  1 snd
fuse                  60992  2
nfsd                  253160  17
lockd                  72160  1 nfsd
nfs_acl                11264  1 nfsd
auth_rpcgss            45968  1 nfsd
exportfs              12672  1 nfsd
sco                    19204  2
bridge                56352  0
stp                    10756  1 bridge
bnep                  21888  2
l2cap                  28672  3 bnep
bluetooth              60196  5 sco,bnep,l2cap
ppdev                  15752  0
parport                42912  2 parport_pc,ppdev
ipt_MASQUERADE        11264  1
iptable_nat            13840  1
nf_nat                25496  2 ipt_MASQUERADE,iptable_nat
tun                    19716  1
sunrpc                191592  14 nfsd,lockd,nfs_acl,auth_rpcgss
ip6t_REJECT            12160  2
nf_conntrack_ipv6      22984  2
ip6table_filter        11136  1
ip6_tables            26128  1 ip6table_filter
ipv6                  287912  82 ip6t_REJECT,nf_conntrack_ipv6
cpufreq_ondemand      15504  2
acpi_cpufreq          17552  0
freq_table            12928  2 cpufreq_ondemand,acpi_cpufreq
xfs                  472304  1
dm_multipath          23832  0
vboxnetflt            94684  0
vboxdrv              1689724  2 vboxnetflt
uinput                16128  0
iTCO_wdt              20176  0
arcmsr                31744  1
iTCO_vendor_support    11652  1 iTCO_wdt
shpchp                38300  0
tg3                  122372  0
joydev                19328  0
i2c_i801              17820  0
i2c_core              29216  1 i2c_i801
libphy                25600  1 tg3
pcspkr                11008  0
serio_raw              14084  0
ata_generic            13956  0
pata_acpi              13056  0



Cool ...

Unload the three in red in descending order. If you know
for sure that you'll only ever want the VM to own the device,
add them to your module blacklist (most likely
/etc/modprobe.d/blacklist).


Cheers,
Tink

Edit: P.S.: Next time please put the output of commands in code tags.
Makes it so much more readable.

muad'dib 10-17-2009 01:32 PM

That did the trick. Thanks! Sorry about not using the code thing.

muad'dib 10-19-2009 11:40 AM

Followup - killing the 3 modules allowed the Logitech application to see the video, prior to that it was locking up.

The Orb server however is still unable to get control of the camera.

The camera shows up in the virtual machine's guest-OS Windows7 device manager.

The Orb software can control a video camera on a real Wiondows7 box, what would be different about a virtual machine?


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