LoginSignup
15
10

More than 5 years have passed since last update.

動画からのJPEG書き出しは、 -q:v オプションで画質指定できる

Posted at

ffmpegで、動画からjpegなどの静止画に書き出す時には、以下のサンプルをよく見かけます。

ffmpeg -i douga.mp4 -ss 10 -t 20 -r 24 -f image2 out/%06d.jpg

10秒から20秒までを1秒あたり24個のjpeg画像に切り出してくださいねってコマンドです。
ですが、これだとjpegの画質が荒いです。そこで、画質を指定するのがこちら。

ffmpeg -i douga.mp4 -ss 162 -t 220 -r 24 -q:v 1 %06d.jpg

q:v で画質が指定できます。数字が増えるごとに画質は落ちて、ファイル容量は軽くなります。

15
10
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
15
10