0
votes

I am currently encoding live video and streaming to the browser. I encode rgb->vuy->h264->Wrap in (MP4 ISO BMFF Byte Stream Format spec, section 3)-> websocket to client. first package is initialization data from ftyp to moov tag.

And from there on I am sending moof and mdat tags to the client. And I stream the video.

No matter how many frames are in mdat chunk. The MSE always buffers the data to have seamless play. How can one overwrite this using MSE.

I read somewhere that there is a way mdat understands that it is a live steaming webm chunk. But I do not know if such think exist for mp4 or exists altogether.

1
I found this, stackoverflow.com/questions/29636740/… but there is not a real answerEvren Bingøl
How are you creating the mp4, and how are you controlling the chunk size?szatmary
i use Microsoft sinker(Fragmented version), Then loop and change some values in the mp4 Tags such as tfdt trun and stuff to make it Spec 3 compliant so that MSE wont complain. I have full control over the encoder. So The more frames I put to the sinker the more chunks I get. But the issue is on the client side. even if I write 2 frames per chunk(mdat) there is still a latency as MSE need to buffer before start rendering.Evren Bingøl
I have never hear of Microsoft sinker. And google returns no results. Are you getting one moof every two frames? Or just one mdat every two frames? Can you post a sample file?szatmary

1 Answers

1
votes

I'm sending moof once per one frame and it works.