[FFmpeg-trac] #8308(undetermined:new): First Frame POS is incorrect

FFmpeg trac at avcodec.org
Fri Oct 18 23:20:08 EEST 2019

#8308: First Frame POS is incorrect
             Reporter:  occvtech     |                     Type:  defect
               Status:  new          |                 Priority:  important
            Component:               |                  Version:  git-
  undetermined                       |  master
             Keywords:  Inaccurate   |               Blocked By:
  POS                                |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
 Summary of the bug:

 The attached file has an annex b h.264 bitstream that starts at offset (in
 bytes) 847.  The stream is only 1 frame long (an I frame).  The problem is
 that there are a large number of 0x 00 bytes that come before the
 bitstream at the beginning of the file.

 If a basic command to rewrap the sequence into an MP4 container is used,
 the resulting file does not play back in standard players like VLC because
 the 0x 00 bytes are included into the container.  I.E. the command I am
 using is:

 ffmpeg -i FILE -c copy -f mp4 OUTPUT.mp4

 One of the attempted solutions was to calculate the POS for the beginning
 of the frame and then use -skip_initial_bytes to get there, but ffprobe is
 misreporting where this position is.  For example, if we run:

 ffprobe -i FILE -show_frames

 then the output reports the frame is at pkt_pos 0  -- which we know that
 it isn't actually.

 This issue is not limited to this file.  Every annex b file that we have
 tested reports a pkt_pos of 0 for the first frame even if we know it

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

More information about the FFmpeg-trac mailing list