I have a project that decodes mpegts packets and renders the frames to a webGL canvas using FFMpeg. https://github.com/colek42/streamingDemo. Full disclosure much of the client code is copy/pasta from https://github.com/opensensorhub
Edit: add attribution
Re:A Simple Explanation: VLC.js
by rogerdpack on Tuesday December 06, 2016 @12:08PM
(#13116215)
is there a live demo some/anywhere?
Sorry, I am using it to proxy UDP streams which requires a backend component due to browser restrictions. If I hosted a demo it may end up costing a nontrivial amount of money. I am developing this closed source for my employer, but if there is enough interest I can push some of the changes to the open source repo.`
vespakoen noted that there is already ffmpeg library compiled with emscripten:
http://bgrins.github.io/videoconverter.js/demo
My speed test of webm to mp4 conversion (it doesn't display the video, it's just ffmpeg) showed the JS version around 10 times slower than the native ffmpeg.
The test was on relatively recent i7 and the latest Firefox (certainly having as fast asm.js as possible) then (around a month ago). I haven't investigated the cause for such significant speed difference.