There was such a problem: Apnul, it means that I ffmpeg to 2.4 full.
- debian 7
- wheezy
- php 5.6
There is a website, it has a video conversion function. I run a command through the console - everything works. I run it using php - I get a file of 48 bytes and an error:
Layout indicates a different number of channels than actually present
I've been fighting for a week now. If I put in php -c copy (copy all codec parameters), then the video is converted as expected. Converting via php works until I substitute parameters. If you run ffmpeg -i source.mkv -s 720x576 -c copy 1.mp4 , then it will work and convert. If you substitute at least something else - throw out this error. The strangest thing is that through the console you don't care. What you do not enter - everything works.
exec($converter." -i $folder" .$ffile." $atata $folder" .$tt.«_». $ffile.".mp4 1> ffmpeg/block.txt 2>&1 &"); $converter = "/usr/bin/ffmpeg"; $atata = '-s 720x576 -vcodec libx264 -b:v 1000k -r 24 -ac 2 -b:a 128k';