Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#9493 closed defect (invalid)

h264: No output with software decoding, HW=ok

Reported by: charlymp Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: h264, mpegts
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by charlymp)

https://drive.google.com/file/d/17taVjh3af7e3VICT1lc_8Rv3YENEJG7v/view?usp=sharing

With the provided file, there is no output with software decoding (ffmpeg git-master):

ffplay example_h264.ts
ffplay version N-104459-g2171f97cc8 Copyright (c) 2003-2021 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.1.0-1ubuntu1~21.04)
  configuration: --enable-static --disable-shared --enable-debug --disable-optimizations --disable-stripping --cpu=core-avx2 --enable-avx2 --enable-nonfree --enable-gpl --enable-libx264 --enable-libx265
  libavutil      57.  7.100 / 57.  7.100
  libavcodec     59. 12.100 / 59. 12.100
  libavformat    59.  8.100 / 59.  8.100
  libavdevice    59.  0.101 / 59.  0.101
  libavfilter     8. 16.100 /  8. 16.100
  libswscale      6.  1.100 /  6.  1.100
  libswresample   4.  0.100 /  4.  0.100
  libpostproc    56.  0.100 / 56.  0.100
[h264 @ 0x7fa0c8006c00] non-existing PPS 0 referenced    0B f=0/0   
    Last message repeated 1 times
[h264 @ 0x7fa0c8006c00] decode_slice_header error
[h264 @ 0x7fa0c8006c00] non-existing PPS 0 referenced
[h264 @ 0x7fa0c8006c00] decode_slice_header error
[h264 @ 0x7fa0c8006c00] non-existing PPS 0 referenced
[h264 @ 0x7fa0c8006c00] decode_slice_header error
[h264 @ 0x7fa0c8006c00] non-existing PPS 0 referenced
[h264 @ 0x7fa0c8006c00] decode_slice_header error
[h264 @ 0x7fa0c8006c00] no frame!
[h264 @ 0x7fa0c8006c00] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x7fa0c8006c00] decode_slice_header error
[h264 @ 0x7fa0c8006c00] non-existing PPS 0 referenced
[...]
[h264 @ 0x7f7078006c00] non-existing PPS 0 referenced
[h264 @ 0x7f7078006c00] decode_slice_header error
[h264 @ 0x7f7078006c00] no frame!
[mpegts @ 0x7f7078000cc0] start time for stream 2 is not set in estimate_timings_from_pts
[mpegts @ 0x7f7078000cc0] PES packet size mismatch
[mpegts @ 0x7f7078000cc0] Packet corrupt (stream = 1, dts = 6734644891).
Input #0, mpegts, from '/home/charlymp/Téléchargements/example_h264.ts':
  Duration: 00:01:10.21, start: 74760.555678, bitrate: 26492 kb/s
  Program 1 
    Metadata:
      service_name    : PEACOCK_ADHOC6
      service_provider: NBCU
  Stream #0:0[0x1e1]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], Closed Captions, 29.97 fps, 29.97 tbr, 90k tbn
  Stream #0:1[0x1e2](und): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 192 kb/s
  Stream #0:2[0x1f4]: Data: scte_35
[h264 @ 0x7f70780f0dc0] co located POCs unavailable
74764.63 A-V:    nan fd=   0 aq= 1055KB vq= 2443KB sq=    0B f=0/0

But if I force the h264_cuvid decoder, everything is ok (ffmpeg 4.3.2):

ffplay -vcodec h264_cuvid
ffplay version 4.3.2-0+deb11u1ubuntu1 Copyright (c) 2003-2021 the FFmpeg developers
  built with gcc 10 (Ubuntu 10.2.1-20ubuntu1)
  configuration: --prefix=/usr --extra-version=0+deb11u1ubuntu1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
[h264 @ 0x7f1604006fc0] non-existing PPS 0 referenced    0B f=0/0   
    Last message repeated 1 times
[h264 @ 0x7f1604006fc0] decode_slice_header error
[h264 @ 0x7f1604006fc0] non-existing PPS 0 referenced
[h264 @ 0x7f1604006fc0] decode_slice_header error
[h264 @ 0x7f1604006fc0] non-existing PPS 0 referenced
[h264 @ 0x7f1604006fc0] decode_slice_header error
[h264 @ 0x7f1604006fc0] non-existing PPS 0 referenced
[h264 @ 0x7f1604006fc0] decode_slice_header error
[h264 @ 0x7f1604006fc0] no frame!
[h264 @ 0x7f1604006fc0] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x7f1604006fc0] decode_slice_header error
[h264 @ 0x7f1604006fc0] non-existing PPS 0 referenced
[h264 @ 0x7f1604006fc0] decode_slice_header error
[h264 @ 0x7f1604006fc0] non-existing PPS 0 referenced
[...]
[h264 @ 0x7f1604006fc0] decode_slice_header error
[h264 @ 0x7f1604006fc0] no frame!
[mpegts @ 0x7f1604000bc0] start time for stream 2 is not set in estimate_timings_from_pts
[mpegts @ 0x7f1604000bc0] PES packet size mismatch
[mpegts @ 0x7f1604000bc0] Packet corrupt (stream = 1, dts = 6734644891).
Input #0, mpegts, from 'NewTestFile_BBright_Decode_AVC-1080i_Issue_Elemental_Encoder.ts':
  Duration: 00:01:10.21, start: 74760.555678, bitrate: 26492 kb/s
  Program 1 
    Metadata:
      service_name    : PEACOCK_ADHOC6
      service_provider: NBCU
    Stream #0:0[0x1e1]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], Closed Captions, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x1e2](und): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 192 kb/s
    Stream #0:2[0x1f4]: Data: scte_35
74761.69 A-V:    nan fd=   1 aq=   51KB vq= 3284KB sq=    0B f=0/0

Change History (7)

comment:1 by Balling, 2 years ago

Where is the file?

comment:2 by charlymp, 2 years ago

Description: modified (diff)

in reply to:  1 comment:3 by charlymp, 2 years ago

Replying to Balling:

Where is the file?

I edited the ticket

comment:4 by Balling, 2 years ago

Status: newopen

Yeah. I confirm it all including h264_cuvid part. -hwaccel does not help either as you can see in mpv... I also cannot -c copy it! Wow.

comment:5 by James, 2 years ago

Resolution: invalid
Status: openclosed

The sample has no IDR frames, so you need to use -flags2 +showall to signal the decoder to output frames even if no keyframe has shown up.

And to do codec copy, you need to use -copyinkf for the same purpose.

Last edited 2 years ago by James (previous) (diff)

comment:6 by Balling, 2 years ago

How is #8820 related to this? Also again that PES problem.

Last edited 2 years ago by Balling (previous) (diff)

comment:7 by Balling, 2 years ago

The sample has no IDR frames

That is not needed: IDR frames are not the only keyframes. Just recovery point SEI frame is enough.

Note: See TracTickets for help on using tickets.