dimanche 1 mars 2015

Record video from HTML using NGINX and RTMP protocol

I would like to build up an application web with Streaming. I have been using HTML5 and PHP.


For other project, I have been using NGINX server, so I use Open Broadcaster Software to encode and to transmit my stream to NGINX server, so later I show it with a javascript and Flash in a html page. I have been using RTMP protocol with the direction of my server and so on...


So my problem is that I want to record video on a HTML5 page instead of using Open Broadcaster Software. In that way I can record it from HTML5, and watch it in another HTML5 page (using NGINX and RTMP)


Thanks so much!



<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Live Stream</title>
<link rel="stylesheet" href="css/normalize.css" type="text/css" media="screen">
<link rel="stylesheet" href="css/grid.css" type="text/css" media="screen">
<link href='http://ift.tt/18gOup9' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen">

<h1 align="center">Live Stream</h1>

</head>
<body>

<div class="container clearfix">
<script type="text/javascript" src='jwplayer.js'></script>
<div id='player_1'></div>
<script type='text/javascript'>
jwplayer('player_1').setup({
width: "100%",
height: "100%",
stretching: "fill",
primary: "flash",
autostart: "true",
sources:
[
{file: "http://rtmpserver:port/live/test"}
]
});
</script>
</div>
</body>
</html>


This is the way i recieve the streaming. I want the same way to capture and send it to a server.


So i want capture video and sound with HTML5 and create a FMS URL and to set a stream key in order to send it to NGINX. But i dont know if its possible to do that...


Thanks :)


Aucun commentaire:

Enregistrer un commentaire