I have been trying all night to tame the wild beast of the Video module's presets, but with no consistency.
Generally speaking, my test files are either vastly different in size and quality, or absolutely unchanged after making changes to the preset. I've run many tests, yet I still have no idea how to adjust the transcoded files for control and predictability. Most importantly, any time I use the drop down menu for x264 presets (or profiles), I get this error, which kills the mp4 transcoding job:
# drush -v cron
Initialized Drupal 7.12 root directory at / [notice]
Initialized Drupal site default at sites/default [notice]
WD backup_migrate: Default Database backed up successfully to video9.mkdev.org-2012-03-04T21-33-11 in destination Scheduled Backups [notice]
Directory in 382.53 ms.
WD cron: Cron run completed. [notice]
WD transcoder: PHPVideoToolkit Error: Execute error. Output for file [error]
"/sites/default/files/videos/original/IMG_4364_4.MOV" was not found. Please check server write
permissions and/or available codecs compiled with FFmpeg. You can check the encode decode availability by inspecting the output array
from PHPVideoToolkit::getFFmpegInfo().
WD transcoder: Video conversion failed!. Please check logs for debugging. [warning]
Cron run successfully. [success]
Command dispatch complete [notice]
Note that the error is misleading because I am able to transcode to mp4 without using the drop down for libx264.
So it seems that this function is fundamentally broken. In one case I even got an mp4 file that inflated to 7x the original source file when I reduced the bitrate to 600! The prior test was set at 1000 and gave me a file at 1/3 the original size.
By the way, this was a bug fix a while back, but it might be worth mentioning that there is no _ffmpeg_info.php file in /tmp.
@Jorrit you have admin access to the video9 sandbox, which has the latest devs for Video and Video.js. I've restricted the content for unauthenticated users in order to protect the innocent subject in the videos.
Comments
Comment #1
Jorrit commentedI think you experienced the negative effects of #1470592: ffmpeg transcoder wrongly multiply video bitrate value *1000. For video bitrates lower than 1000 kbps, the rate was multiplied by 1000. That explains that reducing the video bit rate to 600 increased the file size. It could be that the x264 presets are not right for your ffmpeg / libx264 version, that part got changed around ffmpeg 0.6 I think.
Comment #2
michael.k commentedYes I noticed that issue and am hopeful it will solve the large file size issue for me. What was it that you fixed? And where would I look in source files for x264 that were used to compile FFmpeg to help me identify the settings?
My versions are:
Comment #3
michael.k commentedBy the way, considering that I have so many problems with presets like adjustments to values producing the same file sizes, and errors with libx264 that kill the transcoding jobs when I use the profile/preset drop down, perhaps there is some relation to this issue:
http://drupal.org/node/1308260
Is it possible that the profile call interrupts the codec validation?
Comment #4
Jorrit commentedFor newer FFmpeg installations (I forgot when it changed, probably around 0.7), the presets are not shipped with FFmpeg. Don't select anything in the "FFmpeg video preset" dropdown for such versions.