我正在使用ubuntu 13.04
ffmpeg的版本为ffmpeg version N-61041-g52a2138
通过php,我调用ffmpeg命令来提取图像并对这些图像进行一些修改,然后再将这些图像合并回视频。
在通过ffmpeg命令合并所有图像时,我需要传递视频比特率。
命令如下
public function mergeImagesToVideo($frame_no,$user_directory_name,$video_bit_rates,&$output,&$status){
/* merge all of frames to create one second video */
$user_frames_path=$GLOBALS["all_user_dir_path"].$user_directory_name."/";
$command= $GLOBALS['ffmpeg'].' -f image2 -r 30 -i '.
$user_frames_path.'f'.$frame_no.'_%d.png -r 30 -b:v '
.$video_bit_rates.'k '.$user_frames_path.'f'.$frame_no.'.mp4';
//echo $command;
exec($command,$output,$status);
return;
}
调用如下
$this->mergeImagesToVideo($start_second,$user_directory,$video_bit_rates,$output,$status);
if($status!=0){
echo "some thing went wrong in merging all images to create a video <br>";
}
现在通过ffmpeg
命令输出检查比特率如下所示
ffmpeg -i f1.mp4
此命令显示7303 kb / s
当我右键单击图像并显示属性时,它显示7295 kbps
哪个是正确的?没有得到正确的线..
提前致谢。