[FFmpeg-user] Create high quality JPEGs

Elliott Balsley elliottbalsley at gmail.com
Tue Feb 10 00:38:33 CET 2015


How can I create high quality JPEGs with ffmpeg?  Using qscale 0 helps, but it still produces a file with noticeably less detail than the original, and macro blocking.

$ ffmpeg -i 0.tiff -qscale:v 0 0.jpeg
ffmpeg version 2.5.git Copyright (c) 2000-2015 the FFmpeg developers
  built on Feb  8 2015 16:44:44 with Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
  configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libspeex --enable-libass --enable-libbluray --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --disable-indev=jack --disable-outdev=xv --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --enable-vda --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid --enable-nonfree --enable-libfdk-aac --enable-libfaac
  libavutil      54. 17.100 / 54. 17.100
  libavcodec     56. 20.100 / 56. 20.100
  libavformat    56. 19.100 / 56. 19.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5.  8.100 /  5.  8.100
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
[tiff_pipe @ 0x7f9f8381bc00] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, tiff_pipe, from '0.tiff':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: tiff, rgb48le, 2048x1152 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
File '0.jpeg' already exists. Overwrite ? [y/N] y
[swscaler @ 0x7f9f83812800] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to '0.jpeg':
  Metadata:
    encoder         : Lavf56.19.100
    Stream #0:0: Video: mjpeg, yuvj444p(pc), 2048x1152 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
    Metadata:
      encoder         : Lavc56.20.100 mjpeg
Stream mapping:
  Stream #0:0 -> #0:0 (tiff (native) -> mjpeg (native))
Press [q] to stop, [?] for help
frame=    1 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A    
video:270kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown


More information about the ffmpeg-user mailing list