Guys,
I have tired to upload the video files in the clipbucket script enabled site but every time it's not converting the video file to flv file. I logged in the admin area and saw the conversion log(Did't get any server log). The -vf option of ffmpeg was causing to convert the mp4 file to flv file for my case. I have checked the issue as per the basic concept. What I actually did I searched the exact file which was uploading the video 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 :)
Thursday, 5 August 2010
Why clipbucket or ffmpeg is unable convert video files using ffmpeg on linux machine?
Posted on 20:03 by Unknown
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment