[FFmpeg-user] Image Conversion TIFF > JPEG with yuv422 chroma subsampling

Moritz Barsnick barsnick at gmx.net
Tue Jan 20 17:44:29 CET 2015


On Tue, Jan 20, 2015 at 17:16:47 +0100, Andrea Rastelli wrote:
> I'm sorry but even with your help seems impossible to properly convert 
> my images.

It may depend heavily on the input, but at least I can successfully
create JPEG from a TIFF, and it can be read by many programs:

$ ffmpeg -i /usr/share/doc/tesseract-3.02.02/eurotext.tif -pix_fmt yuv422p -q 1 eurotext.jpg -y
ffmpeg version 2.5.git Copyright (c) 2000-2015 the FFmpeg developers
  built on Jan 11 2015 15:42:28 with icc (ICC) 14.0.3 20140422
  configuration: --prefix=/usr/new/tools/video/install/ffmpeg/2015-01-10 --enable-gpl --enable-version3 --enable-nonfree --disable-shared --enable-gnutls --enable-libcdio --enable-libfreetype --enable-libx264 --enable-libmp3lame --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libass --enable-libv4l2 --enable-libvidstab --enable-libfdk-aac --enable-libsmbclient --enable-libquvi --cc=icc --cxx=icpc --extra-ldflags='-L/usr/new/tools/video/install/x264/current/lib -L/usr/new/tools/video/install/fdk-aac/current/lib' --extra-cflags='-I/usr/new/tools/video/install/x264/current/include -I/usr/new/tools/video/install/fdk-aac/current/include'
  libavutil      54. 16.100 / 54. 16.100
  libavcodec     56. 20.100 / 56. 20.100
  libavformat    56. 18.100 / 56. 18.100
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  7.100 /  5.  7.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, tiff_pipe, from '/usr/share/doc/tesseract-3.02.02/eurotext.tif':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: tiff, monob, 1024x800 [SAR 1:1 DAR 32:25], 25 tbr, 25 tbn, 25 tbc
Incompatible pixel format 'yuv422p' for codec 'mjpeg', auto-selecting format 'yuvj422p'
[swscaler @ 0xb6962c0] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to 'eurotext.jpg':
  Metadata:
    encoder         : Lavf56.18.100
    Stream #0:0: Video: mjpeg, yuvj422p(pc), 1024x800 [SAR 1:1 DAR 32:25], 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:180kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Note the warning about the pixel format.

Moritz


More information about the ffmpeg-user mailing list