Question
Is the P207 palette unsupported? motion -n 3.2.11 segfaults after being unable to connect to the device. The kernel is gentoo-2.6.28
[0] Processing thread 0 - config file /etc/motion.conf
[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.11 Started
[0] ffmpeg LIBAVCODEC_BUILD 3409664 LIBAVFORMAT_BUILD 3413761
[0] Thread 1 is from /etc/motion.conf
[1] Thread 1 started
[1] cap.driver: "pac207"
[1] cap.card: "CIF Single Chip "
[1] cap.bus_info: "0000:00:1d.7"
[1] cap.capabilities=0x05000001
[1] - VIDEO_CAPTURE
[1] - READWRITE
[1] - STREAMING
[1] Supported palettes:
[1] 0: P207 (P207)
[1] Unable to find a compatible palette format.
[0] motion-httpd/3.2.11 running, accepting connections
[0] motion-httpd: waiting for data on port TCP 8080
[1] Using VIDEO_PALETTE_YUV420P palette
[1] Using V4L1
[1] Resizing pre_capture buffer to 1 items
[1] Started stream webcam server in port 8081
[1] sync error in proc 5785: Invalid argument
[1] mcapture error in proc 5785: Invalid argument
[1] Video device fatal error - Closing video device
[1] Closing video device /dev/video0
[1] Codec not found: Invalid argument
[1] ffopen_open error creating (new) file [/usr/local/apache2/htdocs/cam1/01-20090120195416.avi]: Invalid argument
[1] File of type 1 saved to: /usr/local/apache2/htdocs/cam1/01-20090120195416-01.jpg
[1] Thread exiting
[0] Motion thread 1 restart
[1] Thread 1 started
[1] cap.driver: "pac207"
[1] cap.card: "CIF Single Chip "
[1] cap.bus_info: "0000:00:1d.7"
[1] cap.capabilities=0x05000001
[1] - VIDEO_CAPTURE
[1] - READWRITE
[1] - STREAMING
[1] Supported palettes:
[1] 0: P207 (P207)
[1] Unable to find a compatible palette format.
[1] Using VIDEO_PALETTE_YUV420P palette
[1] Using V4L1
[1] Resizing pre_capture buffer to 1 items
[1] Started stream webcam server in port 8081
[1] sync error in proc 5785: Invalid argument
[1] mcapture error in proc 5785: Invalid argument
[1] Video device fatal error - Closing video device
[1] Closing video device /dev/video0
[1] Retrying until successful connection with camera
[1] cap.driver: "pac207"
[1] cap.card: "CIF Single Chip "
[1] cap.bus_info: "0000:00:1d.7"
[1] cap.capabilities=0x05000001
[1] - VIDEO_CAPTURE
[1] - READWRITE
[1] - STREAMING
[1] Supported palettes:
[1] 0: P207 (P207)
[1] Unable to find a compatible palette format.
[1] Using VIDEO_PALETTE_YUV420P palette
[1] Using V4L1
[1] sync error in proc 5785: Invalid argument
[1] mcapture error in proc 5785: Invalid argument
[1] Video device fatal error - Closing video device
[1] Closing video device /dev/video0
[1] Retrying until successful connection with camera
[1] cap.driver: "pac207"
[1] cap.card: "CIF Single Chip "
[1] cap.bus_info: "0000:00:1d.7"
[1] cap.capabilities=0x05000001
[1] - VIDEO_CAPTURE
[1] - READWRITE
[1] - STREAMING
[1] Supported palettes:
[1] 0: P207 (P207)
[1] Unable to find a compatible palette format.
[1] Using VIDEO_PALETTE_YUV420P palette
[1] Using V4L1
[1] Codec not found: Invalid argument
[1] ffopen_open error creating (new) file [/usr/local/apache2/htdocs/cam1/01-20090120195430.avi]: Invalid argument
[1] File of type 1 saved to: /usr/local/apache2/htdocs/cam1/01-20090120195430-00.jpg
[1] Thread exiting
[1] Calling vid_close() from motion_cleanup
[1] Closing video device /dev/video0
Segmentation fault
Environment
Motion version: |
3.2.11 |
ffmpeg version: |
0.4.9_20081219 |
Libraries: |
ffmpeg |
Server OS: |
gentoo-2.6.28 |
--
RwStephan - 20 Jan 2009
Additional info
xine v4l://dev/video0 gives me a stream of error lines like
VIDIOCMCAPTURE: Invalid argument
and xawtv shows a black screen and, after quit, the output
This is xawtv-3.95, running on Linux/i686 (2.6.28-gentoo)
WARNING: v4l-conf is compiled without DGA support.
/dev/video0 [v4l2]: no overlay support
v4l-conf had some trouble, trying to continue anyway
Warning: Cannot convert string "-*-ledfixed-medium-r-*--39-*-*-*-c-*-*-*" to type FontStruct
no way to get: 384x288 16 bit TrueColor (LE)
Follow Up
Segfault is because issues with ffmpeg . but the problem is current stable motion didn't support new palettes added in kernel version from 2.6.27 ...
in trunk there're some progress but not fully all supported , but as i already answered to some other support question you can use libv4l.
http://www.lavrsen.dk/twiki/bin/view/Motion/SupportQuestion2009x01x15x203927
--
AngelCarpintero - 22 Jan 2009
Answer
Preloading libv4l solved all problems for me. Many thanks for the info! The necessary command for me was:
LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so motion <parameters>
--
RwStephan - 22 Jan 2009
For Debian it is
LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l2convert.so motion <parameters>
--
ChrisBlack - 03 Mar 2013
Thanks for the feedback
--
AngelCarpintero - 22 Jan 2009
You can also try this patch :
http://www.lavrsen.dk/foswiki/bin/view/Motion/Libv4lConvert
--
AngelCarpintero - 08 Sep 2009