Hi,I'm playing around with streaming WEBM videos and am trying to understand a problem I have encountered.I am splitting a test webm video into chunks and feeding them to a HTML5 video tag. This works fine if the client initiates the stream and picks up/plays the first chunk. The video will play and everything is rosy! I am using the following code to play each chunk...
var sourceBuffer = mediaSource.addSourceBuffer('video/webm; codecs="vorbis,vp8"');
sourceBuffer.append(...However, if the client misses the first chunk or I try to play the video from say 5 chunks in, the video does not play and I get the following error in the console...
INVALID_STATE_ERR: DOM Exception 11
I assume here that my chunks are not valid or that I am missing some data that the video tag needs to play the video. I assume this data is in the first chunk?I'm a noob to video encoding etc... so am struggling a bit to understand (never mind fix!) the problem.I found this link...But I'm not really sure how to use this or if its even relevant.Is my issue down to keyframes and where I am segmenting the video?I suppose what I am asking is how can I get the video tag to play any chunk of a WEBM video it is given?Ultimately what I want to do is have the server start streaming the video and each client will pick up the video from whatever point it connects at. i.e. 30 minutes in or whatever. I am building this into a Node.js project that uses websockets to stream binary data. I have everything working with node & websockets when I stream the video from the start. But if a client connects to a server that is already broadcasting a stream it fails as above.
Thanks--
You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webm-discuss...@webmproject.org.
To post to this group, send email to webm-d...@webmproject.org.
Visit this group at http://groups.google.com/a/webmproject.org/group/webm-discuss/?hl=en.
For more options, visit https://groups.google.com/a/webmproject.org/groups/opt_out.
Hi,I'm playing around with streaming WEBM videos and am trying to understand a problem I have encountered.I am splitting a test webm video into chunks and feeding them to a HTML5 video tag. This works fine if the client initiates the stream and picks up/plays the first chunk. The video will play and everything is rosy! I am using the following code to play each chunk...var sourceBuffer = mediaSource.addSourceBuffer('video/webm; codecs="vorbis,vp8"');sourceBuffer.append(...However, if the client misses the first chunk or I try to play the video from say 5 chunks in, the video does not play and I get the following error in the console...
Thanks for all the feedback Tom. Its really helpful.I'll look into the parsing side of it but I do have a question from your explanation of clusters etc...I thought I read somewhere that WEBM was designed for streaming. That, theoretically you could take a chunk of the file and it should play?It sounds to me like I need to be splitting the file on whole clusters otherwise I can't rely on it being properly played back. Is that correct??
On Thursday, April 11, 2013 9:50:36 AM UTC+1, roberto...@gmail.com wrote:Hi,I'm playing around with streaming WEBM videos and am trying to understand a problem I have encountered.I am splitting a test webm video into chunks and feeding them to a HTML5 video tag. This works fine if the client initiates the stream and picks up/plays the first chunk. The video will play and everything is rosy! I am using the following code to play each chunk...var sourceBuffer = mediaSource.addSourceBuffer('video/webm; codecs="vorbis,vp8"');sourceBuffer.append(...However, if the client misses the first chunk or I try to play the video from say 5 chunks in, the video does not play and I get the following error in the console...INVALID_STATE_ERR: DOM Exception 11I assume here that my chunks are not valid or that I am missing some data that the video tag needs to play the video. I assume this data is in the first chunk?I'm a noob to video encoding etc... so am struggling a bit to understand (never mind fix!) the problem.I found this link...But I'm not really sure how to use this or if its even relevant.Is my issue down to keyframes and where I am segmenting the video?I suppose what I am asking is how can I get the video tag to play any chunk of a WEBM video it is given?Ultimately what I want to do is have the server start streaming the video and each client will pick up the video from whatever point it connects at. i.e. 30 minutes in or whatever. I am building this into a Node.js project that uses websockets to stream binary data. I have everything working with node & websockets when I stream the video from the start. But if a client connects to a server that is already broadcasting a stream it fails as above.Thanks
--
Hi,
we did it a while ago: http://www-itec.uni-klu.ac.at/dash/?page_id=746#contentgen
But I haven’t tried it since a while with webm … and as the Media Source Extensions API changed a lot I assume that you might have to do some modifications on the scripts.
Best regards,
Stefan
Roberto, have you find a solution for the first webm chunk issue? I'm also interested!
Il giorno martedì 16 aprile 2013 12:36:56 UTC+2, roberto...@gmail.com ha scritto:Thanks Stefan.