Why am I getting this warning and how to fix it? Essentially, I want to convert a video to a jpg every 4th frame with the same resolution as original video.

[jalal@goku vid2]$ ffmpeg -i debate_vid2.mov -r 0.25 images_%08d.jpg
ffmpeg version 2.6.8 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --enable-bzlib --disable-crystalhd --enable-gnutls --enable-ladspa --enable-libass --enable-libcdio --enable-libdc1394 --enable-libfaac --enable-nonfree --enable-libfdk-aac --enable-nonfree --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
  libavutil      54. 20.100 / 54. 20.100
  libavcodec     56. 26.100 / 56. 26.100
  libavformat    56. 25.101 / 56. 25.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 11.102 /  5. 11.102
  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
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'debate_vid2.mov':
    major_brand     : qt  
    minor_version   : 0
    compatible_brands: qt  
    creation_time   : 2017-03-10 02:45:46
  Duration: 01:36:50.03, start: 0.000000, bitrate: 785 kb/s
    Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 95 kb/s (default)
      creation_time   : 2017-03-10 02:45:46
      handler_name    : Core Media Data Handler
    Stream #0:1(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 334x360 [SAR 1:1 DAR 167:180], 685 kb/s, 30 fps, 30 tbr, 600 tbn, 1200 tbc (default)
      creation_time   : 2017-03-10 02:45:46
      handler_name    : Core Media Data Handler
      encoder         : H.264
[swscaler @ 0x1bb4240] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to 'images_%08d.jpg':
    major_brand     : qt  
    minor_version   : 0
    compatible_brands: qt  
    encoder         : Lavf56.25.101
    Stream #0:0(und): Video: mjpeg, yuvj420p(pc), 334x360 [SAR 1:1 DAR 167:180], q=2-31, 200 kb/s, 0.25 fps, 0.25 tbn, 0.25 tbc (default)
      creation_time   : 2017-03-10 02:45:46
      handler_name    : Core Media Data Handler
      encoder         : Lavc56.26.100 mjpeg
Stream mapping:
  Stream #0:1 -> #0:0 (h264 (native) -> mjpeg (native))
Press [q] to stop, [?] for help
frame= 1454 fps= 25 q=1.6 Lsize=N/A time=01:36:56.00 bitrate=N/A dup=0 drop=172847    
video:28470kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[jalal@goku vid2]$ 

1 Answer 1


If you are just converting videos using ffmpeg, this is just a warning, not an error, and nothing to worry about.

You can safely ignore the message when using ffmpeg from the command-line, and you don't have to fix anything.


The warning occurs when converting from a yuv420p source to JPEG, which makes ffmpeg choose yuvj420p as output format. That format is required for writing files with the mjpeg encoder.

These two pixel formats have different color ranges: the former is from 16–235, which is "limited range" (also called "MPEG" range), the latter defaults to 0–255, which is "full range".

This difference in color formats (which were selected automatically) makes ffmpeg trigger that specific warning message, telling you to make sure you set the color range correctly.

The warning is primarly meant for developers who use FFmpeg as a library in their own code (like here). See also the comments on this question. The specific deprecation is listed here:

planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting color_range

  • same issue. and for me ffmpeg -version ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers
    – ses
    Aug 29, 2021 at 3:53
  • 5
    Ignoring a warning isn't a fix
    – Konrad
    Nov 23, 2021 at 19:23
  • @KonradLinkowski What are you suggesting? As an end user, it won't have any effect. If you think the message can be improved in terms of clarity, please send a patch to ffmpeg-devel. As far as I can tell it was introduced to fix a different bug 8 years ago and hasn't been touched since.
    – slhck
    Nov 24, 2021 at 11:00
  • 3
    @KonradLinkowski FWIW I proposed a patch: patchwork.ffmpeg.org/project/ffmpeg/patch/…
    – slhck
    Nov 24, 2021 at 12:09
  • 2
    @HashimAziz You're right. It's not a technical issue, more of an organizational one. There's probably not much you can do other than reply to the thread on ffmpeg-devel and ask what's up with the patch.
    – slhck
    Feb 11, 2022 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.