Skip to content

Instantly share code, notes, and snippets.

@craftgear
Created December 1, 2020 11:14
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 craftgear/8ada60114c1d32faf82a398332d92fbf to your computer and use it in GitHub Desktop.
Save craftgear/8ada60114c1d32faf82a398332d92fbf to your computer and use it in GitHub Desktop.
Twitter用に動画の一部を切り抜いてフェードイン・フェードアウトするワンライナー
#!/bin/sh
# 使い方
# cut.sh 開始時間 終了時間 元のファイル
#
# 例) 1時間32分15秒から、1時間34分5秒まで切り取る
# cut.sh 1:32:15 1:34:05 input.mp4
ffmpeg -ss $1 -to $2 -i "$3" -vf fade=d=1.0,reverse,fade=d=1.0,reverse -af afade=d=1.0,areverse,afade=d=1.0,areverse -c:a aac output.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment