[FFmpeg-trac] #10348(undetermined:new): Invalid B-frames timestamps importing .h264 or .hevc stream

FFmpeg trac at avcodec.org
Sun May 7 15:44:10 EEST 2023


#10348: Invalid B-frames timestamps importing .h264 or .hevc stream
-------------------------------------+-------------------------------------
             Reporter:  slydiman     |                    Owner:  (none)
                 Type:  defect       |                   Status:  new
             Priority:  important    |                Component:
                                     |  undetermined
              Version:  unspecified  |               Resolution:
             Keywords:  frames       |               Blocked By:
  timestamp h264 hevc                |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Description changed by slydiman:

Old description:

> ffmpeg calculates invalid timestamps importing .h264 or .hevc stream with
> B-frames. Note the video decoder will reorder frames and fix the frames
> timestamps. So it is possible to get the valid file only reencoding the
> video stream. It is impossible to mux the valid file without reencoding.
> Note the invalid file may be played correctly if the video decoder is
> smart enough (MediaPlayerClassic, VLC, etc.). You must playback the
> invalid MP4 in Google Chrome or QuickTime to see the issue.
> How to reproduce:
> {{{
> % ffmpeg -i b-frames.h264 -c copy invalid.mp4
> % ffmpeg -i b-frames.h264 -c h264 valid.mp4
> ffmpeg any version including 6.0
> }}}
> Samples:
> http://slydiman.me/ffmpeg/b-frames.h264
> http://slydiman.me/ffmpeg/invalid.mp4

New description:

 ffmpeg calculates invalid timestamps importing .h264 or .hevc stream with
 B-frames. Note the video decoder will reorder frames and fix the frames
 timestamps. So it is possible to get the valid file only reencoding the
 video stream. It is impossible to mux the valid file without reencoding.
 Note the invalid file may be played correctly if the video decoder is
 smart enough (MediaPlayerClassic, VLC, etc.). You must playback the
 invalid MP4 in Google Chrome or QuickTime to see the issue.
 How to reproduce:
 {{{
 % ffmpeg -i b-frames.h264 -c copy invalid.mp4
 % ffmpeg -i b-frames.h264 -c h264 valid.mp4
 ffmpeg any version including 6.0
 }}}
 Samples:
 http://slydiman.me/ffmpeg/b-frames.h264
 http://slydiman.me/ffmpeg/invalid.mp4
 http://slydiman.me/ffmpeg/valid.mp4

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


More information about the FFmpeg-trac mailing list