I want to convert video files into different resolution using ffmpeg. Right now i can run only 1 ffmpeg command the 2nd ffmpeg command does not get execute.
shell_exec("C:\\ffmpeg\\bin\\ffmpeg.exe -y -i \"$target_file\" -c:v libx264 -s:v 854x480 -c:a copy \"{$newFileName}\" > logfile.txt 2>&1");
shell_exec("C:\\ffmpeg\\bin\\ffmpeg.exe -y -i \"$target_file\" -c:v libx264 -s:v 480x360 -c:a copy \"{$360FileName}\" > logfile.txt 2>&1");
how can i code the script so that it can compress the video into various different resolution such as 240p, 360p, 480p?
Edited code to output 3 video files?
shell_exec("C:\\ffmpeg\\bin\\ffmpeg.exe -y -i \"$target_file\" -map 0 -c:v libx264 -s:v 854x480 -c:a copy \"{$newFileName}\" -map 0 -c:v libx264 -s:v 480x360 -c:a copy \"{$new360pFileName}\" -map 0 -c:v libx264 -s:v 854x480 -c:a copy \"{$240pFileName}\" > logfile.txt 2>&1");