node.js - Accessing live video stream midway using websockets -


i using combination of fragmented mp4 , websockets stream live video stream web browser mse takes over.

i have fragmented appropriate fmp4 format using ffmpeg , have checked data using mpeg4parser tool. utilising websocket server, incoming data broadcasted browser clients connected via websocket. works fine both playback , live streaming(using rtsp stream input).

the problem facing occurs when client tries access stream midway, i.e, once ffmpeg stream has started. have saved init segment(ftyp + moov) elements in queue buffer in websocket server. queue buffer sends data each new client on connection.

i believe data sent correctly since browser console not throw 'media source element not found' error. yet no video streamed when receives broadcasted moof/mdat pairs.

so couple of questions answer are:

1) have observer each moof element contains sequence number in it's mfhd child element. have start 1 always, naturally not case video stream accessed midway?

2) possible view data in browser client.js. @ present can view mediabuffer contains bunch of [object arraybuffer]. can print binary data inside these buffers?

3) server side data seems sent in moof/mdat fragments each new data arriving ffmpeg output websocket server begins moof element. noticed printing binary data in console. there similar way view data in client side.

4) have idea of why happening? fragmented mp4 or iso bmff format detail missing.

if further detail required clarification please let me know, provide it.

make sure fragments include base media decode time. set video tag 'currenttime' time of first fragment received.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -