kaltura / nginx-vod-module

NGINX-based MP4 Repackager
GNU Affero General Public License v3.0
1.96k stars 431 forks source link

Audio / Video sync issue : 2 frames ahead of video #1522

Open ben74 opened 2 months ago

ben74 commented 2 months ago

Hi, sorry for my bad english

The first : the original, not passing via nginx vod module has none sync issues

source=https://play.vod2.infomaniak.com/single/1jhvl2uqoi8jk/1jhvl2uqmlwkh/1jhvl2uqoi8jp.mp4#    pts_time:0 for both audio and vido

Then, passed via hls module, the audio is 2 frames ahead of the video ...

source=https://play.vod2.infomaniak.com/hls/1jhvl2uqoi8jk/1jhvl2uqmlwkh/,1jhvl2uqoi8jp,.urlset/index-v1-a1.m3u8#    a:0.1,v:0.2

Here is my ffprobe command for detecting such delays ..

for s in a v; do echo $s;  /usr/local/bin/ffprobe -i $source -show_frames -select_streams "$s" 2>/dev/null | grep pts_time | head -1; done;

Do any of you guys know how to get rid of this delay ? I've tried switching and swapping almost every parameter of nginx_vod_module for 2 days and I've not getting any improvement this far ..

Bilion thanks in advance for any clue, notice, comment, remark, enlightenment

ben74 commented 2 months ago

found out the parameter vod_hls_mpegts_align_pts on; solves the issue, but does absolutely no one did complain of this before ? ( why did the frame misalign anyways in the first place ? )