[FFmpeg-trac] #9097(ffmpeg:new): ffmpeg doesn't filter I frames only with nointra

FFmpeg trac at avcodec.org
Tue Feb 9 14:55:59 EET 2021


#9097: ffmpeg doesn't filter I frames only with nointra
-------------------------------------+-------------------------------------
             Reporter:               |                     Type:  defect
  sergey.anufriev                    |
               Status:  new          |                 Priority:  important
            Component:  ffmpeg       |                  Version:  4.2
             Keywords:  ffmpeg       |               Blocked By:
  ffprobe skip_frames nointra        |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:
 It was found that decoding with parameter skip_frames nointra for LibAV
 does not return I frames only on example stream. Only several I frames are
 returned and other are skipped (from int
 avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, int
 *got_picture_ptr, const AVPacket *avpkt);).
 To be precise it was found that in normal case this part of code works in
 another way:
 {{{
 ffmpeg\libavcodec\h264.c
 static void decode_postinit(H264Context *h, int setup_finished)
 .....................
     if (!out_of_order && pics > h->avctx->has_b_frames) {
         h->next_output_pic = out;
         if (out_idx == 0 && h->delayed_pic[0] &&
 (h->delayed_pic[0]->f->key_frame || h->delayed_pic[0]->mmco_reset)) {
             h->next_outputed_poc = INT_MIN;
         } else
             h->next_outputed_poc = out->poc;
     } else {
         av_log(h->avctx, AV_LOG_DEBUG, "no picture %s\n", out_of_order ?
 "ooo" : "");
     }

 }}}
 Full decoding works find for this stream and command above returns about
 52 I frames.
 Other streams work fine, but there is not enough information from LibAV
 logs what goes wrong to understand is it LibAV fauls or not!?


 How to reproduce:
 It was reproduced on 3.1.1, 3.4.2, 3.4.3
 Transcode example stream using ffmpeg and skip_frames nointra parameter.
 But the shortest way is to use ffprobe:
 {{{
 xxx at comp MINGW64 /d/Work/0_tmp/ffmpeg-4.3.1-2021-01-01-full_build/bin
 $ ./ffprobe.exe -skip_frame nointra -show_frames -select_streams v:0
 /d/Work/Bug/a1_14.ts | grep  "pict_type"
 ffprobe version 4.3.1-2021-01-01-full_build-www.gyan.dev Copyright (c)
 2007-2021 the FFmpeg developers
   built with gcc 10.2.0 (Rev5, Built by MSYS2 project)
   configuration: --enable-gpl --enable-version3 --enable-static --disable-
 w32threads --disable-autodetect --enable-fontconfig --enable-iconv
 --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-
 libsnappy --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq
 --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2
 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libwebp
 --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom
 --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r
 --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-
 libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid
 --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va
 --enable-dxva2 --enable-libmfx --enable-libcdio --enable-libgme --enable-
 libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-
 libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame
 --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-
 libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis
 --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa
 --enable-librubberband --enable-libsoxr --enable-chromaprint
   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
   libswscale      5.  7.100 /  5.  7.100
   libswresample   3.  7.100 /  3.  7.100
   libpostproc    55.  7.100 / 55.  7.100
 ...............................
 Input #0, mpegts, from 'D:/Work/Bug/a1_14.ts':
   Duration: 00:00:56.56, start: 46379.615567, bitrate: 2959 kb/s
   Program 1
     Stream #0:0[0x31]: Video: h264 (Main) ([27][0][0][0] / 0x001B),
 yuv420p(tv, bt470bg, top first), 720x576 [SAR 16:11 DAR 20:11], 25 fps, 25
 tbr, 90k tbn, 50 tbc
     Stream #0:1[0x33](rus): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
 stereo, fltp, 192 kb/s
     Stream #0:2[0x34](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
 stereo, fltp, 192 kb/s
     Stream #0:3[0x3c]: Subtitle: dvb_teletext ([6][0][0][0] / 0x0006),
 492x250
 pict_type=I
 pict_type=I
 }}}
 Patches should be submitted to the ffmpeg-devel mailing list and not this
 bug tracker.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/9097>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list