Utilizzo di Html 5 Voglio registrare video e salvare lo streaming in un file locale. Dato sotto è il codice. Con un clic del pulsante, la telecamera viene già richiamata e acquisisce il video nel tag "VIDEO" dell'HTML. Posso archiviare lo stream in un file locale? O posso memorizzarlo come file MP4?HTML 5 registrazione video e memorizzazione di un flusso
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function enter() {
if (navigator.mozGetUserMedia) {
navigator.myGetMedia=navigator.mozGetUserMedia;
navigator.myGetMedia({video: true}, connect, error);
}
else {
alert("NO");
}
function connect(stream) {
var video = document.getElementById("my_video");
video.src = window.URL ? window.URL.createObjectURL(stream) : stream;
video.play();
var canvas = document.getElementById("c");
}
function error(e) { console.log(e); }
}
</script>
</head>
<body>
<canvas width="640" height="480" id="c"></canvas>
<input type="button" value="RECORD" onClick="enter()"/>
<input type="button" value="SAVE" />
<video id="my_video" width="640" height="480"/>
</body>
</html>
Desidero salvare lo stream con un clic di pulsante di salvataggio.
Buoni collegamenti, soluzioni interessanti. Tuttavia, si noti che si tratta ancora di soluzioni alternative che si basano sulla creazione di istantanee di elementi canvas e sulla codifica dei frame uno ad uno con whammy. – georg
@georg aggiornato - html5rocks aggiunto – l2aelba
è disattivato in chrome e il video non è supportato in firfox come posso registrare il mio suono in chrome e video in firfox –