How to convert videos with ffmpeg

2020-02-16 03:35发布

I want to convert a video from one format to another using ffmpeg. I try lots of code but it does not convert the video.

For example:

exec("ffmpeg -i mickey.flv -ar 22050 -ab 32 -f avi -s 320x240 mickey.avi ");

This code does not convert the video, it does not show any error, it is loading continuously.

标签: php ffmpeg
2条回答
兄弟一词,经得起流年.
2楼-- · 2020-02-16 03:44

It is impossible to pinpoint the problem, because you are executing an external application and any number of things could be going wrong in the process.

See this question for a number of very good hints to debug exec() commands.

查看更多
\"骚年 ilove
3楼-- · 2020-02-16 03:58

Display FFMPEG Error Output:

Command Line:

$command = "ffmpeg -i mickey.flv -ar 22050 -ab 32 -f avi -s 320x240 mickey.avi ";

exec($command . ' 2>&1', $output);

print_r($output);
查看更多
登录 后发表回答