Hi, I've been working with getting AIFF and Wav files to process in ffmpeg via ffmpeg_converter and ffmpeg_wrapper. I think the problem may come from a mismatch in the ffmpeg_converter function at hand.
There was some tweaking to the ffmpeg_wrapper_can_decode() function which I think ffmpeg_converter needs to be changed to reflect. The error condition
"FFmpeg can not decode this file type" is currently not considering the new $types argument to the function and I think this is probably where the problem lies.
For more see #479972: ffmpeg_wrapper_can_decode() does not allow audio-only files to be decoded . Thanks!
function ffmpeg_wrapper_can_decode($path, $types = array('video', 'audio')) {
$ffmpeg = new ffmpeg_wrapper();
return $ffmpeg->can_decode_file($path, $types);
}versus ffmpeg_converter.module v 1.47 2010/11/02 07:59:54 zoo33
function ffmpeg_converter_convert($input_file, $output_file, $configuration, $link = '') {
// Make sure that FFmpeg can decode the input file.
if (!ffmpeg_wrapper_can_decode($input_file)) {
watchdog('ffmpeg_converter', 'FFmpeg can not decode this file type: %file',
array('%file' => $input_file), WATCHDOG_WARNING, $link);
return false;
}
that If statement is missing types i think.
Comments
Comment #1
zoo33 commentedThank you for the report.
The function
ffmpeg_wrapper_can_decode()has a default value for$valueswhich includes both audio and video. I'm guessing that this means that both audio and video files are accepted when that argument is not passed, which would suggest that this is not what's causing your problem.However, you're welcome to try and modify this line of code and see if it makes any difference:
Comment #2
hongpong commentedI scratched out Return: false and it allows the file to process properly. Would be best to improve the debugging ability around here, be able to report out what it sees for various files etc. Thanks!
Comment #3
zoo33 commentedWell, if it's not possible to convert audio files, this needs to be fixed. The if statement should stay IMO, but we need to figure out in what circumstances ffmpeg_wrapper_can_decode() might be returning the wrong value. Tests are welcome!