[315] | 1 | <html>
|
---|
| 2 | <head>
|
---|
[319] | 3 | <title>py-tcpmultiplexer Webcam Control </title>
|
---|
[315] | 4 | <link href="css/style.css" type="text/css" rel="stylesheet"/>
|
---|
| 5 | <script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
|
---|
| 6 | <script type="text/javascript" src="js/jquery.jplayer.min.js"></script>
|
---|
[319] | 7 | <script type="text/javascript">
|
---|
[321] | 8 | function changeAudio(wav_uri)
|
---|
[319] | 9 | {
|
---|
| 10 | $("#jplayer").jPlayer({
|
---|
| 11 | ready: function () {
|
---|
[321] | 12 | $(this).jPlayer("stop");
|
---|
[319] | 13 | $(this).jPlayer("setMedia", { wav: wav_uri }).jPlayer("play");
|
---|
| 14 | },
|
---|
| 15 | ended: function (event) {
|
---|
| 16 | $(this).jPlayer("play");
|
---|
| 17 | },
|
---|
| 18 | swfPath: "",
|
---|
| 19 | supplied: "wav"
|
---|
| 20 | });
|
---|
| 21 | }
|
---|
| 22 |
|
---|
| 23 | function changeVideo(mjeg_uri)
|
---|
| 24 | {
|
---|
| 25 | $("#player").attr("src",mjeg_uri);
|
---|
| 26 | $("#player").attr("alt","Video Feed: " + mjeg_uri);
|
---|
| 27 | }
|
---|
| 28 | </script>
|
---|
[321] | 29 |
|
---|
[315] | 30 | </head>
|
---|
| 31 | <body>
|
---|
[319] | 32 | <h1>py-tcpmultiplexer webcam server</h1>
|
---|
[315] | 33 |
|
---|
[321] | 34 | <div>
|
---|
| 35 | <table>
|
---|
| 36 | <tr><td>Select WebCam:</td><td>
|
---|
| 37 | <input type="radio" name="cam" value="img/logo.png" checked="checked">None</input>
|
---|
| 38 | <input type="radio" name="cam" value="/cam1/video">Cam1</input>
|
---|
| 39 | <input type="radio" name="cam" value="/cam2/video">Cam2</input>
|
---|
[322] | 40 | <input type="radio" name="cam" value="/cam3/video">Cam3</input>
|
---|
| 41 | <input type="radio" name="cam" value="/cam4/video">Cam4</input>
|
---|
| 42 | <input type="radio" name="cam" value="/cam5/video">Cam5</input>
|
---|
[321] | 43 | </td></tr>
|
---|
| 44 | <tr><td>Select Audio:</td><td>
|
---|
| 45 | <input type="radio" name="sound" value="none" checked="checked" >None</input>
|
---|
| 46 | <input type="radio" name="sound" value="/cam1/audio">Cam1</input>
|
---|
| 47 | </td></tr>
|
---|
| 48 | </table>
|
---|
[315] | 49 |
|
---|
[321] | 50 | <script type="text/javascript">
|
---|
| 51 | $("input[name='cam']").change(function () {
|
---|
| 52 | changeVideo($("input[name='cam']:checked").val());
|
---|
| 53 | });
|
---|
| 54 | $("input[name='sound']").change(function () {
|
---|
| 55 | changeAudio($("input[name='sound']:checked").val());
|
---|
| 56 | });
|
---|
| 57 | </script>
|
---|
| 58 |
|
---|
| 59 | <div>
|
---|
| 60 | <img id="player" src="img/logo.png" alt="Video feeds"/><br/>
|
---|
[315] | 61 | </div>
|
---|
| 62 |
|
---|
[321] | 63 | <div id="jplayer" />
|
---|
[315] | 64 |
|
---|
[319] | 65 |
|
---|
[321] | 66 |
|
---|
[315] | 67 | <hr />
|
---|
[319] | 68 | <p>Tested browsers: <a href="http://www.firefox.com">Mozilla Firefox</a>, <a href="http://www.google.com/chrome">Google Chrome</a> (<em>If no video appear below, you are using unsupported browser</em>)<br />
|
---|
| 69 | <small>Source Code at: <a href="http://rickvanderzwet.nl/svn/personal/py-tcpmultiplexer/">http://rickvanderzwet.nl/svn/personal/py-tcpmultiplexer/</a></small>
|
---|
[315] | 70 |
|
---|
[325] | 71 | <p />
|
---|
| 72 | Example stream creation using VLC from WebCam: <pre>vlc -I http v4l:///dev/video0 --sout='#transcode{vcodec=MJPG}:standard{access=http{mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=0.0.0.0:9000/webcam}}'</pre>
|
---|
| 73 |
|
---|
| 74 |
|
---|
[315] | 75 | </body>
|
---|
| 76 | </html>
|
---|