[FFmpeg-trac] #7870(undetermined:new): HEVC: JPEG output does not wait until a complete frame is found
FFmpeg
trac at avcodec.org
Fri Apr 26 15:29:53 EEST 2019
#7870: HEVC: JPEG output does not wait until a complete frame is found
-------------------------------------+-------------------------------------
Reporter: nafmo | Type: defect
Status: new | Priority: normal
Component: | Version: git-
undetermined | master
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
I am trying to generate a screenshot from a HEVC stream, but it fails,
giving me a partial image.
The stream is a MPEG transport stream received off the Astra satellite,
where I fetch several seconds worth of data. Since I do not know where I
jump into the data stream, it does not necessarily start with a key frame,
so I expect ffmpeg to continue decoding the stream until it has enough
data to create a proper image, but the actual result is that I get a
partially decoded image.
How to reproduce:
{{{
$ ffmpeg -an -i Astra_UHD1_\(1\).ts -vframes 1 ffmpeg-bug.jpg
ffmpeg version N-93674-g1e01f66822 Copyright (c) 2000-2019 the FFmpeg
developers
built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
configuration:
libavutil 56. 26.100 / 56. 26.100
libavcodec 58. 52.100 / 58. 52.100
libavformat 58. 27.103 / 58. 27.103
libavdevice 58. 7.100 / 58. 7.100
libavfilter 7. 49.100 / 7. 49.100
libswscale 5. 4.100 / 5. 4.100
libswresample 3. 4.100 / 3. 4.100
[hevc @ 0x55af326de000] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x55af326de000] Error parsing NAL unit #2.
[...these error messages are repeated several times...]
Input #0, mpegts, from 'Astra_UHD1_(1).ts':
Duration: 00:00:11.28, start: 72787.815722, bitrate: 14235 kb/s
Program 2
Metadata:
service_name : UHD1 by ASTRA / HD+
service_provider: SES ASTRA
Stream #0:0[0x65]: Video: hevc (Main 10) ([36][0][0][0] / 0x0024),
yuv420p10le(tv, bt2020nc/bt2020/arib-std-b67), 3840x2160 [SAR 1:1 DAR
16:9], 50 fps, 50 tbr, 90k tbn, 50 tbc
Stream #0:1[0x66](deu): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
stereo, fltp, 192 kb/s (clean effects)
Stream mapping:
Stream #0:0 -> #0:0 (hevc (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[hevc @ 0x55af3279f000] Could not find ref with POC 32
[swscaler @ 0x55af3559f480] deprecated pixel format used, make sure you
did set range correctly
Output #0, image2, to 'ffmpeg-bug2.jpg':
Metadata:
encoder : Lavf58.27.103
Stream #0:0: Video: mjpeg, yuvj420p(pc), 3840x2160 [SAR 1:1 DAR 16:9],
q=2-31, 200 kb/s, 50 fps, 50 tbn, 50 tbc
Metadata:
encoder : Lavc58.52.100 mjpeg
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame= 1 fps=0.0 q=4.8 Lsize=N/A time=00:00:00.02 bitrate=N/A dup=1
drop=1 speed=0.0333x
video:90kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
}}}
My current workaround is to pass `-ss 1` to hard-code decoding one second
of video, to make sure I get to an I-frame.
The off-air clip used is available here:
https://www.dropbox.com/s/jmmo8rdjc4a12hb/Astra_UHD1_%281%29.ts?dl=0
--
Ticket URL: <https://trac.ffmpeg.org/ticket/7870>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list