mpegts.js icon indicating copy to clipboard operation
mpegts.js copied to clipboard

Segments drop unconsumed data issue

Open fegauthier opened this issue 2 years ago • 1 comments

Hi guys!

I have an issue with segments. Let me try to explain what's going on.

I have these segments that I inject into the MPEG TS player

http://XXXXX/play/timeshift.php?duration=1&start=2023-02-17:15-00&play_token=XXXXX
http://XXXXX/play/timeshift.php?duration=1&start=2023-02-17:15-01&play_token=XXXXX
http://XXXXX/play/timeshift.php?duration=1&start=2023-02-17:15-02&play_token=XXXXX

Each segment duration is 1 minute. During the transition between segments, I have a little skip of microseconds. I also have this message into the console logs for every segments and I suspect this could cause the issue.

[IOController] > 96 bytes unconsumed data remain when flush buffer, dropped

Every segment get unconsumed bytes dropped. Is it possible to not drop these bytes? I think it could solve my issue?

image

With FFMPEG, it's working without any frame skip.

I don't know if it's because of this, but each segment that is appended to the buffer unsync audio with video.

Thanks!

fegauthier avatar Feb 17 '23 21:02 fegauthier

[IOController] > 11 bytes unconsumed data remain when flush buffer, dropped

https://npm.io/package/panoramic-player 这里有提到一点,但我不知道是否可行

处理方案:

  1. 在executeSkipping计时器方法中,监听flv.js KBps回调。 各自缓存当前时间戳进行对比,若差距>10s & 播放状态为暂停则重连

不知道这个方案是否可用

Greasen avatar May 20 '23 02:05 Greasen