├── CHANGELOG.txt ├── LICENSE.txt ├── MODX Revo plugin ├── INSTALL.txt ├── plugin.php └── rtsp2html5 │ └── modx_plugin │ ├── cam-error.png │ └── cam-loading.png ├── README.md ├── ffmpeg (portable linux x64) ├── FFmpeg License and Legal Considerations.url └── ffmpeg └── rtsp2html5 ├── .htaccess ├── camera.php ├── error.png ├── ifvisible.js ├── index.html ├── linkgen_en.html ├── linkgen_ru.html └── robots.txt /CHANGELOG.txt: -------------------------------------------------------------------------------- 1 | 1.2 2 | ------ 3 | - Added additional configuration options: 4 | ffmpeg_path, timeout, rtsp_transport. 5 | - Added support for FFMpeg 4.0+ (timeout/stimeout fix, mpjpeg boundary fix). 6 | - Minor improvements. 7 | 8 | 1.1 9 | ------ 10 | - Added link generation tool. 11 | - Improved main script. 12 | 13 | 1.0 14 | ------ 15 | Initial release. -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | ------------------------------------------- 3 | Copyright (c) 2020-2023 Carpe Diem Software Developing by Alex Versetty 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | 24 | Лицензия MIT 25 | ------------------------------------------- 26 | Copyright (c) 2020-2023 Carpe Diem Software Developing by Alex Versetty 27 | 28 | Данная лицензия разрешает лицам, получившим копию данного программного 29 | обеспечения и сопутствующей документации (в дальнейшем именуемыми «Программное 30 | Обеспечение»), безвозмездно использовать Программное Обеспечение без ограничений, 31 | включая неограниченное право на использование, копирование, изменение, слияние, 32 | публикацию, распространение, сублицензирование и/или продажу копий Программного 33 | Обеспечения, а также лицам, которым предоставляется данное Программное Обеспечение, 34 | при соблюдении следующих условий: 35 | 36 | Указанное выше уведомление об авторском праве и данные условия должны быть включены 37 | во все копии или значимые части данного Программного Обеспечения. 38 | 39 | ДАННОЕ ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ ПРЕДОСТАВЛЯЕТСЯ «КАК ЕСТЬ», БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ, 40 | ЯВНО ВЫРАЖЕННЫХ ИЛИ ПОДРАЗУМЕВАЕМЫХ, ВКЛЮЧАЯ ГАРАНТИИ ТОВАРНОЙ ПРИГОДНОСТИ, 41 | СООТВЕТСТВИЯ ПО ЕГО КОНКРЕТНОМУ НАЗНАЧЕНИЮ И ОТСУТСТВИЯ НАРУШЕНИЙ, НО НЕ 42 | ОГРАНИЧИВАЯСЬ ИМИ. НИ В КАКОМ СЛУЧАЕ АВТОРЫ ИЛИ ПРАВООБЛАДАТЕЛИ НЕ НЕСУТ 43 | ОТВЕТСТВЕННОСТИ ПО КАКИМ-ЛИБО ИСКАМ, ЗА УЩЕРБ ИЛИ ПО ИНЫМ ТРЕБОВАНИЯМ, В ТОМ ЧИСЛЕ, 44 | ПРИ ДЕЙСТВИИ КОНТРАКТА, ДЕЛИКТЕ ИЛИ ИНОЙ СИТУАЦИИ, ВОЗНИКШИМ ИЗ-ЗА ИСПОЛЬЗОВАНИЯ 45 | ПРОГРАММНОГО ОБЕСПЕЧЕНИЯ ИЛИ ИНЫХ ДЕЙСТВИЙ С ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ. 46 | -------------------------------------------------------------------------------- /MODX Revo plugin/INSTALL.txt: -------------------------------------------------------------------------------- 1 | Установка: 2 | 1. Скопировать папку "rtsp2html5" в корень сайта (www root). 3 | 2. В ModX создать пустой плагин и вставить в поле кода текст из файла plugin.php. 4 | 3. На той же странице создания нового плагина в разделе "Системные события" поставить галку напротив OnWebPagePrerender. 5 | 4. Отредактируйте в тексте плагина в блоке "Конфигурация" необходимые параметры (как минимум первые два нужно поменять). 6 | 7 | 8 | Installation: 9 | 1. Copy the "rtsp2html5" folder to the root of the site (www root). 10 | 2. In ModX, create an empty plugin and paste the text from the plugin.php file into the code field. 11 | 3. On the same page (creating a new plugin), in the "System events" section check option "OnWebPagePrerender". 12 | 4. Edit the necessary parameters in the plugin text in the "Configuration" block (at least the first two need to be changed). 13 | -------------------------------------------------------------------------------- /MODX Revo plugin/plugin.php: -------------------------------------------------------------------------------- 1 | **} 9 | //и преобразует в превью+ссылка на камеру 10 | 11 | //Description: 12 | //Searches the pages for strings like {camera***} 13 | //and converts to preview+url to camera 14 | 15 | /////////////////////////////// Конфигурация / Configuration //////////////////////////////////////////////////////////////////////////////////////////////// 16 | $key = ""; //указать тот же ключ, что прописан в camera.php 17 | //specify the same key that is specified in camera.php 18 | $server = "https://example.com/rtsp2html5"; // "https://example.com/rtsp2html5" заменить на URL-ссылку на веб-каталог, в который вы установили rtsp2html5 19 | // "https://example.com/rtsp2html5" replace with a URL to the web directory where you installed rtsp2html5 20 | $img_width = 360; //ширина снимка/видео 21 | $img_height = 202; //высота снимка/видео 22 | $title_font_size = '70%'; //размер шрифта для названий 23 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 24 | 25 | $key = url_encode($key); 26 | $camera_server_url = "{$server}/camera.php?b={$key}"; 27 | $output = &$modx->resource->_output; 28 | 29 | $regex = '/\{camera\*([^*\{]+)\*([^*\}]+)\*([^*\}]+)\}/'; 30 | $matches = array(); 31 | preg_match_all($regex, $output, $matches); 32 | 33 | if (count($matches) > 0) { 34 | for($i = 0; $i < count($matches[0]); $i++) { 35 | $name = $matches[1][$i]; 36 | $rtsp_encoded = urlencode(base64_encode($matches[2][$i])); 37 | $rtsp_lq_encoded = urlencode(base64_encode($matches[3][$i])); 38 | $jpeg_url = "{$camera_server_url}&a={$rtsp_encoded}&c={$rtsp_lq_encoded}&get=jpeg"; 39 | $click_url = "{$camera_server_url}&a={$rtsp_encoded}&c={$rtsp_lq_encoded}"; 40 | 41 | $html = ""; 45 | 46 | $output = str_replace($matches[0][$i], $html, $output); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /MODX Revo plugin/rtsp2html5/modx_plugin/cam-error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carpediem-av/rtsp2html5/3ccf14d3f98778a298ea6a881c85b45b77bc09ce/MODX Revo plugin/rtsp2html5/modx_plugin/cam-error.png -------------------------------------------------------------------------------- /MODX Revo plugin/rtsp2html5/modx_plugin/cam-loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carpediem-av/rtsp2html5/3ccf14d3f98778a298ea6a881c85b45b77bc09ce/MODX Revo plugin/rtsp2html5/modx_plugin/cam-loading.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # rtsp2html5 2 | A small and simple PHP-script to convert RTSP-stream from IP-cameras to HTML5-video (with switch to MJPEG on failure) 3 | This project uses library "ifvisible.js", developed by Serkan Yerşen, MIT license. 4 | 5 | Installation and usage: 6 | 7 | 1. Make new instance of Linux server (for example Debian) or use existing. 8 | 2. Install Apache, PHP 7.0+ and FFMpeg. 9 | 3. Get an SSL certificate for your server and install it (optional but highly recommended). 10 | 4. Сopy files of my script to root www directory of Apache. 11 | 5. Open "camera.php" in text editor and specify your security key (minimum 12 random chars; A-Z, a-z and 0-9 are allowed) in the "$key" variable. Specify in the "$redirectToIfBackground" variable where to redirect from the background tabs (i.e. url). 12 | 6. Generate links using the "linkgen_en.html" tool (open it in a browser). Place links on the pages of your broadcasting site. 13 | 14 | RTSP links can be found in the camera documentation. You can also do this through the third-party utility named "Onvif Device Manager". 15 | If your browser cannot play the video, then disable H.265 and H.264+ in the camera settings. Browsers only support H.264 (January 2022). 16 | 17 | --- 18 | 19 | Установка и использование скрипта: 20 | 21 | 1. Берете сервер, например, с Debian, ставите Apache+PHP7 и FFMpeg; 22 | 2. Получаете SSL-сертификат для своего сервера (необязательно, но строго рекомендуется); 23 | 3. Копируете файлы моего скрипта в любую доступную по www папку; 24 | 4. Открываете camera.php и указываете свой ключ (придумываете; допустима латиница и цифры) в переменной $key, а в $redirectToIfBackground указываете, куда переадресовывать из фоновых вкладок; 25 | 5. Создаете ссылки на камеры с помощью прилагаемого файла "linkgen_ru.html" (открыв его в браузере). Размещаете полученные ссылки на страницах своего сайта трансляций. 26 | 27 | Если есть затруднения с поиском RTSP-ссылок на вашу камеру, то можно использовать программу Onvif Device Manager. Она покажет ссылку снизу под видео, которое открывается кликом по пункту меню «Живое видео». 28 | 29 | Если вы планируете сайт с камерами сделать на MODX Revolution, то используйте приложенный плагин, упрощающий работу по размещению ссылок. Инструкция по установке плагинов есть в документации к этой CMS. После установки плагина откройте его на редактирование и в начале файла подставьте свои значения в $key и $camera_server_url (иными словами — замените текст, выделенный заглавными буквами, своим ключом и адресом сервера). 30 | 31 | После его установки, в тексте ваших страниц ссылки на камеры теперь можно указывать в таком виде: 32 | 33 | {camera\*НАЗВАНИЕ\*RTSP-ССЫЛКА\*RTSP-ССЫЛКА НА ВТОРОЙ ПОТОК} 34 | 35 | Название и RTSP-ссылки подставляете свои. Если нет ссылки на второй поток, то дублируете ссылку основного потока. 36 | 37 | По поводу безопасности. В принципе, если сервис будет непубличным, для чего и задумывался скрипт, то всё нормально. В противном случае, любой кто «подсмотрит» ссылку на camera.php, может вытащить исходную RTSP-ссылку, пароль на камеру (он прописывается в RTSP-ссылке), и сам секретный ключ $key. Пароль на камеру дает доступ к её админке, если вы пренебрегли созданием отдельной учетной записи на этой камере специально для RTSP. Секретный же ключ даст возможность через ваш сервер «крутить» сторонние камеры. Поэтому, данный скрипт только для частного доступа. Я мог бы реализовать шифрование параметров, но… при размещении в публичный доступ ввиду отсутствия кэширования видеоряда интернет-канал быстро «забьется», как и ресурсы на сервере. 38 | 39 | Внимание - убедитесь, что в камере выставлен формат кодирования видео H.264! Более новый H.265 не поддерживается большинством браузеров (на январь 2022 года). Также следует выключить опцию H.264+ в настройках камеры. 40 | 41 | Подробности в статье https://habr.com/ru/post/545888/ 42 | 43 | А вот здесь есть еще классные программы моего авторства: http://carpediem.0fees.us/ 44 | -------------------------------------------------------------------------------- /ffmpeg (portable linux x64)/FFmpeg License and Legal Considerations.url: -------------------------------------------------------------------------------- 1 | [InternetShortcut] 2 | URL=https://www.ffmpeg.org/legal.html 3 | -------------------------------------------------------------------------------- /ffmpeg (portable linux x64)/ffmpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carpediem-av/rtsp2html5/3ccf14d3f98778a298ea6a881c85b45b77bc09ce/ffmpeg (portable linux x64)/ffmpeg -------------------------------------------------------------------------------- /rtsp2html5/.htaccess: -------------------------------------------------------------------------------- 1 | Options -Indexes -------------------------------------------------------------------------------- /rtsp2html5/camera.php: -------------------------------------------------------------------------------- 1 | = 4) { 75 | return 'ffmpeg'; 76 | } 77 | else { 78 | return 'ffserver'; 79 | } 80 | } 81 | 82 | function disableBrowserCaching() 83 | { 84 | header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); 85 | header("Cache-Control: post-check=0, pre-check=0", false); 86 | header("Pragma: no-cache"); 87 | } 88 | 89 | function passthruErrorImg() 90 | { 91 | $errorImg = file_get_contents('error.png'); 92 | echo $errorImg; 93 | } 94 | 95 | // запрет доступа без указания ключа 96 | if (!isset($_REQUEST["b"]) || $_REQUEST["b"] !== $key) { 97 | echo "forbidden"; 98 | die; 99 | } 100 | 101 | if (isset($_REQUEST["get"])) { 102 | header('Accept-Ranges:bytes'); 103 | header('Connection:keep-alive'); 104 | 105 | if (ffmpeg_getVersion()[0] >= 5) { 106 | $timeout_opt = "-timeout {$timeout}"; 107 | } 108 | else { 109 | $timeout_opt = "-stimeout {$timeout}"; 110 | } 111 | 112 | $rtsp = str_replace("'", '', str_replace("\"", '', base64_decode($_REQUEST["a"]))); 113 | if (substr($rtsp, 0, 7) !== "rtsp://") die('RTSP URL is invalid!'); 114 | $ffmpeg_base = "{$ffmpeg_path} -rtsp_transport {$rtsp_transport} -probesize 32 {$timeout_opt} -i \"{$rtsp}\" -loglevel quiet"; 115 | 116 | if (isset($_REQUEST["c"])) { 117 | $rtsp_lq = str_replace("'", '', str_replace("\"", '', base64_decode($_REQUEST["c"]))); 118 | if (substr($rtsp_lq, 0, 7) !== "rtsp://") die('RTSP URL (sub/second stream) is invalid!'); 119 | $ffmpeg_base_lq = "{$ffmpeg_path} -rtsp_transport {$rtsp_transport} -probesize 32 {$timeout_opt} -i \"{$rtsp_lq}\" -loglevel quiet"; 120 | } 121 | else { 122 | $ffmpeg_base_lq = $ffmpeg_base; 123 | } 124 | 125 | switch ($_REQUEST["get"]) { 126 | case "jpeg": 127 | header("Cache-Control: public, max-age=60"); 128 | header('Content-type: image/jpeg'); 129 | if (getRAMUsage() > 80) passthruErrorImg(); 130 | else passthru("{$ffmpeg_base_lq} -vframes 1 -s {$jpeg_resolution} -q:v {$jpeg_quality} -f singlejpeg pipe:"); 131 | break; 132 | case "jpeg-hq": 133 | header("Cache-Control: public, max-age=60"); 134 | header('Content-type: image/jpeg'); 135 | if (getRAMUsage() > 80) passthruErrorImg(); 136 | else passthru("{$ffmpeg_base} -vframes 1 -q:v {$jpeg_quality} -f singlejpeg pipe:"); 137 | break; 138 | case "mjpeg": 139 | disableBrowserCaching(); 140 | $boundary = mpjpeg_getBoundary(); 141 | header("Content-type: multipart/x-mixed-replace;boundary={$boundary}"); 142 | passthru("{$ffmpeg_base_lq} -t {$duration_limit} -b:v {$mjpeg_bitrate} -s {$mjpeg_resolution} -r {$mjpeg_fps} -f mpjpeg pipe:"); 143 | break; 144 | case "mp4": 145 | disableBrowserCaching(); 146 | header('Content-type: video/mp4'); 147 | passthru("{$ffmpeg_base} -t {$duration_limit} -c copy -an -movflags empty_moov+omit_tfhd_offset+frag_keyframe+default_base_moof -f mp4 pipe:"); 148 | break; 149 | case "webm": 150 | disableBrowserCaching(); 151 | header('Content-type: video/webm'); 152 | passthru("{$ffmpeg_base_lq} -t {$duration_limit} -c:v vp8 -b:v {$webm_ogv_bitrate} -an -s {$webm_ogv_resolution} -r {$webm_ogv_fps} -f webm pipe:"); 153 | break; 154 | case "ogv": 155 | disableBrowserCaching(); 156 | header('Content-type: video/ogg'); 157 | passthru("{$ffmpeg_base_lq} -t {$duration_limit} -c:v libtheora -b:v {$webm_ogv_bitrate} -an -s {$webm_ogv_resolution} -r {$webm_ogv_fps} -f ogg pipe:"); 158 | break; 159 | } 160 | } 161 | else { 162 | $key_encoded = urlencode($key); 163 | $rtsp_url = urlencode($_REQUEST["a"]); 164 | $rtsp_lq_url = isset($_REQUEST["c"]) ? urlencode($_REQUEST["c"]) : $rtsp_url; 165 | $time = time(); 166 | echo << 168 | 169 | 170 | 171 | Видеонаблюдение 172 | 173 | 207 | 208 | 209 |
Загрузка...
210 | 211 | 217 | 268 | 269 | 270 | HTMLMARKER; 271 | } 272 | ?> -------------------------------------------------------------------------------- /rtsp2html5/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carpediem-av/rtsp2html5/3ccf14d3f98778a298ea6a881c85b45b77bc09ce/rtsp2html5/error.png -------------------------------------------------------------------------------- /rtsp2html5/ifvisible.js: -------------------------------------------------------------------------------- 1 | !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var i=e();for(var s in i)("object"==typeof exports?exports:t)[s]=i[s]}}(this,function(){return function(t){function e(s){if(i[s])return i[s].exports;var o=i[s]={exports:{},id:s,loaded:!1};return t[s].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(2)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s,o,n="active",r="idle",u="hidden",d=void 0;!function(t){function e(t,e){r[t]||(r[t]=[]),r[t].push(e)}function i(t,e){r[t]&&r[t].forEach(function(t){t.apply(void 0,e)})}function s(t,e){r[t]&&(r[t]=r[t].filter(function(t){return e!==t}))}function o(t,e,i){return n||(n=t.addEventListener?function(t,e,i){return t.addEventListener(e,i,!1)}:"function"==typeof t.attachEvent?function(t,e,i){return t.attachEvent("on"+e,i,!1)}:function(t,e,i){return t["on"+e]=i}),n(t,e,i)}var n,r={};t.attach=e,t.fire=i,t.remove=s,t.dom=o}(o=e.Events||(e.Events={}));var a=function(){function t(t,e,i){var s=this;this.ifvisible=t,this.seconds=e,this.callback=i,this.stopped=!1,this.start(),this.ifvisible.on("statusChanged",function(t){s.stopped===!1&&(t.status===n?s.start():s.pause())})}return t.prototype.start=function(){this.stopped=!1,clearInterval(this.token),this.token=setInterval(this.callback,1e3*this.seconds)},t.prototype.stop=function(){this.stopped=!0,clearInterval(this.token)},t.prototype.resume=function(){this.start()},t.prototype.pause=function(){this.stop()},t}();e.Timer=a,e.IE=function(){for(var t,e=3,i=document.createElement("div"),s=i.getElementsByTagName("i");i.innerHTML="",s[0];);return e>4?e:t}();var h=function(){function t(t,e){var i=this;if(this.root=t,this.doc=e,this.status=n,this.VERSION="2.0.10",this.timers=[],this.idleTime=3e4,this.isLegacyModeOn=!1,void 0!==this.doc.hidden?(s="hidden",d="visibilitychange"):void 0!==this.doc.mozHidden?(s="mozHidden",d="mozvisibilitychange"):void 0!==this.doc.msHidden?(s="msHidden",d="msvisibilitychange"):void 0!==this.doc.webkitHidden&&(s="webkitHidden",d="webkitvisibilitychange"),void 0===s)this.legacyMode();else{var r=function(){i.doc[s]?i.blur():i.focus()};r(),o.dom(this.doc,d,r)}this.startIdleTimer(),this.trackIdleStatus()}return t.prototype.legacyMode=function(){var t=this;if(!this.isLegacyModeOn){var i="blur",s="focus";e.IE<9&&(i="focusout"),o.dom(this.root,i,function(){return console.log("blurred"),t.blur()}),o.dom(this.root,s,function(){return t.focus()}),this.isLegacyModeOn=!0}},t.prototype.startIdleTimer=function(t){var e=this;t instanceof MouseEvent&&0===t.movementX&&0===t.movementY||(this.timers.map(clearTimeout),this.timers.length=0,this.status===r&&this.wakeup(),this.idleStartedTime=+new Date,this.timers.push(setTimeout(function(){if(e.status===n||e.status===u)return e.idle()},this.idleTime)))},t.prototype.trackIdleStatus=function(){o.dom(this.doc,"mousemove",this.startIdleTimer.bind(this)),o.dom(this.doc,"mousedown",this.startIdleTimer.bind(this)),o.dom(this.doc,"keyup",this.startIdleTimer.bind(this)),o.dom(this.doc,"touchstart",this.startIdleTimer.bind(this)),o.dom(this.root,"scroll",this.startIdleTimer.bind(this)),this.focus(this.startIdleTimer.bind(this))},t.prototype.on=function(t,e){return o.attach(t,e),this},t.prototype.off=function(t,e){return o.remove(t,e),this},t.prototype.setIdleDuration=function(t){return this.idleTime=1e3*t,this.startIdleTimer(),this},t.prototype.getIdleDuration=function(){return this.idleTime},t.prototype.getIdleInfo=function(){var t,e=+new Date;if(this.status===r)t={isIdle:!0,idleFor:e-this.idleStartedTime,timeLeft:0,timeLeftPer:100};else{var i=this.idleStartedTime+this.idleTime-e;t={isIdle:!1,idleFor:e-this.idleStartedTime,timeLeft:i,timeLeftPer:parseFloat((100-100*i/this.idleTime).toFixed(2))}}return t},t.prototype.idle=function(t){return t?this.on("idle",t):(this.status=r,o.fire("idle"),o.fire("statusChanged",[{status:this.status}])),this},t.prototype.blur=function(t){return t?this.on("blur",t):(this.status=u,o.fire("blur"),o.fire("statusChanged",[{status:this.status}])),this},t.prototype.focus=function(t){return t?this.on("focus",t):this.status!==n&&(this.status=n,o.fire("focus"),o.fire("wakeup"),o.fire("statusChanged",[{status:this.status}])),this},t.prototype.wakeup=function(t){return t?this.on("wakeup",t):this.status!==n&&(this.status=n,o.fire("wakeup"),o.fire("statusChanged",[{status:this.status}])),this},t.prototype.onEvery=function(t,e){return new a(this,t,e)},t.prototype.now=function(t){return void 0!==t?this.status===t:this.status===n},t}();e.IfVisible=h},function(t,e,i){(function(t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i(1),o="object"==typeof self&&self.self===self&&self||"object"==typeof t&&t.global===t&&t||this;e.ifvisible=new s.IfVisible(o,document)}).call(e,function(){return this}())}])}); -------------------------------------------------------------------------------- /rtsp2html5/index.html: -------------------------------------------------------------------------------- 1 | forbidden -------------------------------------------------------------------------------- /rtsp2html5/linkgen_en.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 |
12 | URL to camera.php:
13 |

14 | Security key (see configuration of camera.php):
15 |

16 | RTSP URL:
17 |

18 | RTSP URL, sub (second) stream:
19 |

20 |


21 | 22 | Generated link to video:
23 |

24 | Test!

25 | Generated link to snapshot:
26 |

27 | Test!

28 | Generated link to full-size snapshot:
29 |

30 | Test!

31 | Generated link to MJPEG video:
32 |

33 | Test!


34 | 35 | 76 |
77 | 78 | 79 | -------------------------------------------------------------------------------- /rtsp2html5/linkgen_ru.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 |
12 | URL на camera.php:
13 |

14 | Ключ доступа:
15 |

16 | RTSP-ссылка:
17 |

18 | RTSP-ссылка на второй поток:
19 |

20 |


21 | 22 | Сгенерированная ссылка на видео:
23 |

24 | Проверить!

25 | А также ссылка на снимок-превью:
26 |

27 | Проверить!

28 | Ссылка на полноразмерный снимок:
29 |

30 | Проверить!

31 | Ссылка на видео в формате MJPEG:
32 |

33 | Проверить!


34 | 35 | 76 |
77 | 78 | 79 | -------------------------------------------------------------------------------- /rtsp2html5/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: / 3 | --------------------------------------------------------------------------------