

That’s generally how to convert a video.avi to video.flv with the audio sampling at 22050 & audio bit rate at 32, with the size 320×240. ffmpeg -i video.avi -ar 22050 -ab 32 -f flv -s 320x240 video.flv We’ll see what quality settings we will have to set. Let’s see on how our command will consist and what it will be made of. Here is where the fun starts, executing it and telling FFMPEG where to place it later. $srcHeight = makeMultipleTwo($ffmpegObj->getFrameHeight()) Īlso, the width/height has to be multiples of two so I have created a function that makes it a multiple of two: Ģ. We’ll start out our code with getting our variables: getFrameWidth()) I’ll be using the clock.avi located in every windows system. What we mainly need is the width, height & FPS (frame per second) so that we can tell FFMPEG about. (You can’t use what you have in “memoryâ€, so you’ll have to look on how to upload a file, once you got that and have the path of the file, we’ll start our script to invoke FFMPEG-PHP and get the file’s resolution. So, before doing any of this, you should make sure that your file has been uploaded to somewhere and you have the full path to it. Send the script to FFMPEG-PHP and get it’s info
