Opened 9 years ago
Closed 9 years ago
#5344 closed defect (fixed)
H.265 decoding errors (works well with HEVC reference decoder)
Reported by: | brausch | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avcodec |
Version: | git-master | Keywords: | hevc |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | yes |
Description
I've got a specific H.265 elementary stream file (see attachment) that can be decoded without any problems with the HEVC reference decoder from https://hevc.hhi.fraunhofer.de/. But when decoding with a current version of FFmpeg, frames 51 - 60 show massive decoding errors (picture almost completely gray). I'm using Zeranoe ffmpeg-20160316-git-d0a9114-win64-static but I could also reproduce with the released 2.8.6 version.
How to reproduce:
% ffmpeg -i snap1920_1080_I30_2500kBit_Flur_2default.265 snap1920_1080_I30_2500kBit_Flur_2default.yuv
Attachments (1)
Change History (7)
by , 9 years ago
Attachment: | snap1920_1080_I30_2500kBit_Flur_2default.265 added |
---|
comment:1 by , 9 years ago
Component: | ffmpeg → avcodec |
---|---|
Keywords: | hevc added |
Reproduced by developer: | set |
Status: | new → open |
comment:2 by , 9 years ago
The failure here is because there is a large section of zeroes in the middle of the file (between frames 49 and 50):
0006b080 08 ab 3f 15 80 04 d7 8f 06 4c af 00 00 00 00 00 |..?......L......| 0006b090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 0006b6e0 00 00 00 00 00 00 00 00 00 00 00 01 02 01 f2 e1 |................| 0006b6f0 f0 9c 4b c1 58 e7 c3 eb ab 18 84 6d 0e 2f 01 3f |..K.X......m./.?|
This is not invalid (a NAL unit can be preceded by arbitrarily many leading_zero_8bits or followed by arbitrarily many trailing_zero_8bits), but few streams make use of this "feature" so the decoder has not bothered to support it. The stream plays correctly on the current decoder if you remove all but three of the zero bytes.
comment:3 by , 9 years ago
Or try this patch: https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2016-March/191641.html
comment:4 by , 9 years ago
Analyzed by developer: | set |
---|
comment:5 by , 9 years ago
Thank you very much for your fast response (and sorry for the missing information).
I don't agree with you about the popularity of this behavior because both the Intel Quick Sync encoder and the current Ambarella chip generations produce such streams with a bunch of zeroes in it.
Will your patch be part of one of the upcoming FFmpeg releases?
comment:6 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
Fixed by Mark Thompson in fbec157ea08f61063847bbe0dba28525e6283ff5
Thank you for the sample!
For future tickets: Please always provide the failing command line together with the complete, uncut console output.