0
我正在爲我的iPhone應用程序開發PHP Web服務,以便用戶上傳視頻。當用戶想要在網站上看到視頻時,他們會看到一個水平視頻,所以我需要使用FFmpeg命令旋轉視頻。有人能幫我嗎?使用FFmpeg進行視頻旋轉
function make_rotation($input, $output, $transpose="1") {
$ffmpegpath = "ffmpeg";
if(!file_exists($input)) return false;
//$command = "$ffmpegpath -i $input -vf 'transpose=$transpose' $output";
//$command = "ffmpeg -vfilters 'rotate=270' -i $input $output";
$command ="ffmpeg -i $input -vf 'transpose=$transpose' $output";
exec($command);
return true;
}
感謝所有
喜KPBird非常感謝......但可以告訴我輸入文件和輸出文件是相同或不同..再次 – haresh
@KPBird我試過第二個選項來旋轉我的視頻,但它不旋轉到90度1,比我通過2它旋轉但180度請讓我知道什麼可以是完成..謝謝 – Satish