senko / python-video-converter

Python Video Converter (ffmpeg wrapper)
468 stars 191 forks source link

Strange Unknown ffmpeg error [fixed] #47

Closed gesmit closed 10 years ago

gesmit commented 10 years ago

I'm trying to run the converter using Celery. When executing the command I get this in the logfile:

[2014-05-15 13:01:50,184: INFO/Worker-1] [TRANSCODE] Retrieved transcoding task for file testvideo in 2014/05 [2014-05-15 13:01:50,184: INFO/Worker-1] [DO_TRANSCODE] Converting testvideo to flv 640x480 [2014-05-15 13:01:50,192: INFO/Worker-1] Spawning ffmpeg with command: /usr/local/bin/ffprobe -show_format -show_streams /home/storage/advideo/source/2014/05/testvideo [2014-05-15 13:01:50,268: INFO/Worker-1] Spawning ffmpeg with command: /usr/local/bin/ffmpeg -probesize 2147483647 -analyzeduration 2147483647 -i /home/storage/advideo/source/2014/05/testvideo -acodec libmp3lame -ac 2 -ab 128k -ar 44100 -vcodec flv -r 18 -vb 1536k -s 640x360 -aspect 640:480 -vf pad=640:480:0:60 -sn -f flv -y /tmp/transcoding/91daeef2b6c245bcb3f23772d040552d.flv [2014-05-15 13:01:50,301: ERROR/MainProcess] Task tasks.advideo[1cf57028-81f6-4776-bc5f-c02354c096a4] raised unexpected: FFMpegConvertError('Unknown ffmpeg error',) Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 240, in trace_task R = retval = fun(_args, _kwargs) File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 437, in protected_call return self.run(_args, _kwargs) File "/data/tasks/tasks.py", line 81, in advideo { 'codec': 'flv', 'width': 640, 'height': 480, 'fps': 18, 'bitrate': 1536, 'mode': 'pad'} File "/data/tasks/tasks.py", line 62, in dotranscode for timecode in conv: File "/usr/local/lib/python2.7/dist-packages/converter/init.py", line 213, in convert timeout=timeout): File "/usr/local/lib/python2.7/dist-packages/converter/ffmpeg.py", line 490, in convert total_output, line, pid=p.pid) FFMpegConvertError: Unknown ffmpeg error

If I do the ffmpeg command on the command line, there is no problem at al. I allready set the timeout to None

PS. I'm running Debian Wheezy. I've tried the same setup on my laptop with Linux Mint 16 without any problems. Could be a debian related problem with the process communication?

Please help.... ;-)

gesmit commented 10 years ago

Never mind, solved the issue by debugging the output from total_out ( line 475 in ffmpeg.py ), ffmpeg failed due to my previous fix probesize and analyzeduration to solve incompatible ffmpeg versions. Using the static version from the install file fixed that.