file(upload.php). I had conception like some file or code in a file which was converting the video. So, I started to get my clue from upload.php and got another included file(./includes/classes/conversion/ffmpeg.class.php). This contains ffmpeg conversion procedures where -vf option has implemented. So, I searched the particular line and commented the -vf enabled logic.
I wanted to go beyond that. I manually uploaded one .mp4 file and tried to convert it to .flv using the ffmpeg binary(via command prompt). I got same error messages. So, I assured myself that I have to disable the -vf option since it was successfully converting without -vf or padding option(I dont' know how the developers think here!).
Here are those codes I commented.
============
# video size, aspect and padding
$this->calculate_size_padding( $p, $i, $width, $height, $ratio, $pad_top, $pad_bottom, $pad_left, $pad_right );
# $use_vf = config('use_ffmpeg_vf');
$use_vf='no';
if($use_vf=='no')
{
$opt_av .= " -s {$width}x{$height} -aspect $ratio -padcolor 000000 -padtop $pad_top -padbottom $pad_bottom -padleft $pad_left -padright $pad_right ";
}else
{
$opt_av .= "-s {$width}x{$height} -aspect $ratio -vf 'pad=0:0:0:0:black'";
}
============
Following is the exact command to convert the video file(mp4 to flv) via backend :
====
root@starslite [~]# ffmpeg -i vdosong.mp4 -f flv -vcodec flv -r 30 -b 512000 -s 400x300 -aspect 1.33333333333 -acodec libmp3lame -ab 128000 -ar 22050 -map_meta_data /home/me/public_html/files/videos/testme.flv:/home/me/vdosong.mp4 /home/me/public_html/files/videos/testme.flv
====
Here /home/me/public_html/files/videos/testme.flv is path of output file.
Note error message that I got :
====
-------------------------
Unrecognized option 'vf'
ERROR: No such file or directory - /home/sucess/public_html/files/videos/1282138755d3fab.flv
ERROR: /usr/lib/ruby/site_ruby/1.8/flvtool2/base.rb:259:in `initialize'
ERROR: /usr/lib/ruby/site_ruby/1.8/flvtool2/base.rb:259:in `open'
====
PS: I would like you to always try to find the solution from the basic concept and error messages :)
By : singlehop.com

Responses
0 Respones to "Why clipbucket or ffmpeg is unable convert video files using ffmpeg on linux machine?"
Post a Comment
»Thank you for reading this article
If you have questions or comments, please leave a comment
»You can click on the Subscribe by email to subscribe comments of this post
»You can register directly link pictures, mp3, video on the comment form.
»You may use some HTML tags such
»Please post comments polite and typing accented Vietnamese if possible
»Thank the good faith comment