Motion - Bug Report 2007x 01x 17x 201031
You are here: Foswiki>Motion Web>BugReports>BugReport2007x01x17x201031 (24 Jan 2007, AngelCarpintero)Edit Attach

BUG: vloopback-hwscan

I got vloopback loaded (via modprobe vloopback). Then I started resize: nohup resize /dev/video0 /dev/video1 320x240 320x240 yuv420p &> /dev/null &

After that "xawtv -c /dev/video2" works.

But "xawtv -hwscan" hangs. It goes through only if resize is killed.

Does vloopback interfere with "-hwscan" ?

# resize is not running
$ xawtv -hwscan
This is xawtv-3.95, running on Linux/i686 (2.6.17-5mdv)
looking for available devices
port 73-73
    type : Xvideo, image scaler
    name : Intel(R) Video Overlay

/dev/video0: OK                         [ -device /dev/video0 ]
    type : v4l
    name : OV518 USB Camera
    flags:  capture

ioctl: VIDIOC_QUERYCAP(driver="";card="";bus_info="";version=0.0.0;capabilities=0x0 []): Unknown error 515
/dev/video1: OK                         [ -device /dev/video1 ]
    type : v4l
    name : Video loopback 0 input
    flags:

/dev/video2: Invalid argument

# now start resize
$ resize /dev/video0 /dev/video1 320x240 320x240 yuv420p
Starting video stream.

#########################################################
# In a different shell

# /dev/video2 now works
$ xawtv -c /dev/video2
This is xawtv-3.95, running on Linux/i686 (2.6.17-5mdv)
/dev/video2 [v4l]: no overlay support
v4l-conf had some trouble, trying to continue anyway
ioctl: VIDIOC_QUERYCAP(driver="";card="";bus_info="";version=0.0.0;capabilities=0x0 []): Unknown error 515
libGL warning: 3D driver claims to not support visual 0x4b
libGL warning: 3D driver claims to not support visual 0x23
libGL warning: 3D driver claims to not support visual 0x25
libGL warning: 3D driver claims to not support visual 0x27
libGL warning: 3D driver claims to not support visual 0x29
libGL warning: 3D driver claims to not support visual 0x2b
libGL warning: 3D driver claims to not support visual 0x2d
libGL warning: 3D driver claims to not support visual 0x2f
libGL warning: 3D driver claims to not support visual 0x31
ioctl: VIDIOCMCAPTURE(frame=0;height=20;width=20;format=7): Invalid argument

# but this hangs
$ xawtv -hwscan
This is xawtv-3.95, running on Linux/i686 (2.6.17-5mdv)
looking for available devices
port 73-73
    type : Xvideo, image scaler
    name : Intel(R) Video Overlay

##########  now killed resize ###############
# resumes after resize is killed

/dev/video0: OK                         [ -device /dev/video0 ]
    type : v4l
    name : OV518 USB Camera
    flags:  capture

ioctl: VIDIOC_QUERYCAP(driver="";card="";bus_info="";version=0.0.0;capabilities=0x0 []): Unknown error 515
/dev/video1: OK                         [ -device /dev/video1 ]
    type : v4l
    name : Video loopback 0 input
    flags:

/dev/video2: Invalid argument

Environment

Motion version:  
ffmpeg version: 0.4.9-3.pre1
Shared libraries:  
Server OS: Mandriva 2007, kernel 2.6.17-5mdv

-- ChittaMandal - 17 Jan 2007

Follow up

Fix record

vloopback doesn't support V4L2 only V4L.

ioctl: VIDIOC_QUERYCAP(driver="";card="";bus_info="";version=0.0.0;capabilities=0x0 []): Unknown error 515

That ioctl is only for V4L2 , so i have change vloopback error when a ioctl is not supported. Changed -ENOIOCTLCMD by more appropiate error -ENOTTY.

Moreover vloopback doesn't support to be open/access by more that 1 process at same time, so if it's already open you will experience undefined result.

Correction : vloopback can be opened by many application but without using exclusive mode.

And last i don't know how hwscan works , but maybe will use some V4L2 call that is not working fine with vloopback.

So i know that vloopback need to be ported to V4L2 , but i have not time , you can take a look to vivi that is a virtual V4L2 device.

-- AngelCarpintero - 18 Jan 2007
Topic revision: r3 - 24 Jan 2007, AngelCarpintero
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.