[FFmpeg-trac] #6699(avformat:open): MP4 with HEVC keyint=2 not decoded properly due to edit list (first frames are missing)

FFmpeg trac at avcodec.org
Wed Nov 1 23:38:17 EET 2017


#6699: MP4 with HEVC keyint=2 not decoded properly due to edit list (first frames
are missing)
-------------------------------------+-------------------------------------
             Reporter:  tospi        |                    Owner:  isasi
                 Type:  defect       |                   Status:  open
             Priority:  normal       |                Component:  avformat
              Version:  git-master   |               Resolution:
             Keywords:  mov hevc     |               Blocked By:
  edts                               |  Reproduced by developer:  0
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by isasi):

 There is also another issue, where the trailing B-frame is not being
 output by the demuxer even though that B-frame is inside edit.

 This is because, we stop parsing the index in mov_fix_index as soon as we
 encounter a key-frame with (pts + duration) >= edit_list_end. So in this
 case, we are ignoring the B-frame that comes after the key frame, but is
 still included in the edit i.e. (pts + duration) < edit_list_end.

 Edit list:
 media_time  ,  duration
 1024           12800
 Frame#24 : I - DTS: 11776 , PTS: 13312 , DURATION: 512 - PTS + DURATION >=
 (1024 +12800)
 Frame#25 : B - DTS: 12288 , PTS: 12800 , DURATION: 512 - PTS + DURATION <
 (1024 +12800)

 I have sent a patch which will keep parsing until we encounter 2 keyframes
 that are outside the edit list.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/6699#comment:6>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list