[FFmpeg-trac] #11554(ffmpeg:new): ffmpeg does not respect A/V start_pts in the input file while transcoding to HLS/fmp4, the output has A/V sync issue

FFmpeg trac at avcodec.org
Thu Apr 24 23:58:42 EEST 2025


#11554: ffmpeg does not respect A/V start_pts in the input file while transcoding
to HLS/fmp4, the output has A/V sync issue
----------------------------------------+----------------------------------
             Reporter:  weihuaqd        |                     Type:  defect
               Status:  new             |                 Priority:  normal
            Component:  ffmpeg          |                  Version:  7.1
             Keywords:  fmp4 start_pts  |               Blocked By:
             Blocking:                  |  Reproduced by developer:  0
Analyzed by developer:  0               |
----------------------------------------+----------------------------------
 I have some webcam recordings with different A/V start_pts.  For the
 attached sample file, the video start_pts is 0, the audio start_pts is
 55632 (1.159 seconds).  Here's the command I used to transcode:

 {{{
 ffmpeg.exe -v 9 -loglevel 99 -i webcam_recording_original.mp4 -y
 -hls_segment_filename segment-%d.m4s -hls_playlist_type vod
 -hls_segment_type fmp4  -hls_time 10 -hls_list_size 0 -bf 0 test.m3u8
 }}}

 The output file has both A/V start_pts set to 0.  These cause the A/V
 desync - the audio is 1.159 seconds ahead of the video.  This only affects
 fmp4 segment type.  The ts segment type is fine.

 I have tried asetpts and other options, and they did not have any effect.
 This affects v6.* and v7.*.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/11554>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list