I am making an application in HTML5 that lets you choose a local video file, then play it using the video tag. The problem is that some of the codecs of the videos are not playable by current browsers (XviD in general, H.264 for Firefox, etc). Is it possible to locally convert the videos to the right codec using JavaScript?
Edit: I probably didn’t explain myself correctly, I am making a kind of “Media Player” using HTML5: The user chooses a file, the script reads it using the HTML5 File API and then adds it to a video tag, no server involved. This is why I need JavaScript for this.
This would be a great deal of work, but you may want to look at the NaCl project, from Google, but it will still take a long time to do the conversion.
http://www.chromium.org/nativeclient/getting-started/getting-started-background-and-basics
Eventually this will be browser-independent, as they make plugins available, but at the moment this would only work on some versions of Chrome, I expect.
But, this way you can write your conversion in C so you can use other conversions tools already written.
You may want to explain which formats you can handle, and if they try to do one that isn’t in that format, then suggest free tools to help do the conversion, to help them out.