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:视频转码、剪切、合并、播放速调整

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