Meena
Meena

Reputation: 967

How to convert videos with ffmpeg

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.

Upvotes: 0

Views: 3217

Answers (2)

Çetin
Çetin

Reputation: 11

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);

Upvotes: 1

Pekka
Pekka

Reputation: 449425

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.

Upvotes: 1

Related Questions