4 ms·
you could use broadway, which is a h.264 player written in js onto canvas to get your frame and then just send that. see: http://badassjs.com/post/12035631618/b
by ryankshaw 15y ago
you could use broadway, which is a h.264 player written in js onto canvas to get your frame and then just send that.
see:
http://badassjs.com/post/12035631618/broadway-an-h-264-decoder-in-javascript-running-at http://badassjs.com/post/12035631618/broadway-an-h-264-decod...
http://mbebenita.github.com/Broadway/broadway.html http://mbebenita.github.com/Broadway/broadway.html
- untog 15y agoThat is an extremely cool project. Unfortunately, we don't know what format users are uploading, so we have to pass it off to an ffmpeg-powered service.
- ryankshaw 15y agooh well in that case there still is no need to just send 100k and hope it works, you could use websockets to push it to the service, pipe it directly into ffmpg and when you get back a frame have websocket tell browser to stop sending data. you can do the same thing with 2 ajax requests too. one doing the upload and the other that opens a connection at the same time and waits for a success response. onreadystate 3 of the second request, abort() the upload request.