After hours following the video, checking my server and file owner had access to ffmpeg, checking mime types, error logs and other stuff I can't get this to work.
Doing a node render on the video node shows nothing in the thumbnail cck file field or the video file field.
I would really appreciate some pointers as to what I may have done wrong here. I've tried both avi and flv files, neither works.

Comments

attheshow’s picture

Status: Active » Postponed (maintainer needs more info)

Did you try converting a video from the command line to make sure that your FFMPEG setup is working as expected?

keyo’s picture

Yup ffmpeg is working as I expected. I wonder where the problem is?

ffmpeg -i mvi_5768.avi -f flv -b 200000 flash_mvi.flv
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg --enable-libgsm --enable-dc1394 --disable-debug --enable-shared --prefix=/usr
  libavutil version: 1d.49.3.0
  libavcodec version: 1d.51.38.0
  libavformat version: 1d.51.10.0
  built on Mar 16 2009 21:19:49, gcc: 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
Input #0, avi, from 'mvi_5768.avi':
  Duration: 00:00:05.7, start: 0.000000, bitrate: 16451 kb/s
  Stream #0.0: Video: mjpeg, yuvj422p, 640x480, 30.00 fps(r)
  Stream #0.1: Audio: pcm_s16le, 44100 Hz, stereo, 1411 kb/s
Output #0, flv, to 'flash_mvi.flv':
  Stream #0.0: Video: flv, yuv420p, 640x480, q=2-31, 200 kb/s, 30.00 fps(c)
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
frame=  172 q=31.0 Lsize=    1015kB time=5.7 bitrate=1449.9kbits/s    
video:1012kB audio:0kB global headers:0kB muxing overhead 0.283656%
attheshow’s picture

Are you seeing any error messages about "conversion failed" printed to the screen when you run cron?

keyo’s picture

I deleted the fields and recreated them. I'm pleased to see the thumbnail is created and I see the conversion failed message. I was not getting any feedback from the module before, but now it seems to work fine.

I guess the video fails to convert (from mpeg4) because I lack some codecs. I'll run the exact ffmpeg command flashvideo uses and see what results I get.

keyo’s picture

So I tried running the conversion from command line:

aegir@saleofthestars:~/platforms/acquia-drupal-6.13/sites/dev.saleofthestars.com/files/video-files-raw$ /usr/bin/ffmpeg -i mvi_5768.avi -f flv -acodec mp3 -ar 22050 -ab 64k -ac 1 mvi_5768.flv
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg --enable-libgsm --enable-dc1394 --disable-debug --enable-shared --prefix=/usr
  libavutil version: 1d.49.3.0
  libavcodec version: 1d.51.38.0
  libavformat version: 1d.51.10.0
  built on Mar 16 2009 21:19:49, gcc: 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
Input #0, avi, from 'mvi_5768.avi':
  Duration: 00:00:05.7, start: 0.000000, bitrate: 16451 kb/s
  Stream #0.0: Video: mjpeg, yuvj422p, 640x480, 30.00 fps(r)
  Stream #0.1: Audio: pcm_s16le, 44100 Hz, stereo, 1411 kb/s
Output #0, flv, to 'mvi_5768.flv':
  Stream #0.0: Video: flv, yuv420p, 640x480, q=2-31, 200 kb/s, 30.00 fps(c)
  Stream #0.1: Audio: 0x0000, 22050 Hz, mono, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0 /usr/bin/ffmpeg -i mvi_5768.avi acodec mp3 -ar 22050 -ab 64k-ab
  Stream #0.1 -> #0.1
Unsupported codec for output stream #0.1
aegir@saleofthestars:~/platforms/acquia-drupal-6.13/sites/dev.saleofthestars.com/files/video-files-raw$ ls -lsha
total 13M
 4.0K drwxrwsr-x  2 aegir    www-data  4.0K 2009-09-16 08:18 .
 4.0K drwxrwsr-x 18 aegir    www-data  4.0K 2009-09-16 07:59 ..
1020K -rw-r--r--  1 aegir    www-data 1015K 2009-09-03 06:37 flash_mvi.flv
  12M -rw-rw-r--  1 www-data www-data   12M 2009-09-16 07:59 mvi_5768.avi
    0 -rw-r--r--  1 aegir    www-data     0 2009-09-16 08:18 mvi_5768.flv

This creates a blank flv file. Looks like I just need to install the mp3 codec right?

keyo’s picture

I installed mp3, now the conversion succeeds from command line (I've watched the video, sound works).
I still see conversion failed both after node save and cron runs. Any ideas?

aegir@saleofthestars:~/platforms/acquia-drupal-6.13/sites/dev.saleofthestars.com/files/video-files-
raw$ rm mv/usr/bin/ffmpeg -i mvi_5768.avi -f flv -acodec mp3 -ar 22050 -ab 64k -ac 1 mvi_5768.flv
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg --enable-libgsm --enable-dc1394 --disable-debug --enable-libmp3lame --enable-libfaadbin --enable-libfaad --enable-libfaac --enable-xvid --enable-x264 --enable-liba52 --enable-amr_nb --enable-amr_wb --enable-shared --prefix=/usr
  libavutil version: 1d.49.3.0
  libavcodec version: 1d.51.38.0
  libavformat version: 1d.51.10.0
  built on Mar 17 2009 21:11:10, gcc: 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
Input #0, avi, from 'mvi_5768.avi':
  Duration: 00:00:05.7, start: 0.000000, bitrate: 16451 kb/s
  Stream #0.0: Video: mjpeg, yuvj422p, 640x480, 30.00 fps(r)
  Stream #0.1: Audio: pcm_s16le, 44100 Hz, stereo, 1411 kb/s
Output #0, flv, to 'mvi_5768.flv':
  Stream #0.0: Video: flv, yuv420p, 640x480, q=2-31, 200 kb/s, 30.00 fps(c)
  Stream #0.1: Audio: mp3, 22050 Hz, mono, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
frame=  172 q=31.0 Lsize=    1064kB time=5.7 bitrate=1519.7kbits/s    
video:1012kB audio:45kB global headers:0kB muxing overhead 0.607478%
aegir@saleofthestars:~/platforms/acquia-drupal-6.13/sites/dev.saleofthestars.com/files/video-files-
raw$ ls -lsah
total 14M
 4.0K drwxrwsr-x  2 aegir    www-data  4.0K 2009-09-16 08:31 .
 4.0K drwxrwsr-x 18 aegir    www-data  4.0K 2009-09-16 07:59 ..
1020K -rw-r--r--  1 aegir    www-data 1015K 2009-09-03 06:37 flash_mvi.flv
  12M -rw-rw-r--  1 www-data www-data   12M 2009-09-16 07:59 mvi_5768.avi
 1.1M -rw-r--r--  1 aegir    www-data  1.1M 2009-09-16 08:31 mvi_5768.flv
keyo’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

After looking in the ffmpeg table in my database (why isn't this module using watchdog?). I found that I had my file ownership/permissions wrong and videos could not be renamed or overwritten.

Conversion is now working.