LoginSignup
1
0

More than 3 years have passed since last update.

ffmpegで使うコマンド

Last updated at Posted at 2020-03-22

ffmpegでよく使うコマンドをまとめていきたいと思います。

静止画切り出し

ffmpeg -i input.mp4 -r 1/30 -q:v 1 -f image2 %06d.jpg
オプション 内容
-i 入力ファイル
-r 1秒間に何枚切り出すか。1/30は30秒に1枚になる。
-f フォーマット
-q:v 画質 数字が大きくなると粗くなる

解像度変更

ffmpeg -i input.mp4 -vf scale=-1:1080 out.mp4
オプション 内容
-vf scale 画像解像度の指定 横×縦 -1とすることで元画像の比率で調整される。

再生スピード

ffmpeg -i input.mp4 -vf setpts=PTS/100 out.mp4
オプション 内容
-vf setpts=PTS/xx xxに何倍にするかの数値、例では100倍
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0