Opened 5 months ago

Closed 5 months ago

Last modified 5 months ago

#7814 closed defect (invalid)

ffmpeg h264 decoding provides incorrect colors

Reported by: Ilya87 Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
How to reproduce:

https://yadi.sk/i/qBkjd3TzJ_yBQQ - matroska muxed file from blu-ray (749 frames)
% ffmpeg -color_primaries 1 -color_trc 1 -colorspace 1 -color_range 1 -i /home/ilya/eva/Evangelion1.11_test_.mkv -vf setparams=range=tv:color_primaries=bt709:color_trc=bt709:colorspace=bt709 -ss 12 -frames:v 1 def_x264_ffmpeg.png

ffplay -i /home/ilya/eva/Evangelion1.11_test_.mkv -ss 12

Make screenshot from ffplay and compare. FFmpeg has worse picture, incorrect colors (see eyes for example), darker areas.

ffmpeg version N-93394-g14eea7c47a
built on Antergos Linux x86_64

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Attachments (2)

def_x264_ffmpeg.png (1.5 MB) - added by Ilya87 5 months ago.
def_x264_ffplay.png (1.7 MB) - added by Ilya87 5 months ago.

Change History (6)

Changed 5 months ago by Ilya87

Changed 5 months ago by Ilya87

comment:1 Changed 5 months ago by Ilya87

  • Keywords colorspace added
  • Summary changed from ffmpeg h264 decoding differs from ffplay to ffmpeg h264 decoding provides incorrect colors when decoding

The problem is more complex as ffmpeg incorrectly decode also yuv format. Reference picture was taken after the following commands:
1 - ldecode.exe -i eva.h264 -o eva_ldecod.yuv (h.264 stream was extracted from mkv with mkvextract tracks command)
2 - Using yuv player (https://github.com/Tee0125/yuvplayer) I saved 288th frame.
3 - ffmpeg -s 1920x1080 -i eva_ldecod.yuv -ss 11.46 -frames:v 1 ffmpeg_yuv.png

The result: https://diff.pics/JjYgdC21Edl8/1

comment:2 Changed 5 months ago by Ilya87

  • Summary changed from ffmpeg h264 decoding provides incorrect colors when decoding to ffmpeg h264 decoding provides incorrect colors

comment:3 Changed 5 months ago by Ilya87

  • Resolution set to invalid
  • Status changed from new to closed

I've tested ffmpeg with different colorspace settings and think that ffplay (or videodrivers) modifies somehow output.

comment:4 Changed 5 months ago by cehoyos

  • Component changed from ffmpeg to undetermined
  • Keywords colorspace removed
Note: See TracTickets for help on using tickets.