Motion - Support Question 2009x 09x 22x 024940

Could not fetch initial image from camera -- no driver info is given.

Question

I can't get an image, I just get the all-too-familiar grey box. However, I see that other people get output like

[1] cap.driver: "saa7134" [1] cap.card: "UNKNOWN/GENERIC"

... But I don't even get this much.

I'm using input 3; 0 is tv, 1 is mono tv, 2 is input 1, 3 is input 2, that's where the camera is.

Anyway, I'm using 2.6.31-gentoo #1 SMP x86_64 and the card works perfectly with zapping, so I can't understand why the silly thing won't work with motion.

Motion runs as root, and I've added o+rw to the node just in case, but I'm still not getting anywhere.

Please help!

# LD_PRELOAD=/usr/lib64/libv4l/v4l2convert.so motion -n -d 999
[0] Processing thread 0 - config file /etc/motion.conf
[0] Motion 3.2.11 Started       
[0] ffmpeg LIBAVCODEC_BUILD 3412992 LIBAVFORMAT_BUILD 3415808
[0] Thread 1 is from /etc/motion.conf
[0] Thread 1 is device: /dev/video0 input 3
[0] Webcam port 8081            
[0] motion-httpd/3.2.11 running, accepting connections
[0] motion-httpd: waiting for data on port TCP 8080
[1] Thread 1 started            
[1] You must setup netcam_url   
[1] Could not fetch initial image from camera
[1] Motion continues using width and height from config file(s)
[1] Resizing pre_capture buffer to 1 items
[0] Waiting for threads to finish, pid: 7477
[1] Started stream webcam server in port 8081
[1] Resizing pre_capture buffer to 3 items
[1] Retrying until successful connection with camera

Environment

Motion version: 3.2.11
ffmpeg version: 0.5
Libraries: ffmpeg
Server OS: Gentoo

-- DanielRose - 22 Sep 2009

Follow Up

Did you compile motion ? Looks that is compiled without video for linux support .

Get lastest stable and compile :

./configure ; make ; make install ; ./motion -c /etc/motion.conf

-- AngelCarpintero - 22 Sep 2009

Answer

On Gentoo, if you emerge motion from portage (instead of downloading the source and compiling it yourself) the v4l and v4l2 support is off by default. You can enable it ( and ffmpeg in this example to get avi/swf style support) by adding the use flags for v4l and ffmpeg. Here's one way to set the use flags: (see gentoo documentation on use flags for more info)

pizzacorn ~ # cat /etc/portage/package.use
media-video/motion      v4l ffmpeg

note that the v4l use flag turns on v4l and v4l2 in motion


Notice about this message in logs :
You must setup netcam_url

It means you are running motion without v4l/v4l2 support , it's a emerge / gentoo issue.

Cheers,

-- AngelCarpintero - 15 Nov 2009
Topic revision: r4 - 15 Nov 2009, 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.