I am getting this error when trying to transcode files with FFmpeg:
PHPVideoToolkit Error: Execute error. Output for file "/sites/default/files/videos/original/example.mov" was not found. No images were generated.
The source file is successfully uploaded to the server and placed into the sites/default/files/videos/original directory, and automatic thumbnails are generated from it. But the transcoding job fails with this error.
I have a working copy of FFmpeg, so I know it's able to transcode in the command line. As stated previously in another issue, I think this may have to do with the settings in the Video presets tab, because when it's changed from "none" to something specific, the cron jobs fail completely.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | ffmpeg-formats.txt | 8.35 KB | michael.k |
| #4 | ffmpeg-codecs.txt | 15.18 KB | michael.k |
Comments
Comment #1
Jorrit commentedI believe that I have fixed this problem last week in the 7.x-2.x-dev version. Could you check if this is the case for you as well?
Comment #2
michael.k commentedThanks for the reply.
I have painstakingly created a new test site from scratch with minimal modules and three manually created presets in order to demonstrate this issue (and others).
In order to help with troubleshooting, I have outlined the details of my process in the first node as a sort of "recipe":
http://video6.mkdev.org/node/1
Finally, when I uploaded a video for the second node (853x480, 156.3MB), only one out of three transcoding jobs succeeded:
http://video6.mkdev.org/node/2
(By the way, using "drush cron" and getting errors *always* kills my shell, so I have to exit and log back in to resume work.)
Here is what exists in the /videos/converted directory. Notice the webm version is missing and the mp4 version is crippled with no content:
Comment #3
Jorrit commentedIt could by that your FFmpeg version does not support WebM or MP4 (H.264). By what method have you installed FFmpeg?
Comment #4
michael.k commentedNo, I can create any output on the command line.
These commands produce viable, transcoded versions of the DVCPRO50 source file:
It was necessary for me to create a custom installation script for FFmpeg (for CentOS 5) in order to have a full copy that is non-distributable. This is where most people hit the wall and, indeed, it took a tremendous amount of effort, with lots of trial and error testing with the compile options for many external containers and codecs. But I finally produced a collection of sources that would compile on their own and build with FFmpeg to create files with the output that I need. Admittedly, it's not perfect, but it works.
Attached is the output for "ffmpeg -formats" and "ffmpeg -codecs" so you can verify this if you wish.
Here are the contents of the above files when queried by FFmpeg:
Comment #5
Jorrit commentedFirst of all, do you still experience the error that you gave in the first post of this issue with the latest 7.x-2.x-dev version?
Secondly, is the following command working when you execute it from the Drupal base directory:
/usr/bin/ffmpeg -i '/sites/default/files/videos/original/videoTest-480p-16x9-DVCPRO50-1.mov' -vcodec 'libx264rgb' -s '640x360' -acodec 'libfaac' -ac '2' /tmp/1329683899-4f415dbb7102e.mp4Comment #6
michael.k commentedThanks for being so responsive, Jorrit, I have seen your many posts over the last few weeks and your hard work is very much appreciated!
To answer your questions in order, yes and no.
But regarding the second question, if I change libx264rgb to libx264, it works.
Comment #7
Jorrit commentedWhen I look at your codecs list, libx264rgb is listed as "EV", meaning that it Encodes Video. libx264 is only listed as Video. What is the output on the command line?
Comment #8
michael.k commentedI get a segmentation fault. Here is the output:
Comment #9
Jorrit commentedWhat version of libx264 do you use? I just build ffmpeg and libx264 using the very latest git versions and now libx264 is also showing with EV again. You might want to try that. Also, after you've built FFmpeg, clear the Drupal cache. Information about the supported codecs is cached.
Another question: what is the exact value given for the "Video codec" setting on the preset settings page?
Comment #10
michael.k commentedThinking about this some more, there may be an issue with either FFmpeg or x264 during compile. As you point out, the codec libx264rgb should work because it shows as EV, but I'm thinking that the flags are actually reversed and libx264 should have the EV flag instead, because that's the one that works.
This is how "ffmpeg -codecs" reads now:
Is there a way to force the libx264 codec instead of libx264rgb?
I'm not sure how else you could populate the list of codecs and formats for the drop downs in the preset configuration screen, but given the caveat at the bottom of the "ffmpeg -codecs" output (above), perhaps relying on this is causing a wider set of problems.
Maybe one way to address this is to allow phpvideotoolkit.php5.php to include the codecs with the V flag, not just EV? It's not an elegant solution, but this way a user could override the list generated by FFmpeg and compensate for inaccuracies within FFmpeg.
As far as I can tell, the Video preset function is the culprit for this issue, and the primary reason I can't create the output I need because I can do everything fine via the command line. If there were some way to override the defaults in the drop downs (i.e., forcing options or supplying a custom field that specifies parameters in a command line), then maybe that would supply a workaround for the many complicated issues that have to work together -- as well as another troubleshooting option for this module.
Thanks again for your help.
Comment #11
Jorrit commentedWhat version of FFmpeg and libx264 do you use? If git, from which date?
Comment #12
michael.k commentedSorry I didn't see your post when I submitted mine.
x264 version is from git, 0.120.2164 da19765:
FFmpeg version git-2012-02-10-1b7ff90:
Comment #13
michael.k commentedYou were right, re-compiling from today's git versions of x264 and FFmpg has changed the list of codecs to show EV for libx264. I cleared the cache and was able to select the non-rgb version of libx264.
So the good news is that a beautiful and small mp4 file was created from the source! (From 156.3MB to 1.7MB)
But the bad news is that I got an error during the cron job, and the ogg was not transcoded (whereas it was before). Plus webm is still not transcoding. Perhaps the whole job dies when one fails? I've cleared all caches with "drush cc" and tried to re-save the presets, but still no luck.
Here is the cron error:
Comment #14
michael.k commentedI can confirm that the mp4 error kills other jobs that are pending -- even though the mp4 job finishes with a functional transcoded video.
I built a new site from scratch based on the 7.x-2.4+23-dev version (February 20, 2012 - 16:52), testing each format individually, then together. Since the mp4 transcoding job killed the other formats, I turned off mp4 and ran another job with only webm and ogg. That worked, and I got two functional video files.
Is there any way to change the order in which these formats are transcoded?
Here is the error:
Comment #15
Jorrit commentedDoes the file /tmp/_ffmpeg_info.php exist? If so, delete it and try again.
Comment #16
michael.k commentedGreat call, Jorrit, killing the tmp file fixed it!!
I'm now able to transcode mp4, webm, ogg, and flv all at once, and the /files/videos/converted sub-directory is populated with viable clips!
THANK YOU
Comment #17
Jorrit commentedThat's great to hear. I am going to commit some code that prevents that file from being used.
Comment #18
Jorrit commentedFixed in 7.x-2.x.