samirkumardas/jmuxer

Player pauses after a 20 minutes or so of playing

rhysmorgan134 opened this issue · 4 comments

Hi,

I have got a mostly successful implementation, I am send raw frames over websocket, and all is playing fine using a fixed frame rate.

The issue I have, is that after around 20 minutes or so of playback, the video just stops. I have logged all events on the video element, and nothing fires at all at the point of failure, I do get a few waiting events as the stream plays, however these aren't noticeable when playing the stream, and they also happen consistently from launch right up until failure, so I don't think it is to do with those. I have tried various values for flushing time and max delay, however none seem to make a difference, I have also verified that jmuxer is still getting frames even after failure.

Am I correct in thinking that if I want to log events on the MSE object, I can modify the jmuxer code, then rebuild, and in theory it should pull the jmuxer.min.js from the dist folder automatically after? (I am using react, and create-react-app)

Thanks alot for the awesome project!

Am I correct in thinking that if I want to log events on the MSE object, I can modify the jmuxer code, then rebuild, and in theory it should pull the jmuxer.min.js from the dist folder automatically after? (I am using react, and create-react-app)

-- yes that's correct.

Have you tried setting clearBuffer to true?

I haven’t, but looking through jmuxer.js it appears to be true by default? I haven’t set it to false, I just leave it as default. I have been doing some more work into it, the device I am grabbing the stream from causes the waiting by not sending any frames when there are no pixel changes, this happens fairly often, so I am wondering whether the repeated waiting action does just eventually cause the mse to stop?

OK I have figured it out, the sourcebuffer is getting full. I suspect this is because the H264 stream only contains a keyframe at the start. I have tried to modify the sourcebuffer to remove 30 seconds of buffer after playing 60 seconds of video, however it seems to be deleting the entire buffer. From reading online this is due to the function also removing any frames that depend on the removed frames, and due to lack of key frames this is always the entire buffer,

I’ve managed to get the hardware device to send a key frame on request, it’s now flawless, 2 hours so far and no issues!