First chunk freezing when splitting into segments

0

I've got an html5 video player on my website in which I combine a video track with a standalone audio track. It's done on-the-fly using an m3u8 playlist. The purpose is to have one video file with voiceovers in different languages. The video is an MP4 file split into TS segments, the audio is an AAC file split into TS segments as well.

Previously I had been splitting these videos using ffmpeg. A simple command, no extra settings:
ffmpeg -i video.mp4 -hls_list_size 0 -g 60 -hls_time 5 video.m3u8

Then I started doing the same thing in MediaConvert with seemingly the same settings and noticed a problem in the video player — the audio skips ahead like half a second at the beginning. Meaning the video starts properly but the audio is offset.

Initially I didn't think it's about the video because, once again, the video and audio tracks are separate files that are combined on-the-fly. But it turned out that if I use the TS video files generated by ffmpeg, the audio and video are synced. If I replace them with the Mediaconvert segments, with everything else remaining the same, it's out of sync.

I've played with nearly all MediaConvert settings to no avail. Checked the files with ffprobe, they seem to be identical. What could the reason possible be?

Here are the links:

Edited by: Denisodb on Jul 14, 2021 9:50 AM

已提問 3 年前檢視次數 288 次
1 個回答
0

Turned out it's not about the video after all. Well, technically at least. The problem, as I understand it, was a conflict between an audio track split in segments via ffmpeg and a video track split via mediaconvert. I had to re-cut all the audios via mediaconvert and only then it started working properly.

已回答 3 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南