From the previous discussion:
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.