Motion - Bug Report 2007x 09x 24x 175945
You are here: Foswiki>Motion Web>BugReports>BugReport2007x09x24x175945 (12 Apr 2009, DmitriRodik)Edit Attach

BUG: motion crashes with 'codec not found' error on debian ('testing')

motion crashes with 'codec not found' error on debian ('testing') it does this as soon as it detects motion i tried every codec as supported by motion (mpeg1, mpeg4, msmpeg4)

Logging:

gateway:/usr/src/motion-3.2.8# /usr/local/motion/bin/motion -n
[0] Processing thread 0 - config file /etc/motion/motion.conf
[0] Unknown config option "minimum_gap"
[0] Unknown config option "ffmpeg_filename"
[0] Unknown config option "always_changes"
[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 "debug_parameter"
[0] Thread 1 is from /etc/motion/motion.conf
[1] Thread started
[0] motion-httpd/3.2.8 running, accepting connections
[0] motion-httpd: waiting for data on port TCP 8080
[1] cap.driver: "pwc"
[1] cap.card: "Philips 740 webcam"
[1] cap.bus_info: "usb-0000:00:10.0-2"
[1] cap.capabilities=0x05000001
[1] - VIDEO_CAPTURE
[1] - READWRITE
[1] - STREAMING
[1] v4l2_select_input: name = "usb", type 0x00000000, status 00000000
[1] Supported palettes:
[1] 0: PWC2 (Raw Philips Webcam)
[1] 1: YU12 (4:2:0, planar, Y-Cb-Cr)
[1] Test palette YU12 (320x240)
[1] Using palette YU12 (320x240) bytesperlines 480 sizeimage 115200 colorspace 00000000
[1] found control 0x00980900, "Brightness", range 0,128
[1]     "Brightness", default 64, current 63
[1] found control 0x00980901, "Contrast", range 0,64
[1]     "Contrast", default 0, current 32
[1] found control 0x00980902, "Saturation", range -100,100
[1]     "Saturation", default 0, current 0
[1] found control 0x0098090e, "Red Gain", range 0,256
[1]     "Red Gain", default 0, current 96
[1] found control 0x0098090f, "Blue Gain", range 0,256
[1]     "Blue Gain", default 0, current 96
[1] found control 0x00980910, "Gamma", range 0,32
[1]     "Gamma", default 0, current 21
[1] found control 0x00980911, "Shutter Speed (Exposure)", range 0,256
[1]     "Shutter Speed (Exposure)", default 200, current 248
[1] found control 0x00980912, "Auto Gain Enabled", range 0,1
[1]     "Auto Gain Enabled", default 1, current 1
[1] found control 0x00980913, "Gain Level", range 0,256
[1]     "Gain Level", default 0, current 1
[1] found control 0x08000000, "Save User Settings", range 0,0
[1]     "Save User Settings", default 0, current 1
[1] found control 0x08000001, "Restore User Settings", range 0,0
[1]     "Restore User Settings", default 0, current 1
[1] mmap information:
[1] frames=2
[1] 0 length=462848
[1] 1 length=462848
[1] Using V4L2
[1] Started stream webcam server in port 8000
[1] File of type 2 saved to: /data/webcam/snapshot.jpg
[1] File of type 32 saved to: /data/webcam/20070924-timelapse.mpg
...
[1] File of type 2 saved to: /data/webcam/snapshot.jpg
[1] File of type 2 saved to: /data/webcam/snapshot.jpg
[1] Codec not found: Invalid argument
Segmentation fault


Config.:
daemon on
videodevice /dev/video0
input 8
norm 0
frequency 0
rotate 0
width 320
height 240
framerate 24
auto_brightness off
brightness 0
contrast 0
saturation 0
hue 0
roundrobin_frames 1
roundrobin_skip 1
switchfilter 0
threshold 1000
threshold_tune off
noise_level 40
noise_tune on
night_compensate off
despeckle EedDl
smart_mask_speed 0
lightswitch 60
minimum_motion_frames 1
pre_capture 50
post_capture 50
gap 1
minimum_gap 0
max_mpeg_time 0
low_cpu 10
output_all off
output_normal off
output_motion off
quality 85
ppm off
ffmpeg_cap_new on
ffmpeg_cap_motion off
ffmpeg_timelapse 60
ffmpeg_timelapse_mode daily
ffmpeg_bps 500000
ffmpeg_variable_bitrate 2
ffmpeg_video_codec mpeg4
snapshot_interval 60
locate off
text_right %Y-%m-%d\n%T-%q
text_changes off
target_dir /data/webcam
snapshot_filename snapshot
jpeg_filename %v-%Y%m%d%H%M%S-%q
ffmpeg_filename %v-%Y%m%d%H%M%S
timelapse_filename %Y%m%d-timelapse
webcam_port 8000
webcam_quality 50
webcam_motion off
webcam_maxrate 1
webcam_localhost off
webcam_limit 0
control_port 8080
control_localhost off
track_type 3
track_motorx -1
track_maxx 0
track_iomojo_id 0
track_speed 255
track_stepsize 40
quiet on
always_changes off
sql_log_image on
sql_log_snapshot on
sql_log_mpeg off
sql_log_timelapse off
debug_parameter 0

Environment

Motion version: 3.2.8
ffmpeg version: 0.cvs20070307-6
Shared libraries: ffmpeg
Server OS: debian testing

-- FolkertvanHeusden - 25 Sep 2007

Follow up

ffmpeg_filename parameter is obselete since motion 3.2.5 , use movie_filename instead.

Hints to update from previous version :

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

-- AngelCarpintero - 25 Sep 2007

Follow up

Changing that did not help:

[1] File of type 2 saved to: /data/webcam/snapshot.jpg [1] File of type 2 saved to: /data/webcam/snapshot.jpg [1] Codec not found: Invalid argument Segmentation fault


Hi Folkert - nice to see an old friend.

Sounds like a problem with ffmpeg.

Did you install ffmpeg from sources?

Do you have more than one ffmpeg installed? Like one from debs and one from source?

Maybe the debian ffmpeg you have is a "pure GPL" one with something missing?

Did you install Motion from sources?

You can get an up2date config file by saving the config from the Motion web interface. That will remove obsolute options and add the new with defaults.

-- KennethLavrsen - 26 Sep 2007

Oh yes. pre_capture 50. That is suicide. It requires buffering 50 images and processing 50 between first and 2nd motion frame.

However current Subversion version is dealing with part of this problem. You still require the large buffer though.

-- KennethLavrsen - 26 Sep 2007

Follow up

Hi Kenneth!

I installed everything initially from Debian packages as I was trying to keep that system as clean as possible. It seems the ffmpeg package from Debian is somewhat broken as now that I installed everything (motion + ffmpeg) from source things just work as they should. So this bug can be closed.

Fix record

Problem is because debian has remove mpeg encoder from his package :

http://packages.debian.org/changelogs/pool/main/f/ffmpeg-free/ffmpeg-free_0.cvs20070307-6/changelog

 Add debian/strip.sh to strip ffmpeg upstream source disabling mpeg
     based encoders as discussed with ftp-master at debconf7

To fix the problem , you have to rebuild your ffmpeg package removing strip.sh.

-- AngelCarpintero - 03 Nov 2007

A simpler fix would be to install the "libavcodec-unstripped-51" package, then in motion.conf set the "ffmpeg_video_codec" option to "mpeg4"

I tried this on ubuntu 8.10, should work with debian also

-- DmitriRodik - 12 Apr 2009

BugReportForm edit

TopicTitle motion crashes with 'codec not found' error on debian ('testing')
BugStatus Released
AssignedBugTo AngelCarpintero
SubmittedBy FolkertvanHeusden
Topic revision: r10 - 12 Apr 2009, DmitriRodik
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.