nginx-hls-module icon indicating copy to clipboard operation
nginx-hls-module copied to clipboard

audio sync issue

Open ankurss opened this issue 10 years ago • 12 comments

audio goes out of sync for some files,

here is an example : http://62.210.123.72/sync-issue.m3u8 you can grab original file : removed , this plays fine in vlc 2.1.3

ankurss avatar Jul 25 '14 15:07 ankurss

@rounce , did you check this ?

ankurss avatar Jul 29 '14 10:07 ankurss

have more such files, if you want to analyze them

do you have a donation page, some place where we can support you ?

ankurss avatar Jul 31 '14 09:07 ankurss

Sorry, I was away from the computer for about a week. The issue reproduced, i'll try to fix it. don't have donation page yet.

rounce avatar Aug 03 '14 06:08 rounce

oh ok, no problem; looking forward for the fix

do let us know once your donation page is up

ankurss avatar Aug 04 '14 10:08 ankurss

@rounce , any luck with this mp4

ankurss avatar Sep 03 '14 20:09 ankurss

Unfortunately no luck. Quickly could not find cause of the issue and don't have time for in-depth analysis. I think https://github.com/rounce/nginx-hls-module/issues/9 and https://github.com/rounce/nginx-hls-module/issues/10 are the same issue.

rounce avatar Sep 04 '14 15:09 rounce

Hi rounce, perhaps the issue 10 is pts problem of the video, isn't it?

T-bagwell avatar Sep 04 '14 16:09 T-bagwell

perhaps this issue is elst atom problem.

http://wiki.multimedia.cx/index.php?title=QuickTime_container#elst

newestbie avatar Sep 05 '14 05:09 newestbie

It's unlikely that the issue is related to elst atom.

rounce avatar Sep 05 '14 06:09 rounce

I have fixed this bug:

output_ts:

- u_int to_break = 1;
+ u_int to_break = 0;
for(i = 0; i < fragment_size; ++i) {
if(fragment[i].trak == NULL) continue;
- if(fragment[i].first != fragment[i].last) to_break = 0;
+ if(fragment[i].first == fragment[i].last && to_break ==0) to_break = 1;
}

newestbie avatar Sep 12 '14 15:09 newestbie

i tried the above & it didn't fix the issue with the file specified in opening post

ankurss avatar Sep 17 '14 11:09 ankurss

Additionally when audio codec is HE-AAC (not AAC LC), the video fast-forward itself. (somehow wierd)

c8seki avatar Oct 28 '14 04:10 c8seki