Created
July 7, 2012 21:51
-
-
Save jasonbradley/3068209 to your computer and use it in GitHub Desktop.
Convert video to h264
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function convertVideoToH264($original_file_path, $converted_file) | |
{ | |
//convert it | |
$cmd = "ffmpeg -i ".$original_file_path." -crf 20 -bufsize 20000k -maxrate 25000k -vcodec libx264 $converted_file"; | |
shell_exec($cmd); | |
if (!is_file($converted_file)) | |
{ | |
echo "FFMPEG conversion failed!, Skipping..."; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment