Error capturing first image
Question
Running the motion against the avermedia DVD EZMaker card (saa7130) doesn't produce any output. Furthermore it comes out with the "Error capturing first image". This is happening after an upgrade of ubuntu edgy -> Hardy and motion 3.2.7 to the 3.2.10 (the lates ubuntu package on this site).
With the previous config file, motion had failed right after the error messages, now however, is keep running, without producing any video output. Guess that there is something wrong in between the driver and v4l2...
Here is the motion output :
Starting motion detection : motion
[0] Processing thread 0 - config file /etc/motion/motion.conf
[0] Unknown config option "night_compensate"
[0] Unknown config option "low_cpu"
[0] Unknown config option "sql_log_image"
[0] Unknown config option "sql_log_snapshot"
[0] Unknown config option "sql_log_mpeg"
[0] Unknown config option "sql_log_timelapse"
[0] Unknown config option "sql_query"
[0] Motion 3.2.10.1 Started
[0] ffmpeg LIBAVCODEC_BUILD 3352064 LIBAVFORMAT_BUILD 3344896
[0] Motion running in setup mode.
[0] Thread 1 is from /etc/motion/motion.conf
[0] Thread 1 is device: /dev/video0 input 0
[0] Webcam port 8081
[1] Thread 1 started
[1] cap.driver: "saa7134"
[1] cap.card: "AVerMedia DVD EZMaker"
[1] cap.bus_info: "PCI:0000:00:08.0"
[1] cap.capabilities=0x05000015
[1] - VIDEO_CAPTURE
[1] - VIDEO_OVERLAY
[1] - VBI_CAPTURE
[1] - READWRITE
[1] - STREAMING
[1] Supported palettes:
[1] 0: GREY (8 bpp gray)
[1] 1: RGBO (15 bpp RGB, le)
[1] 2: RGBQ (15 bpp RGB, be)
[1] 3: RGBP (16 bpp RGB, le)
[1] 4: RGBR (16 bpp RGB, be)
[1] 5: BGR3 (24 bpp RGB, le)
[1] 6: RGB3 (24 bpp RGB, be)
[1] 7: BGR4 (32 bpp RGB, le)
[1] 8: RGB4 (32 bpp RGB, be)
[1] 9: YUYV (4:2:2 packed, YUYV)
[1] 10: UYVY (4:2:2 packed, UYVY)
[1] 11: 422P (4:2:2 planar, Y-Cb-Cr)
[1] 12: YU12 (4:2:0 planar, Y-Cb-Cr)
[1] Selected palette YU12
[1] index_format 8 Test palette YU12 (320x240)
[1] Using palette YU12 (320x240) bytesperlines 480 sizeimage 115200 colorspace 00000000
[1] found control 0x00980900, "Brightness", range 0,255
[1] "Brightness", default 128, current 49
[1] found control 0x00980901, "Contrast", range 0,127
[1] "Contrast", default 68, current 68
[1] found control 0x00980902, "Saturation", range 0,127
[1] "Saturation", default 64, current 64
[1] found control 0x00980903, "Hue", range -128,127
[1] "Hue", default 0, current 0
[1] found control 0x00000000, "42", range 0,0 !DISABLED!
[1] "42", default 0, current 0
[1] found control 0x00000000, "42", range 0,0 !DISABLED!
[1] "42", default 0, current 0
[1] found control 0x00000000, "42", range 0,0 !DISABLED!
[1] "42", default 0, current 0
[1] found control 0x00000000, "42", range 0,0 !DISABLED!
[1] "42", default 0, current 0
[1] found control 0x00000000, "42", range 0,0 !DISABLED!
[1] "42", default 0, current 0
[1] found control 0x00000000, "42", range 0,0 !DISABLED!
[1] "42", default 0, current 0
[1] found control 0x08000000, "Invert", range 0,1
[1] "Invert", default 0, current 0
[1] found control 0x08000001, "y offset odd field", range 0,128
[1] "y offset odd field", default 0, current 0
[1] mmap information:
[1] frames=4
[1] 0 length=118784
[1] 1 length=118784
[1] 2 length=118784
[1] 3 length=118784
[1] Using V4L2
[1] Resizing pre_capture buffer to 1 items
[0] motion-httpd/3.2.10.1 running, accepting connections
[0] motion-httpd: waiting for data on port TCP 8080
[0] Waiting for threads to finish, pid: 23584
[1] v4l2_next: VIDIOC_DQBUF: EIO (s->pframe 0)
[1] v4l2_next: VIDIOC_DQBUF: EIO (s->pframe 1)
[1] v4l2_next: VIDIOC_DQBUF: EIO (s->pframe 2)
[1] v4l2_next: VIDIOC_DQBUF: EIO (s->pframe 3)
[1] v4l2_next: VIDIOC_DQBUF: EIO (s->pframe 0)
[1] Error capturing first image
[1] Started stream webcam server in port 8081
[1] v4l2_next: VIDIOC_DQBUF: EIO (s->pframe 1)
[1] Raw changes: 0 - changes after 'EedDl': 0 - labels: 0 - noise level: 21
[1] v4l2_next: VIDIOC_DQBUF: EIO (s->pframe 2)
[1] Raw changes: 0 - changes after 'EedDl': 0 - labels: 0 - noise level: 16
[1] v4l2_next: VIDIOC_DQBUF: EIO (s->pframe 3)
[1] Raw changes: 0 - changes after 'EedDl': 0 - labels: 0 - noise level: 16
[1] v4l2_next: VIDIOC_DQBUF: EIO (s->pframe 0)
[1] End of event 1
[1] Raw changes: 0 - changes after 'EedDl': 0 - labels: 0 - noise level: 13
[0] httpd - Finishing
[0] httpd Closing
[0] httpd thread exit
[1] Thread exiting
[1] Closing webcam listen socket
[1] Closing active webcam sockets
[1] Calling vid_close() from motion_cleanup
[1] Closing video device /dev/video0
[0] Threads finished
[0] Motion terminating
here is the config file :
daemon off
process_id_file /var/run/motion.pid
setup_mode on
videodevice /dev/video0
input 0
norm 0
frequency 0
rotate 0
width 320
height 240
framerate 2
minimum_frame_time 0
auto_brightness off
brightness 0
contrast 0
saturation 0
hue 0
roundrobin_frames 1
roundrobin_skip 1
switchfilter off
threshold 1500
threshold_tune off
noise_level 32
noise_tune on
night_compensate off
despeckle EedDl
smart_mask_speed 0
lightswitch 0
minimum_motion_frames 1
pre_capture 0
post_capture 0
gap 60
max_mpeg_time 0
low_cpu 0
output_all off
output_normal on
output_motion off
quality 75
ppm off
ffmpeg_cap_new on
ffmpeg_cap_motion off
ffmpeg_timelapse 0
ffmpeg_timelapse_mode daily
ffmpeg_bps 500000
ffmpeg_variable_bitrate 0
ffmpeg_video_codec swf
ffmpeg_deinterlace off
snapshot_interval 0
locate off
text_right %Y-%m-%d\n%T-%q
text_changes off
text_event %Y%m%d%H%M%S
text_double off
target_dir /survilance_video
snapshot_filename %v-%Y%m%d%H%M%S-snapshot
jpeg_filename cam0/images/%Y-%m-%d/%Y-%m-%d-%T
movie_filename cam0/video/%Y-%m-%d/%Y-%m-%d-%T
timelapse_filename cam0/timelapse/%Y-%m-%d/%Y-%m-%d-%T
webcam_port 8081
webcam_quality 50
webcam_motion off
webcam_maxrate 1
webcam_localhost off
webcam_limit 0
control_port 8080
control_localhost off
control_html_output on
track_type 0
track_auto off
track_motorx -1
track_motory -1
track_maxx 0
track_maxy 0
track_iomojo_id 0
track_step_angle_x 10
track_step_angle_y 10
track_move_wait 10
track_speed 255
track_stepsize 40
quiet on
lspci :
00:08.0 Multimedia controller: Philips Semiconductors SAA7130 Video Broadcast Decoder (rev 01)
and lsmod | grep saa
saa7134_alsa 15424 0
snd_pcm 78596 5 snd_via82xx,snd_ac97_codec,saa7134_alsa,snd_pcm_oss
saa7134 131920 1 saa7134_alsa
compat_ioctl32 2304 1 saa7134
videobuf_dma_sg 14980 2 saa7134_alsa,saa7134
videobuf_core 18820 2 saa7134,videobuf_dma_sg
ir_kbd_i2c 10768 1 saa7134
ir_common 36100 2 saa7134,ir_kbd_i2c
videodev 29440 1 saa7134
v4l2_common 18304 2 saa7134,videodev
v4l1_compat 15492 2 saa7134,videodev
i2c_core 24832 3 saa7134,ir_kbd_i2c,i2c_viapro
snd 56996 20 snd_via82xx,snd_ac97_codec,snd_mpu401_uart,snd_seq_dummy,saa7134_alsa,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
Environment
Motion version: |
3.2.10.1 |
ffmpeg version: |
3:0.cvs20070307-5ubuntu7 |
Libraries: |
ffmpeg |
Server OS: |
Ubuntu 8.04 Hardy Heron, kernel 2.6.24-19-generic |
--
PavelTaboracek - 01 Jul 2008
Answer
Please try to reproduce this problem with other video application , or tell me what applications did you test with your capture card .
Note : There's some issue with that chip and IRQ , this could be your problem .
--
AngelCarpintero - 01 Jul 2008
Well, the xawtv works just fine, on the other hand, I didn't manage zoneminder to see any image from the camera either. If you mean capturing=recording video from the camera, Do you have any tip on sw to go with? As I said preiously, the setup worked just fine (only 2fps tough) with Motion 327 and ubuntu edgy. Back then I had reported a problem capturing video with v4l2, but then I defered it since 2fps was okay. So if you search the support DB for my other entry, It might give you some clues as well.
Also, where did you figure out there is a problem with that chip? Is it like a known bug or something?
Thank you
--
PavelTaboracek - 03 Jul 2008
Pavel could you get all boot messages ( bttv load , chip , etc ) , also how are you loading the module , because it's not working with v4l2 with some reason
so maybe that could give me a clue.
--
AngelCarpintero - 04 Jul 2008
Sure, I'm going to be around the PC sometime next week (hope on monday). Is full dmesg output enough for you? For the loading the module, I don't particulary know, since it's very much standard installation of kubuntu on that box. So what I acctually guess it's either supported by the kernel directly, or it was somehow detected by the ubuntu installer/upgrade gadget. Definetely the module isnt loaded anyhow manually, and it wasn't even manually setup. I'll collect some more info about the box.
--
PavelTaboracek - 04 Jul 2008
No feedback. Reopen if still problem remains with latest version.
--
AngelCarpintero - 09 Aug 2009
--
AngelCarpintero - 09 Aug 2009