Skip to content

Instantly share code, notes, and snippets.

@CoXier
Last active April 8, 2018 12:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CoXier/e6919ad29756eb746d7faeedc21c597e to your computer and use it in GitHub Desktop.
Save CoXier/e6919ad29756eb746d7faeedc21c597e to your computer and use it in GitHub Desktop.

截取视频

ffmpeg -i input.mp4 -acodec copy -ss 00:00:14 -t 00:00:23 output.mp4

-ss:起始时间 -t: 总时间

去水印

ffmpeg -i input.mp4 -vf delogo=x=1035:y=40:w=210:h=80 no_log.mp4

(x,y)是水印左上角坐标 w 和 h 是水印的宽高

画方框(用于遮挡字幕)

ffmpeg -i output.mp4 -vf "drawbox=x=0:y=570:w=in_w:h=40:color=black:t=max" output_1.mp4

in_w 是输入视频的宽度, t=max 表示填充

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment