Opened 16 months ago

Last modified 16 months ago

#11554 new defect

ffmpeg does not respect A/V start_pts in the input file while transcoding to HLS/fmp4, the output has A/V sync issue

Reported by: weihuaqd Owned by:
Priority: critical Component: ffmpeg
Version: 7.1 Keywords: fmp4 start_pts
Cc: weihuaqd Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

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.*.

Attachments (2)

ffmpeg_output.txt (1.8 MB ) - added by weihuaqd 16 months ago.
ffmpeg command output
webcam_recording_original.mp4 (1.5 MB ) - added by weihuaqd 16 months ago.
Original webcam recording

Change History (3)

by weihuaqd, 16 months ago

Attachment: ffmpeg_output.txt added

ffmpeg command output

by weihuaqd, 16 months ago

Original webcam recording

comment:1 by weihuaqd, 16 months ago

Priority: normalcritical
Note: See TracTickets for help on using tickets.