Opened 6 years ago

Closed 6 years ago

#7625 closed defect (fixed)

Wrong colors with jpg from MediaSite

Reported by: llogan Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: mjpeg
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

User phol supplied a JPG created by MediaSite which does not decode properly resulting in psychedelic colors. Did not find a regression. feh and others have no issues with the same input.

$ ffmpeg -i slide_0001.jpg -vframes 1 out.jpg
ffmpeg version N-92729-ga1f0dd24f6 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 8.2.1 (GCC) 20181127
  configuration: 
  libavutil      56. 24.101 / 56. 24.101
  libavcodec     58. 42.102 / 58. 42.102
  libavformat    58. 24.101 / 58. 24.101
  libavdevice    58.  6.101 / 58.  6.101
  libavfilter     7. 46.101 /  7. 46.101
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
Input #0, image2, from 'slide_0001.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: 47354 kb/s
    Stream #0:0: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 1280x720, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> mjpeg (native))
Press [q] to stop, [?] for help
Output #0, image2, to 'out.jpg':
  Metadata:
    encoder         : Lavf58.24.101
    Stream #0:0: Video: mjpeg, yuvj444p(pc), 1280x720, q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
    Metadata:
      encoder         : Lavc58.42.102 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame=    1 fps=0.0 q=5.4 Lsize=N/A time=00:00:00.04 bitrate=N/A speed=2.01x    
video:97kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Attachments (1)

slide_0001.jpg (231.2 KB ) - added by llogan 6 years ago.

Download all attachments as: .zip

Change History (3)

by llogan, 6 years ago

Attachment: slide_0001.jpg added

comment:1 by Gyan, 6 years ago

There's a patch in queue, but workaround for older versions of ffmpeg is to insert this video filter: mergeplanes=0x010200:format=gbrp

comment:2 by Carl Eugen Hoyos, 6 years ago

Component: undeterminedavcodec
Reproduced by developer: set
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.