Motion - Support Question 2008x 01x 11x 125213

FreeBSD: vid_start error

Question

I'm having trouble getting motion working with the pwcbsd driver on FreeBSD. I've installed the latest versions of both (as of today) from the ports tree. The pwc driver seems to be working fine - I can use pwcview to view the output from the cameras. Motion is compiled without the bktr option, and generates an error about vid_start on loading (see below).

Any advice would be much appreciated.

viper# motion -n -d 1 -c /usr/local/etc/motion/motion.conf
[0] Processing thread 0 - config file /usr/local/etc/motion/motion.conf
[0] Processing config file /usr/local/etc/motion/cam0.conf
[0] Processing config file /usr/local/etc/motion/cam1.conf
[0] Processing config file /usr/local/etc/motion/cam2.conf
[0] Processing config file /usr/local/etc/motion/cam3.conf
[0] Motion 3.2.9 Started
[0] ffmpeg LIBAVCODEC_BUILD 3353600 LIBAVFORMAT_BUILD 3345920
[0] Thread 1 is from /usr/local/etc/motion/cam0.conf
[0] Thread 2 is from /usr/local/etc/motion/cam1.conf
[0] Thread 3 is from /usr/local/etc/motion/cam2.conf
[0] Thread 4 is from /usr/local/etc/motion/cam3.conf
[1] Thread 1 started
[1] Capture error calling vid_start
[1] Thread finishing...

Environment

Motion version: 3.2.9
ffmpeg version: ffmpeg-2007.10.04_1
Libraries: ffmpeg
Server OS: FreeBSD 6.2-RELEASE-p9

-- TimBishop - 11 Jan 2008

Follow up

Hi Tim,

i didn't include PWC support patch in port,

http://www.lavrsen.dk/twiki/bin/view/Motion/HowtoMotionPwcFreeBSD

Let me update PWC patch to let work against 3.2.9 port.

-- AngelCarpintero - 11 Jan 2008


Hi Angel,

I did what you suggested and applied that patch, but it still does exactly the same thing.

-- TimBishop - 14 Jan 2008


Tim , please get the new version of the patch . It's more verbose to see where could be the problem, moreover i added a patch to fix a ffmpeg issue.

Here it's an output example using 2 pwc compatible cameras.

[0] Processing thread 0 - config file /usr/local/etc/motion.conf
[0] Processing config file /usr/local/etc/webcam1.conf
[0] Processing config file /usr/local/etc/webcam2.conf
[0] Motion 3.2.9_pwc Started
[0] ffmpeg LIBAVCODEC_BUILD 3353600 LIBAVFORMAT_BUILD 3345920
[0] Thread 1 is from /usr/local/etc/webcam1.conf
[0] Thread 2 is from /usr/local/etc/webcam2.conf
[1] Thread 1 started
[1] vid_v4lx_start videodevice /dev/video0
[2] Thread 2 started
[2] vid_v4lx_start videodevice /dev/video1
[0] motion-httpd/3.2.9_pwc running, accepting connections
[0] motion-httpd: waiting for data on port TCP 8080
[1] Using VIDEO_PALETTE_YUV420P palette
[1] Using V4L1
[2] Using VIDEO_PALETTE_YUV420P palette
[2] Using V4L1
[1] Started stream webcam server in port 8083
[2] Started stream webcam server in port 8084 

-- AngelCarpintero - 15 Jan 2008

It still doesn't work for me. And nothing useful in the output. It makes me wonder if I'm doing something stupid, but I don't see what it could be...

Here's the output:
%motion -d 9 -n -c /usr/local/etc/motion/motion.conf
[0] Processing thread 0 - config file /usr/local/etc/motion/motion.conf
[0] Processing config file /usr/local/etc/motion/cam0.conf
[0] Processing config file /usr/local/etc/motion/cam1.conf
[0] Processing config file /usr/local/etc/motion/cam2.conf
[0] Processing config file /usr/local/etc/motion/cam3.conf
[0] Motion 3.2.9_pwc Started
[0] ffmpeg LIBAVCODEC_BUILD 3353600 LIBAVFORMAT_BUILD 3345920
[0] Thread 1 is from /usr/local/etc/motion/cam0.conf
[0] Thread 2 is from /usr/local/etc/motion/cam1.conf
[0] Thread 3 is from /usr/local/etc/motion/cam2.conf
[0] Thread 4 is from /usr/local/etc/motion/cam3.conf
[2] Thread 2 started
[4] Thread 4 started
[1] Thread 1 started
[2] Capture error calling vid_start
[2] Thread finishing...
[3] Thread 3 started
[4] Capture error calling vid_start
[4] Thread finishing...

The cameras are detected fine:
pwc0: vendor 0x0471 product 0x0312, rev 1.10/0.03, addr 2
pwc0: Philips PCVC750K (ToUCam Pro Scan) USB webcam
pwc0: This camera is equipped with a Sony CCD sensor + TDA8787 (32)
pwc1: vendor 0x0471 product 0x0311, rev 1.10/0.03, addr 3
pwc1: Philips PCVC740K (ToUCam Pro)/PCVC840 (ToUCam II) USB webcam
pwc1: This camera is equipped with a Sony CCD sensor + TDA8787 (32)
pwc2: vendor 0x046d product 0x08b4, rev 1.10/0.03, addr 2
pwc2: Logitech QuickCam Zoom (new model) USB webcam
pwc2: This camera is equipped with a unknown type of sensor (96)
pwc3: vendor 0x046d product 0x08b4, rev 1.10/0.03, addr 3
pwc3: Logitech QuickCam Zoom (new model) USB webcam
pwc3: This camera is equipped with a unknown type of sensor (96)

I don't think there's anything odd in my config either. I'll attach a diff if I can.

Any more thoughts?

-- TimBishop - 15 Jan 2008

Ok, I got it. I looked at the vid_start function and noticed it doesn't do anything if WITHOUT_V4L is defined. The port Makefile defines WITHOUT_V4L if you don't have the BKTR option selected (which I didn't). Having selected BKTR it now works fine.

Thanks for the help.

-- TimBishop - 15 Jan 2008

Answer

Updated HowtoMotionPwcFreeBSD with a patch against current FreeBSD port.

-- AngelCarpintero - 13 Jan 2008
Topic revision: r9 - 15 Jan 2008, 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.