Using Mp4 preset, libx264 video encoder, aac audio encoder, and any preset, e.g. libx264-default.
Some sort of transcoding is taking place, but not with the right options. After transcoding, failure is reported and /tmp file disappears.
I ran ps -eF to see the FFmpeg command line. Neither -vcodec nor -vpre was in the command line; only /usr/local/bin/ffmpeg -i INPUT /tmp/OUTPUT.mp4
transcoder also generates this error
Error set options PHPVideoToolkit Error: Value "libx264" set from $toolkit->setVideoCodec, can not be used to encode the output as the version of FFmpeg that you are using does not have the capability to encode video with this codec.
libx264 is listed in ffmpeg -codecs.
ffmpeg version N-38662-gbf807a5
built on Mar 8 2012 22:33:20 with gcc 4.5.2
configuration: --enable-shared --enable-gpl --enable-version3 --enable-nonfree --enable-x11grab --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --extra-ldflags='-L/usr/local/lib -Wl,-rpath /usr/local/lib'
libavutil 51. 42.100 / 51. 42.100
libavcodec 54. 10.100 / 54. 10.100
libavformat 54. 2.100 / 54. 2.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 63.100 / 2. 63.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 7.100 / 0. 7.100
libpostproc 52. 0.100 / 52. 0.100
Comments
Comment #1
Jorrit CreditAttribution: Jorrit commentedThe
ffmpeg -i video.mp4
-like call is used by the module to find the resolution of the video.Please post the entire output of
ffmpeg -codecs
. Also, make sure that the Drupal module points to the right ffmpeg binary. I see that you've compiled one yourself, self-compiled binaries usually end up at /usr/local/bin/ffmpeg instead of the distribution-provided binary at /usr/bin/ffmpeg.Comment #2
michael.k CreditAttribution: michael.k commentedI believe this issue is related to https://drupal.org/node/1468428 and https://drupal.org/node/1350170.
Do you get the same result if you change the drop down to "None" in admin/config/media/video/presets/preset/mp4 > Video settings > Video Preset?
Obviously, if your compile of FFmpeg has the necessary codes for mp4, you should be able to create a file by typing "ffmpeg -i example.mov example.mp4" in the command line, which would prove your copy is working properly. That error is misleading so if your copy works you should see a result with "none" selected for Video preset.
Regarding the location of FFmpeg, I think it lives in different directories depending on your flavor of Linux/Unix and personal preference. I compiled my own copy on CentOS 5, which lives at /usr/bin/ffmpeg, whereas my copy of x264 that was compiled at the same time lives at /usr/local/bin/x264:
Comment #3
htoipa CreditAttribution: htoipa commentedWhen I disabled codec validation everything works as expected. The command line now becomes reasonable and transcoding is successful.
sites/all/modules/video/libraries/phpvideotoolkit/phpvideotoolkit.php5.php:3608
and 1381:
I'll try the "none" option when I get a chance.
ffmpeg -codecs
Comment #4
Jorrit CreditAttribution: Jorrit commentedIs this problem still present in 7.x-2.5 or the latest 7.x-2.x-dev? If not, please close this issue.
Comment #5
Jorrit CreditAttribution: Jorrit commentedI am going to close this issue because I have no information to continue the investigation. Please reopen if you have more information.