Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

php / avconv

5:15 pm on Jun 6, 2018 (gmt 0)

New User

joined:May 18, 2018
votes: 0

I use php / avconv to convert all video files to mp4 format. This questions is more about avconv than php, but I can find a more relevant section in the forum.

What's wrong with this:

$thuc = exec("avconv -y -i file.mov -map 0 -c:v libx264 -crf 22 -c:a copy file.mp4");

instead of a video file this code produces a 45 bytes mp4 file with the following content:

GIF89a   ! ,   ;

This happends only with .mov files. All other videos are being converted correctly to mp4