Video transcoding works well for me for all video extensions except .avi - I get a PHPVideoToolkit error:

Execute error. It was not possible to encode "sites/default/files/video.avi" as FFmpeg returned an error. The error is with the video codec of the input file. FFmpeg reports the error to be "Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height".

Ffmpeg version is '2.8-static' and a transcoder command has such options:

/%path_to_ffmpeg%/ffmpeg -i '/%path_to_origin_file%/video.avi' -vf 'scale=960:720' -strict experimental -vcodec 'h264' -qscale '12' -acodec 'aac' -vprofile 'baseline' -ac '2' -ar '44100' -y /tmp/transcoded_file.mp4

And I've found that issue is in '-vprofile' parameter. If replace -vprofile 'baseline' with -f 'h264' then a transcoding became working well for all video extensions. Possible it's related with a ffmpeg version.

Here is a patch which change a transcoder command for h264 profile option.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dmytro-aragorn created an issue. See original summary.

dmytro-aragorn’s picture

I've found that a transcoded video with -f 'h264' param isn't playable in native Safari and IE. If remove a transcoder command for 'h264_profile' option then a transcoded video became playing correctly in all browsers. Not sure if it's a correct solution but it solve all transcoder and playing video troubles for me

heshanlk’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.