Reputation: 5023
How to capture a video and store it in h.264 format using web browsers without flash?
As per my analysis, HTML5 can be used to access the camera and microphone without any additional plug-ins as in this link. "http://www.html5rocks.com/en/tutorials/getusermedia/intro/"
However, i don't know the possibility of storing the video in h.264 format.
I would prefer not to install any additional plugins. However if its not possible without any additional plugins, i would accept it. I can also use **Java Applets if needed.
Is HTML 5 the only option or it possible with JScript itself? I also hope that ffmpeg can help me too.
Upvotes: 4
Views: 3111
Reputation: 3285
3 years later it is now possible to record H.264 video in the browser with Chrome 52 (Jul 20, 2016) and the Media Recorder API without plugins or Java or Flash.
Chrome 52 is the 1st to support both the Media Recorder API and H.264 for video encoding. Chrome 49,50 and 51 only supported VP8 & VP9 as video codecs and Chrome 48- did not the support Media Recorder API.
The audio codec used is still Opus @ 48kHz and the container is .webm so if you'll still have to pass the file through FFmpeg if you want wide browser/device support.
This article (co-wroted by me) covers the Media Recorder API in detail across Firefox and Chrome and there's this Media Recorder API demo that supports H.264 encoding on Chrome 52 + the associated code as a GitHub project.
Disclaimer: I work at Pipe where we handle video recording.
Upvotes: 4
Reputation: 7853
Not yet, but it looks like it's coming.
There is a draft specification for MediaStream Recording, but it has not been implemented in any browsers yet. There is a ticket to build it into Chrome, that you can track.
Someone built a Javascript library to record video into WebM, though it doesn't do audio. It uses the browser's built-in function to save a WebP image to do the encoding. In theory, you could write an h.264 encoder in Javascript, but it would be very slow and quite difficult to write.
Upvotes: 2