bilibili / flv.js

HTML5 FLV Player
Apache License 2.0
22.96k stars 3.38k forks source link

Live Streaming audio drifting out of sync after 2-5 minutes #241

Open avinlakhera opened 6 years ago

avinlakhera commented 6 years ago

In Live streaming a video plays for 2-5 minutes the audio has drifted out of sync considerably.

In Console I am not getting any error but in chrome://media-internal I am getting below error continously

Large timestamp gap detected; may cause AV sync to drift. time:314562000us expected:315374204us delta:-812204us

var flvPlayer = flvjs.createPlayer({ type: 'flv', url: source.src, cors: true, isLive: true }, { enableStashBuffer: false, isLive: true, autoCleanupSourceBuffer: true, } );

Above is code how I have created flvPlayer but After some times I am getting sync issue.

How can I resolve this issue

I am using flv.js version 1.3.3

Thanks In Advance

xqq commented 6 years ago

Do not modify enableStashBuffer property or it will cause problem. Let it as true

Maybe I should mark this as deprecated

avinlakhera commented 6 years ago

I have removed the enableStashBuffer but now the video shows loading most of the time

avinlakhera commented 6 years ago

var flvPlayer = flvjs.createPlayer({ type: 'flv', url: source.src, cors: true, isLive: true }, { isLive: true, autoCleanupSourceBuffer: true }); is there anything else need to do apart from removing the enableStashBuffer ?

xqq commented 6 years ago

You can try master code to test whether fixed