FFmpeg 自用手冊

FFmpeg 自用手冊

壓縮視頻

ffmpeg -i "infile" -b:v 800k -s 270x480 "outfile"
-i: "infile" input file path
-b:v 幀數/s
-s: 視頻大小 width x height
"outfile": output file path

視頻剪切

ffmpeg -ss 00:40:21.0 -t 19 -accurate_seek -i D:\myfileIn.mp4 -codec copy -avoid_negative_ts 1 D:\downloads\myfile_out.mp4
-i: source
-ss: start time
-t: duration
-c: video,audio codec

時間格式:second: HH:MM:SS.MS
-acurate_seek 要在 -i 前
把 -ss 選項放在 -i 之前,會使用關鍵幀技術; 把 -ss 選項放在 -i 之後,則不使用關鍵幀技術
如果要使用關鍵幀技術又要保留時間戳,可以加上 -copyts 選項

Reference

ffmpeg視頻精準剪切
FFmpeg:視頻轉碼、剪切、合併、播放速調整

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章