[FFmpeg-trac] #6905(undetermined:closed): When copying video from .avi to .mp4, frames have incorrect pts values

FFmpeg trac at avcodec.org
Mon Dec 11 06:11:00 EET 2017


#6905: When copying video from .avi to .mp4, frames have incorrect pts values
-------------------------------------+-------------------------------------
             Reporter:  Misaki       |                    Owner:
                 Type:  defect       |                   Status:  closed
             Priority:  normal       |                Component:
              Version:  git-master   |  undetermined
             Keywords:               |               Resolution:
             Blocking:               |  needs_more_info
Analyzed by developer:  0            |               Blocked By:
                                     |  Reproduced by developer:  0
-------------------------------------+-------------------------------------

Comment (by Misaki):

 Mpeg4 streams work the same way. The reasons for using h.264 were that I
 was sure it would lead to B-pyramids and unpredictable frame order, and
 also that it would work in browsers like Chrome on Linux so verifying an
 error would be easier.

 As I said, MP4Box does it correctly. I don't know how accurate ffprobe is,
 but if it is accurate, then ffmpeg just needs to generate pts's for a
 frame that are the same as the dts's that already exist for that frame,
 when converting an avi to mp4.

 There's also the issue of timestamps being bumped up when converting to
 and from avi; in a 30-fps file this isn't noticeable, but at 1 fps it was
 more so. Although the packet dts as reported by ffprobe started from 0,
 the frames' pkt_dts_time starts at 2 for the ordered-frames.avi file
 (pkt_dts=4). Even if .avi can't have negative timestamps, could still
 start at 0 instead of higher than that. The original mp4 does start at 0
 dts and pts for frames.

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


More information about the FFmpeg-trac mailing list