Reputation: 81
I'm building a P2P video application in browser with javascript, but i'm new to this.I thought of webRTC but its available video encoding is VP8 which eats all the proccessor of tablets and phones.I want to get the video from webCam and encode it with h264 because tablets and smartphones support it natively.How can I encode the video after get it from getUserMedia.
Thanks!
Upvotes: 1
Views: 3544
Reputation: 189
Doubango seem to be providing a Java Script based API for H264 codec. I have not used it . You can have a look at it.
http://doubango.org/index.html
http://code.google.com/p/webrtc4all/
Upvotes: -1
Reputation: 4434
As WebRTC is built in the browser, and it's the browser internals that creates the tunnel and encodes the stream in VP8, you don't have access to the raw stream to encode it using other Codec neither to the raw connection to send the packets after your custom encoding.
To allow WebRTC to use H264, the browsers need to have support for it (native or plugin-based), and actually Chrome and Firefox don't support it. H264 vs VP8 in WebRTC is a subject with a lot of discussion, because of the availability of hardware encoders for H264 and not for VP8, but on the other hand the existence of royalties that need to be paid to use H264.
If you want to control the codec and the stream, namely on smartphones and tablets, you can build apps using the WebRTC native API's.
Upvotes: 2