[FFmpeg-trac] #9893(undetermined:new): Concat of H.264 video results in glitches at join point

FFmpeg trac at avcodec.org
Mon Sep 5 18:04:26 EEST 2022


#9893: Concat of H.264 video results in glitches at join point
-------------------------------------+-------------------------------------
             Reporter:  savingray    |                    Owner:  (none)
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
                                     |  undetermined
              Version:  git-master   |               Resolution:
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Comment (by savingray):

 Replying to [comment:1 mkver]:

 Hi, thanks for having a look. But I'm not sure what are the implications
 of your comment.

 > The H.264 elementary stream has two important counters: frame_num and
 pic_order_cnt_lsb. The latter is how one can derive the frame (re)ordering
 from an elementary stream.

 So how do these counters work e.g. what is their relation to frame/packet
 PTS/DTS timestamps? Is this information even extractable with fftools?

 > The frame_num of the first frame of the second video is 11, its
 pic_order_cnt_lsb is 2; the values for the last frame of the first video
 are 10 and 10. According to the pic_order_cnt_lsb the last pic of the
 first video should be displayed after the first picture of the second
 video.

 Are you referring to merged video here or segments? Shouldn't these values
 be rewritten during mux anyway to ensure proper order? And why are some
 frames skipped entirely?

 And most importantly is there a way to fix video? :)
 As I stumble upon this problem quite often when dealing with H.264 videos
 from Youtube I wonder if this can be result of to the way these videos are
 encoded (I never experienced anything similar with VP9 encodes).
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9893#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list