[FFmpeg-trac] #7366(undetermined:new): mxf_set_audio_pts creates incorrect PTS for compressed audio

FFmpeg trac at avcodec.org
Sat Aug 18 00:53:08 EEST 2018


#7366: mxf_set_audio_pts creates incorrect PTS for compressed audio
-------------------------------------+-------------------------------------
             Reporter:  go4shoe      |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:
 How to reproduce: ffmpeg -i AVC_AAC.mxf  AVC_AAC.mp4
 MP4 output file will have incorrect timestamps, plays with A/V sync issues
 and scrubbing is not possible.

 The bug is in mxf_set_audio_pts.

 FFMEPG uses the element size (KLV) to keep a cumulative count and uses the
 count as PTS.

 For PCM audio the element size is proportional to the sample count – for
 compressed audio (like AAC) it is not.

 So - FFMPEG MXF audio PTS calculation works only for PCM correctly.

 I verified  my assumption by fixing FFMPEG MXF audio PTS calculation. Now
 I am counting the AAC packets in the KLV and then increment PTS +=
 AAC_frame_count * 1024;

 Now the resulting transcoded MP4 files for fine.

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


More information about the FFmpeg-trac mailing list