Closed swimitup closed 3 years ago
I am not sure, but can you please disable the LoginControl plugin and try again?
Disabled. No success.
streamer avideo.log (please note that on_publish_done tries to send socket throught ws, not wss):
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: Record Finish SCRIPT_NAME: /plugin/Live/on_record_done.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: NGINX ON Publish Done POST: {"app":"live","flashver":"FMLE\/3.0 (compatible; FMSc\/1.0)","swfurl":"rtmp:\/\/videos.nadar.tv\/live?p=1d1359ef16318027fb7ab8f6e65ac22d","tcurl":"rtmp:\/\/videos.nadar.tv\/live?p=1d1359ef16318027fb7ab8f6e65ac22d","pageurl":"","addr":"75.158.197.136","clientid":"550","call":"publish_done","name":"606ba8c7ae0fa","videoKeyframeFrequency":"2","totalDatarate":"2128","redirectUri":""} SCRIPT_NAME: /plugin/Live/on_publish_done.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: NGINX ON Publish Done GET: [] SCRIPT_NAME: /plugin/Live/on_publish_done.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: NGINX ON Publish Done php://inputapp=live&flashver=FMLE/3.0%20(compatible%3B%20FMSc/1.0)&swfurl=rtmp://videos.nadar.tv/live%3Fp=1d1359ef16318027fb7ab8f6e65ac22d&tcurl=rtmp://videos.nadar.tv/live%3Fp=1d1359ef16318027fb7ab8f6e65ac22d&pageurl=&addr=75.158.197.136&clientid=550&call=publish_done&name=606ba8c7ae0fa&videoKeyframeFrequency=2&totalDatarate=2128 SCRIPT_NAME: /plugin/Live/on_publish_done.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: NGINX ON Publish Done parse_url: {"scheme":"rtmp","host":"videos.nadar.tv","path":"\/live","query":"p=1d1359ef16318027fb7ab8f6e65ac22d"} SCRIPT_NAME: /plugin/Live/on_publish_done.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: NGINX ON Publish Done parse_str: {"p":"1d1359ef16318027fb7ab8f6e65ac22d"} SCRIPT_NAME: /plugin/Live/on_publish_done.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG:
***
Live::deleteStatsCache
function: _error_log_debug Line: {1689} File: {/var/www/videos.nadar.tv/public_html/plugin/Live/Live.php}
function: deleteStatsCache Line: {47} File: {/var/www/videos.nadar.tv/public_html/plugin/Live/on_publish_done.php}
*** SCRIPT_NAME: /plugin/Live/on_publish_done.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: NGINX on_record_done POST: {"app":"live","flashver":"FMLE\/3.0 (compatible; FMSc\/1.0)","swfurl":"rtmp:\/\/videos.nadar.tv\/live?p=1d1359ef16318027fb7ab8f6e65ac22d","tcurl":"rtmp:\/\/videos.nadar.tv\/live?p=1d1359ef16318027fb7ab8f6e65ac22d","pageurl":"","addr":"75.158.197.136","clientid":"550","call":"record_done","recorder":"video","name":"606ba8c7ae0fa","path":"\/var\/www\/tmp\/606ba8c7ae0fa-06-Apr-21-08:24:51.flv","videoKeyframeFrequency":"2","totalDatarate":"2128","redirectUri":""} SCRIPT_NAME: /plugin/Live/on_record_done.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: NGINX on_record_done GET: [] SCRIPT_NAME: /plugin/Live/on_record_done.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: NGINX on_record_done php://inputapp=live&flashver=FMLE/3.0%20(compatible%3B%20FMSc/1.0)&swfurl=rtmp://videos.nadar.tv/live%3Fp=1d1359ef16318027fb7ab8f6e65ac22d&tcurl=rtmp://videos.nadar.tv/live%3Fp=1d1359ef16318027fb7ab8f6e65ac22d&pageurl=&addr=75.158.197.136&clientid=550&call=record_done&recorder=video&name=606ba8c7ae0fa&path=/var/www/tmp/606ba8c7ae0fa-06-Apr-21-08:24:51.flv&videoKeyframeFrequency=2&totalDatarate=2128 SCRIPT_NAME: /plugin/Live/on_record_done.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: getStatsNotifications: 1 [{"file":"\/var\/www\/videos.nadar.tv\/public_html\/plugin\/Live\/Objects\/LiveTransmitionHistory.php","line":224,"function":"getStatsNotifications","args":[]},{"file":"\/var\/www\/videos.nadar.tv\/public_html\/plugin\/Live\/on_publish_done.php","line":53,"function":"getStatsAndRemoveApplication","class":"LiveTransmitionHistory","type":"::","args":[76]}] SCRIPT_NAME: /plugin/Live/on_publish_done.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: Live::getStatsObject[0] 4: cache not found SCRIPT_NAME: /plugin/Live/on_publish_done.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: Live::getStatsObject[0]: Creating a waitfile /var/www/videos.nadar.tv/public_html/videos/cache/a84fdc425fca22fe1f87e4a7a8db29b9 SCRIPT_NAME: /plugin/Live/on_publish_done.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG:
***
Live::get_data(https://videos.nadar.tv:8443/stat, 4)
function: _error_log_debug Line: {684} File: {/var/www/videos.nadar.tv/public_html/plugin/Live/Live.php}
function: get_data Line: {650} File: {/var/www/videos.nadar.tv/public_html/plugin/Live/Live.php}
function: getStatsObject Line: {1079} File: {/var/www/videos.nadar.tv/public_html/plugin/Live/Live.php}
function: _getStats Line: {882} File: {/var/www/videos.nadar.tv/public_html/plugin/Live/Live.php}
function: getStats Line: {6051} File: {/var/www/videos.nadar.tv/public_html/objects/functions.php}
function: getStatsNotifications Line: {224} File: {/var/www/videos.nadar.tv/public_html/plugin/Live/Objects/LiveTransmitionHistory.php}
function: getStatsAndRemoveApplication Line: {53} File: {/var/www/videos.nadar.tv/public_html/plugin/Live/on_publish_done.php}
*** SCRIPT_NAME: /plugin/Live/on_publish_done.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: Live::createStatsCache {"bytes":159,"cachefile":"\/var\/www\/videos.nadar.tv\/public_html\/videos\/cache\/YPTObjectCache\/getstats\/getstatsnotifications\/videos.nadar.tv\/http\/f7a3132fbc0bd7b82eb019f94e19a540.cache"} SCRIPT_NAME: /plugin/Live/on_publish_done.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: NGINX Live::on_publish_socket_notification sendSocketMessageToAll Start SCRIPT_NAME: /plugin/Live/on_publish_done.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: Socket Send: ws://videos.nadar.tv:2053?webSocketToken=U3NIdHhlNjRTVTFoWmNhTEI4MkZibzBreWNVeXFSQ0FyQk1QODBCRVhjV2xOV3ZIZ1o0OWluK3I0ZlJCb2FYWFpnK2F3empudWYxUXJrT1g0VjhySVRrSmlXOW9ka0hFdzNTdkdMV1J5MWI0VzNyN1pkZWRsYW1IQ0d0dXBIN1lMb0xkRnMwZTdnOWs4RkpYcDIrMnM4UUd3QW1vT1p6VkdiMzcra2pSSyt4RVFET0lOZ2YvOHpjSlBsRTB5M0JsWFdTVHpsQkVkQ0QrZ29KZTRYQTV0LzFHTlpvY1BtSndtK0JseTJEbzNxVzJkZWFVVkJzeUpiSEhoeHBkRlRSS0RvaE5reFpSQXFPVFdrODJIcjZnaklkaGlMMXBMVFNweTN4cTFHR1l3VWxxRDdaVWVVTkY1TlZKZDNvNTc5aDhvcHRMTlVwZDhpT1d5bmFYZkdleEdkMExEZHFGelY3cEgvRFZIMlZxaFg1QkNLenY0VzlranRNL09oUXB3RGFIWnpWRmNuRUVGTm1LajVDL09JaXlJV29QRzZkR000bWVwbUZWSWFEbmp5VFRUbHRtSjhZRk9EVzNLNnVpNXppaEZEZnJoZndHYzl6aGl1WDZBUVJFbEtCNENIVzlGMFhBVjVmMk1Zazd3alJXYS8yckF3SjdlcW9HKzM3RWJOamlrWGNjYk53TnR5T1JaT2ZmZHRLR2twbzFrMTNtV1M1UjA0bUpPTG5tZmQ3ODI4YXY5a1V5cjdiT2lqZFgrV1Bqc2tNTm0xVmhVOEdZbVlTOWtOUFgzZ2FVbVl3dEM4Y1hXQityMEJ3QVZ1THBSa21MYlFUR29EdTN0ZkRScUR2d0RFU3F4RlBWdVhMWklQeVAyN2FiY1E9PQ==&isCommandLine=1 SCRIPT_NAME: /plugin/Live/on_publish_done.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: Video::save (Teste on 06-Apr-21-08:24:51) Saved id = 1 SCRIPT_NAME: /plugin/Live/on_record_done.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: Video:clearCache(76) SCRIPT_NAME: /plugin/Live/on_record_done.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::ERROR: sendSocketMessage SCRIPT_NAME: /plugin/Live/on_publish_done.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: NGINX Live::on_publish_socket_notification SocketMessageToAll END SCRIPT_NAME: /plugin/Live/on_publish_done.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: deleteVideoTags getVideoTags76 SCRIPT_NAME: /plugin/Live/on_record_done.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: ObjectYPT::setLastDeleteALLCacheTime /var/www/videos.nadar.tv/public_html/videos/cache/lastDeleteALLCacheTime.cache SCRIPT_NAME: /plugin/Live/on_record_done.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: on_record_done Success: video saved on ID 76 SCRIPT_NAME: /plugin/Live/on_record_done.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: SEND To QUEUE: (https://encoder.nadar.tv/queue) {"user":"admin","pass":"1d1359ef16318027fb7ab8f6e65ac22d","fileURI":"http:\/\/videos.nadar.tv\/videos\/original_Testeon06Apr21082451_YPTuniqid_606c6fb7967eb0.19288147","filename":"Testeon06Apr21082451_YPTuniqid_606c6fb7967eb0.19288147","videos_id":76,"notifyURL":"http:\/\/videos.nadar.tv\/","inputHLS":1} SCRIPT_NAME: /plugin/Live/on_record_done.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::ERROR: Could not connect: Connection closed before handshake ws://videos.nadar.tv:2053?webSocketToken=U3NIdHhlNjRTVTFoWmNhTEI4MkZibzBreWNVeXFSQ0FyQk1QODBCRVhjV2xOV3ZIZ1o0OWluK3I0ZlJCb2FYWFpnK2F3empudWYxUXJrT1g0VjhySVRrSmlXOW9ka0hFdzNTdkdMV1J5MWI0VzNyN1pkZWRsYW1IQ0d0dXBIN1lMb0xkRnMwZTdnOWs4RkpYcDIrMnM4UUd3QW1vT1p6VkdiMzcra2pSSyt4RVFET0lOZ2YvOHpjSlBsRTB5M0JsWFdTVHpsQkVkQ0QrZ29KZTRYQTV0LzFHTlpvY1BtSndtK0JseTJEbzNxVzJkZWFVVkJzeUpiSEhoeHBkRlRSS0RvaE5reFpSQXFPVFdrODJIcjZnaklkaGlMMXBMVFNweTN4cTFHR1l3VWxxRDdaVWVVTkY1TlZKZDNvNTc5aDhvcHRMTlVwZDhpT1d5bmFYZkdleEdkMExEZHFGelY3cEgvRFZIMlZxaFg1QkNLenY0VzlranRNL09oUXB3RGFIWnpWRmNuRUVGTm1LajVDL09JaXlJV29QRzZkR000bWVwbUZWSWFEbmp5VFRUbHRtSjhZRk9EVzNLNnVpNXppaEZEZnJoZndHYzl6aGl1WDZBUVJFbEtCNENIVzlGMFhBVjVmMk1Zazd3alJXYS8yckF3SjdlcW9HKzM3RWJOamlrWGNjYk53TnR5T1JaT2ZmZHRLR2twbzFrMTNtV1M1UjA0bUpPTG5tZmQ3ODI4YXY5a1V5cjdiT2lqZFgrV1Bqc2tNTm0xVmhVOEdZbVlTOWtOUFgzZ2FVbVl3dEM4Y1hXQityMEJ3QVZ1THBSa21MYlFUR29EdTN0ZkRScUR2d0RFU3F4RlBWdVhMWklQeVAyN2FiY1E9PQ==&isCommandLine=1 SCRIPT_NAME: /plugin/Live/on_publish_done.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: Start Login Request SCRIPT_NAME: /objects/login.json.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: redirectUri: SCRIPT_NAME: /objects/login.json.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: same redirectUri: https://videos.nadar.tv/ SCRIPT_NAME: /objects/login.json.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: login.json.php trying to login SCRIPT_NAME: /objects/login.json.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: login.json.php login respond something SCRIPT_NAME: /objects/login.json.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: login.json.php is done SCRIPT_NAME: /objects/login.json.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: QUEUE CURL: (https://encoder.nadar.tv/queue) {"error":false,"response":""} SCRIPT_NAME: /plugin/Live/on_record_done.php
[06-Apr-2021 11:27:03 America/Sao_Paulo] AVideoLog::DEBUG: on_record_done END SCRIPT_NAME: /plugin/Live/on_record_done.php
[06-Apr-2021 11:27:22 America/Sao_Paulo] AVideoLog::DEBUG: Socket Send: wss://videos.nadar.tv:2053?webSocketToken=U3NIdHhlNjRTVTFoWmNhTEI4MkZibzBreWNVeXFSQ0FyQk1QODBCRVhjV2xOV3ZIZ1o0OWluK3I0ZlJCb2FYWFpnK2F3empudWYxUXJrT1g0VjhySVRrSmlXOW9ka0hFdzNTdkdMV1J5MWJURjVsNnhPdnVYbXBicGEyUUtpUVJSeThqcS8zTG9tTG8yR01xTVorRk5CRlltenNhSkFvbUhrVDQ1akE2elJOaEJwaHJ4aUZaRjlXZXNyQk90ZGM4c2p2TUh6bWE0S0JxdEExLzB2VHBQakRJcnYyTGlweThzRW0zYUpMbFlJK042SEZPWDdWczA2Uk1tWmN3a1czRk8rQ2tTRnVhQng0WTJNdXZLMkR3QmJkaXJQTzhQWFpTSVQzWUpGOXpYMnlOTVhjcWlrelFIWGl4bGs5YUEzeHB1aGk5Unh1c1lEZ0h5d1lTamlRRTBjcjRMTzhMYVVXRkVQL282Umsrb2cyYm5PTjdia0ZnNlIxK2Q3YUlPdkNIWGVTcWdhQWJwU3M2RW02dWJqWFhqWXRZcW5vOUhYV0tvQytwckNSWG1BeUp2akY4SldabHhQNk8yaGdWTlNvMFFYTlBGQ1I0dHlRd0FXTkNLR0dKcWdCd2JGdkpQV2UyaUVHL0hHR0RQVzBNTnoySVoyK294dUhjUHBFMEtxSHFCSmVSZ1ZrMWJJaW9WSHB5WHBXOU14aDBYa2xIUUs5M2ozQTB1ZVl0MGRuVHBkcFpOVllETDJpUm1SOXpKSWdnVlVFaXBrVGRTR0ZRcHBXV285dEhsWFhzcXRXWitVM3YzTjE2NlMyeGxoMzdwVytkaWNDalB4N2RTNnA1WldZbnAzTDdnSDM0U01yU0ZGaUNlZHZ5QSs0M0JUdSszOTJEWFhqSll6VWUzeGJkdDVyM0tMemlhTzR4NUFLVTBJY3gyTWlCeXJ4a3FKNCt5ZDJQR1l5N1luMG53ZzFFYlhTU3pLSThEZStwUTcvb0VRa1BJU2NDOWlCeHpnZzB0YjVR&isCommandLine=1 SCRIPT_NAME: /plugin/LiveUsers/view/beat.json.php
[06-Apr-2021 11:27:22 America/Sao_Paulo] AVideoLog::ERROR: sendSocketMessage SCRIPT_NAME: /plugin/LiveUsers/view/beat.json.php
encoder avideo.log:
[06-Apr-2021 08:27:03 America/Denver] login.json: Login::run
[06-Apr-2021 08:27:03 America/Denver] Sent Login variables try to login
[06-Apr-2021 08:27:03 America/Denver] Login::run (admin, ***, http://videos.nadar.tv/, 1)
[06-Apr-2021 08:27:03 America/Denver] Login::run request login user (admin)
[06-Apr-2021 08:27:03 America/Denver] Login::run request login complete user (admin)
[06-Apr-2021 08:27:03 America/Denver] Login::run got an object
[06-Apr-2021 08:27:03 America/Denver] createIfNotExists:: admin
[06-Apr-2021 08:27:03 America/Denver] http://videos.nadar.tv/ == https://videos.nadar.tv/
[06-Apr-2021 08:27:03 America/Denver] http://videos.nadar.tv/ == http://localhost/AVideo/
[06-Apr-2021 08:27:03 America/Denver] http://videos.nadar.tv/ == http://127.0.0.1/AVideo/
[06-Apr-2021 08:27:03 America/Denver] http://videos.nadar.tv/ == https://localhost/AVideo/
[06-Apr-2021 08:27:03 America/Denver] http://videos.nadar.tv/ == https://127.0.0.1/AVideo/
[06-Apr-2021 08:27:03 America/Denver] Login:: done session_id = kk6ecl4sr2j0ar223ilpqlvldq session_login true
[06-Apr-2021 08:27:03 America/Denver] There is no streamer site
nginx error.log shows the file is correctly copied into /var/www/tmp:
2021/04/06 08:26:22 [info] 60769#0: *579 client timed out (110: Connection timed out) while waiting for request, client: 75.158.197.136, server: 0.0.0.0:8443
2021/04/06 08:26:55 [info] 60769#0: *583 client prematurely closed connection while sending response to client, client: 177.33.137.206, server: videos.nadar.tv, request: "GET /live/606ba8c7ae0fa_mid/70.ts HTTP/1.1", host: "videos.nadar.tv:8443", referrer: "https://videos.nadar.tv/"
2021/04/06 08:27:03 [info] 60769#0: *550 disconnect, client: 75.158.197.136, server: 0.0.0.0:1935
2021/04/06 08:27:03 [info] 60769#0: *550 deleteStream, client: 75.158.197.136, server: 0.0.0.0:1935
2021/04/06 08:27:03 [info] 60769#0: *550 notify: publish_done 'videos.nadar.tv/plugin/Live/on_publish_done.php', client: 75.158.197.136, server: 0.0.0.0:1935
2021/04/06 08:27:03 [info] 60769#0: *550 exec: terminating child 83459, client: 75.158.197.136, server: 0.0.0.0:1935
2021/04/06 08:27:03 [info] 60769#0: *550 notify: record_done recorder=video path='/var/www/tmp/606ba8c7ae0fa-06-Apr-21-08:24:51.flv' url='videos.nadar.tv/plugin/Live/on_record_done.php', client: 75.158.197.136, server: 0.0.0.0:1935
2021/04/06 08:27:03 [info] 60769#0: *552 disconnect, client: 127.0.0.1, server: 0.0.0.0:1935
2021/04/06 08:27:03 [info] 60769#0: *552 deleteStream, client: 127.0.0.1, server: 0.0.0.0:1935
2021/04/06 08:27:03 [info] 60769#0: *561 disconnect, client: 127.0.0.1, server: 0.0.0.0:1935
2021/04/06 08:27:03 [info] 60769#0: *561 deleteStream, client: 127.0.0.1, server: 0.0.0.0:1935
2021/04/06 08:27:03 [info] 60769#0: *560 disconnect, client: 127.0.0.1, server: 0.0.0.0:1935
2021/04/06 08:27:03 [info] 60769#0: *560 deleteStream, client: 127.0.0.1, server: 0.0.0.0:1935
2021/04/06 08:27:03 [info] 60769#0: *559 disconnect, client: 127.0.0.1, server: 0.0.0.0:1935
2021/04/06 08:27:03 [info] 60769#0: *559 deleteStream, client: 127.0.0.1, server: 0.0.0.0:1935
2021/04/06 08:27:03 [notice] 60769#0: signal 17 (SIGCHLD) received from 83459
2021/04/06 08:27:03 [alert] 60769#0: unknown process 83459 exited on signal 9
2021/04/06 08:27:03 [info] 60769#0: epoll_wait() failed (4: Interrupted system call)
20
The process go well from live streaming to saving flv to /var/www/tmp directory, to /var/www/tmp to streamer videos folder. All test recordings are located in the videos folder, but somehow the encoder queue command does not proceed.
streamer avideo.log (please note that on_publish_done tries to send socket throught ws, not wss):
As stated, this little problem was holding the video to continue the encoding process...
I started tracing and find out this function in the YPTSocket plugin:
public static function getWebSocketURL($isCommandLine=false, $webSocketToken='') {
global $global;
$socketobj = AVideoPlugin::getDataObject("YPTSocket");
$address = $socketobj->host;
$port = $socketobj->port;
$protocol = "ws";
$scheme = parse_url($global['webSiteRootURL'], PHP_URL_SCHEME);
if(strtolower($scheme)==='https'){
$protocol = "wss";
}
if(empty($webSocketToken)){
$webSocketToken = getEncryptedInfo(0);
}
return "{$protocol}://{$address}:{$port}?webSocketToken={$webSocketToken}&isCommandLine=".intval($isCommandLine);
}
The $scheme always returned as "http", leading $protocol to be always "ws", not the expected "wss".
The $global['webSiteRootURL'] parsed based on the configuration file inside videos directory.
if(!empty($_SERVER['SERVER_NAME']) && $_SERVER['SERVER_NAME']!=='localhost' && !filter_var($_SERVER['SERVER_NAME'], FILTER_VALIDATE_IP)) {
// get the subdirectory, if exists
$file = str_replace("\\", "/", __FILE__);
$subDir = str_replace(array($_SERVER["DOCUMENT_ROOT"], 'videos/configuration.php'), array('',''), $file);
$global['webSiteRootURL'] = "http".(!empty($_SERVER['HTTPS'])?"s":"")."://".$_SERVER['SERVER_NAME'].$subDir;
}else{
$global['webSiteRootURL'] = 'https://videos.nadar.tv/';
}
Since the requisition came from plugin/Live/on_publish_done.php via nginx, when Apache take control of the requisition, it applied some rules found in the /etc/apache2/sites-available/your-site.conf
RewriteEngine on
# Go to https if not on /plugin/Live/
RewriteCond %{SERVER_PORT} =80
RewriteCond %{THE_REQUEST} !/plugin/Live/ [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Go to http if on /for on_connect.php, on_done.php, on_play.php , on_publish.php , on_record_done.php /
RewriteCond %{SERVER_PORT} !=80
RewriteCond %{THE_REQUEST} /plugin/Live/* [NC]
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
The above instruction was inserted in an apache2 conf file when was trying to solve adaptive bitrate live streaming. Seems to work, but affected this little ws/wss problem. Might affect other stuff that triggers sockets from the plugin/Live directory.
If I remove the apache2 conf instructions, and put something like this:
RewriteEngine on
RewriteCond %{SERVER_NAME} =videos.nadar.tv
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
The live streaming does not work:
...And if I put other solution found in this repository
RewriteEngine On
# Force HTTPS
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/plugin/Live/on_publish.php$ [NC]
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Ensure that Careers page is not forced over HTTPS
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} ^/plugin/Live/on_publish.php$ [NC]
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
...it will not work either.
So, for me, the solution was edit configuration.php and force the variable $global['webSiteRootURL'] to have https, commenting the if statement:
//if(!empty($_SERVER['SERVER_NAME']) && $_SERVER['SERVER_NAME']!=='localhost' && !filter_var($_SERVER['SERVER_NAME'], FILTER_VALIDATE_IP)) {
// get the subdirectory, if exists
// $file = str_replace("\\", "/", __FILE__);
// $subDir = str_replace(array($_SERVER["DOCUMENT_ROOT"], 'videos/configuration.php'), array('',''), $file);
// $global['webSiteRootURL'] = "http".(!empty($_SERVER['HTTPS'])?"s":"")."://".$_SERVER['SERVER_NAME'].$subDir;
//}else{
$global['webSiteRootURL'] = 'https://videos.nadar.tv/';
//}
Any thoughts on this?
BTW,
the "resolution" of a HLS livestreamed video returned "p".
If I use "bulk encode" in the encoder and select the original file, it gives me the correct resolution:
Hi
sorry for the late reply, and seems like most of your solutions are correct the only missing thing that I see is the on_publish ... in your nginx.conf file.
none of the on_ parameters on Nginx can direct to a HTTPS protocol, you must stick on the HTTP (Nginx + RTMP limitation)
try to use the IP instead of the domain on the on_ parameters
Regarding the resolution wait for the transfer to complete then clear your cache.
The automatic encoded videos from the live streaming did not generate the 3 resolutions expected (580, 720 and 1080 or low, sd and hd)
If I use the encoder manually, it gives me the right videos:
Regarding the resolution wait for the transfer to complete then clear your cache.
The transfer was already done. Cache cleared. Nothing change, still only "p" shown.
If iI try upload a livestreamed converted video to Vimeo, it gives me this message:
Link to download the MP4 works:
@swimitup hello , the solution works only if you don't have automatic redirect . Meaning , you don't have any global redirect on apache or cnd ( cloudflare etc ).
RewriteEngine On
# Force HTTPS
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/plugin/Live/on_publish.php$ [NC]
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Ensure that Careers page is not forced over HTTPS
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} ^/plugin/Live/on_publish.php$ [NC]
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
To be able to know if your config does work , you should be able to access yoursite.com/plugin/Live/on_publish.php via http , without redirect of https . If you were successful , clear the cache , and try the stream .
Hi @akhilleusuggo , I'm not sure if the error 401 means that https://your-site/plugin/Live/on_publish.php works, because I get the code accessing both http and https. Since it is "Unauthorized" error, it seems to me that the script works, does it? Edit: I do not use CDN or global redirect.
Hi
sorry for the late reply, @swimitup so you are saying if you disable the automatic encoding resolutions it works? is your encoder up to date? if you use the automatic you should get the resolution number on the filename/folder name, NOT hd, sd and low
regarding the download I got this, I guess you removed the file
sorry for the late reply, @swimitup so you are saying if you disable the automatic encoding resolutions it works?
No. I'm saying the video files created after a live streaming stopped are generated in 3 resolutions (ok), but they are named as low, sd and hd, not as the number as supposed to be.
is your encoder up to date? if you use the automatic you should get the resolution number on the filename/folder name, NOT hd, sd and low
regarding the download I got this, I guess you removed the file
I restricted the access to the website because I was receiving a lot of hacking attacks...
Ok, so you are not using the automatic encoder resolutions correct?
I recommend you to use the automatic option
I am using automatic encoder, I think:
Correct, I can see you are using,
maybe you are using an old encoder. you not suppose to receive the hd, sd and low resolutions
we are using version 3.8 on encoder
Now I am really confused, how did you create the hd, sd and low and not the resolution numbers
I've just livestreamed one test:
https://videos.nadar.tv/video/18/facebook-video-10164033660125068?channelName=Nadartv
The encoder screen:
Result:
Here's the encoder log for the last live streaming, maybe could help to find something:
[08-Apr-2021 14:34:59 America/Denver] getImage Destination get Temp Image from https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8 jpg: /var/www/encoder.nadar.tv/public_html/view/img/OnAir.jpg
[08-Apr-2021 14:34:59 America/Denver] getImage Destination get Temp Image from https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8 gif: /var/www/encoder.nadar.tv/public_html/view/img/notfound.gif
[08-Apr-2021 14:34:59 America/Denver] Exec get Image: ffmpeg -i "https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8" -f image2 -s 400x225 -vframes 1 -y /tmp/85fdffa251b8832c2a9e5e7c596cea90.jpg
[08-Apr-2021 14:34:59 America/Denver] Create Gif Pallet: ffmpeg -y -t 3 -i "https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8" -vf fps=10,scale=320:-1:flags=lanczos,palettegen /tmp/85fdffa251b8832c2a9e5e7c596cea90palette.png
[08-Apr-2021 14:34:59 America/Denver] getImage Destination get Temp Image from https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8 gif: /var/www/encoder.nadar.tv/public_html/view/img/notfound.gif
[08-Apr-2021 14:34:59 America/Denver] Create Gif no Pallet: ffmpeg -y -t 3 -i "https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8" -vf fps=10,scale=320:-1 /tmp/85fdffa251b8832c2a9e5e7c596cea90.gif
[08-Apr-2021 14:34:59 America/Denver] Create Gif Pallet: ffmpeg -y -t 3 -i "https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8" -vf fps=10,scale=320:-1:flags=lanczos,palettegen /tmp/85fdffa251b8832c2a9e5e7c596cea90palette.png
[08-Apr-2021 14:34:59 America/Denver] Create Gif no Pallet: ffmpeg -y -t 3 -i "https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8" -vf fps=10,scale=320:-1 /tmp/85fdffa251b8832c2a9e5e7c596cea90.gif
[08-Apr-2021 14:35:00 America/Denver] getImage Destination get Temp Image from https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8 jpg: /var/www/encoder.nadar.tv/public_html/view/img/OnAir.jpg
[08-Apr-2021 14:35:00 America/Denver] Exec get Image: ffmpeg -i "https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8" -f image2 -s 400x225 -vframes 1 -y /tmp/85fdffa251b8832c2a9e5e7c596cea90.jpg
[08-Apr-2021 14:35:00 America/Denver] getImage Destination get Temp Image from https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8 jpg: /var/www/encoder.nadar.tv/public_html/view/img/OnAir.jpg
[08-Apr-2021 14:35:00 America/Denver] Exec get Image: ffmpeg -i "https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8" -f image2 -s 400x225 -vframes 1 -y /tmp/85fdffa251b8832c2a9e5e7c596cea90.jpg
[08-Apr-2021 14:35:00 America/Denver] getImage Destination get Temp Image from https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8 gif: /var/www/encoder.nadar.tv/public_html/view/img/notfound.gif
[08-Apr-2021 14:35:00 America/Denver] Create Gif Pallet: ffmpeg -y -t 3 -i "https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8" -vf fps=10,scale=320:-1:flags=lanczos,palettegen /tmp/85fdffa251b8832c2a9e5e7c596cea90palette.png
[08-Apr-2021 14:35:00 America/Denver] Create Gif no Pallet: ffmpeg -y -t 3 -i "https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8" -vf fps=10,scale=320:-1 /tmp/85fdffa251b8832c2a9e5e7c596cea90.gif
[08-Apr-2021 14:35:04 America/Denver] getImage Destination get Image from https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8 gif: /tmp/85fdffa251b8832c2a9e5e7c596cea90.gif
[08-Apr-2021 14:35:04 America/Denver] getImage Destination get Image from https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8 jpg: /tmp/85fdffa251b8832c2a9e5e7c596cea90.jpg
[08-Apr-2021 14:35:05 America/Denver] getImage Destination get Image from https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8 gif: /tmp/85fdffa251b8832c2a9e5e7c596cea90.gif
[08-Apr-2021 14:35:05 America/Denver] getImage Destination get Image from https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8 gif: /tmp/85fdffa251b8832c2a9e5e7c596cea90.gif
[08-Apr-2021 14:35:06 America/Denver] getImage Destination get Image from https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8 gif: /tmp/85fdffa251b8832c2a9e5e7c596cea90.gif
[08-Apr-2021 14:35:06 America/Denver] getImage Destination get Image from https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8 jpg: /tmp/85fdffa251b8832c2a9e5e7c596cea90.jpg
[08-Apr-2021 14:35:06 America/Denver] getImage Destination get Image from https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8 gif: /tmp/85fdffa251b8832c2a9e5e7c596cea90.gif
[08-Apr-2021 14:35:06 America/Denver] getImage Destination get Image from https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8 gif: /tmp/85fdffa251b8832c2a9e5e7c596cea90.gif
[08-Apr-2021 14:35:06 America/Denver] getImage Destination get Image from https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8 jpg: /tmp/85fdffa251b8832c2a9e5e7c596cea90.jpg
[08-Apr-2021 14:35:06 America/Denver] getImage Destination get Image from https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8 gif: /tmp/85fdffa251b8832c2a9e5e7c596cea90.gif
[08-Apr-2021 14:35:07 America/Denver] getImage Destination get Image from https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8 gif: /tmp/85fdffa251b8832c2a9e5e7c596cea90.gif
[08-Apr-2021 14:35:08 America/Denver] getImage Destination get Image from https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8 gif: /tmp/85fdffa251b8832c2a9e5e7c596cea90.gif
[08-Apr-2021 14:35:08 America/Denver] getImage Destination get Image from https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8 gif: /tmp/85fdffa251b8832c2a9e5e7c596cea90.gif
[08-Apr-2021 14:35:08 America/Denver] getImage Destination get Image from https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8 gif: /tmp/85fdffa251b8832c2a9e5e7c596cea90.gif
[08-Apr-2021 14:35:09 America/Denver] getImage Destination get Image from https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8 gif: /tmp/85fdffa251b8832c2a9e5e7c596cea90.gif
[08-Apr-2021 14:35:09 America/Denver] getImage Destination get Image from https://videos.nadar.tv:8443/live/606f663db5bbf.m3u8 gif: /tmp/85fdffa251b8832c2a9e5e7c596cea90.gif
[08-Apr-2021 14:35:54 America/Denver] login.json: Login::run
[08-Apr-2021 14:35:54 America/Denver] Sent Login variables try to login
[08-Apr-2021 14:35:54 America/Denver] Login::run (admin, ***, https://videos.nadar.tv/, 1)
[08-Apr-2021 14:35:54 America/Denver] Login::run request login user (admin)
[08-Apr-2021 14:35:54 America/Denver] Login::run request login complete user (admin)
[08-Apr-2021 14:35:54 America/Denver] Login::run got an object
[08-Apr-2021 14:35:54 America/Denver] createIfNotExists:: admin
[08-Apr-2021 14:35:54 America/Denver] Verification Start https://videos.nadar.tv/
[08-Apr-2021 14:35:54 America/Denver] Verification GetFrom Cache https://videos.nadar.tv/
[08-Apr-2021 14:35:54 America/Denver] Verification Response (): {"msg":["Start","https:\/\/videos.nadar.tv\/ Site was inactive"],"verified":true,"status":"i"}
[08-Apr-2021 14:35:54 America/Denver] Login:: almost done
[08-Apr-2021 14:35:54 America/Denver] Login:: done session_id = bpd0dsr7pfuevqp2j377ptlkcp session_login true
[08-Apr-2021 14:35:54 America/Denver] decideFormatOrder: {"user":"admin","pass":"1d1359ef16318027fb7ab8f6e65ac22d","fileURI":"https:\/\/videos.nadar.tv\/videos\/original_Testeon08Apr21143458_YPTuniqid_606f692ac67eb8.26096484","filename":"Testeon08Apr21143458_YPTuniqid_606f692ac67eb8.26096484","videos_id":91,"notifyURL":"https:\/\/videos.nadar.tv\/","inputHLS":"1"}
[08-Apr-2021 14:35:54 America/Denver] decideFormatOrder: Multi bitrate HLS encrypted
[08-Apr-2021 14:35:54 America/Denver] AVideo-Encoder Format::getFromOrder(9)
[08-Apr-2021 14:35:54 America/Denver] Encoder::save id=() title=(original_Testeon08Apr21143458_YPTuniqid_606f692ac67eb8)
[08-Apr-2021 14:35:55 America/Denver] getReturn_vars {"videos_id":91}
[08-Apr-2021 14:35:55 America/Denver] Encoder::save id=(48) title=(original_Testeon08Apr21143458_YPTuniqid_606f692ac67eb8)
[08-Apr-2021 14:35:55 America/Denver] downloadFile: start queue_id = 48
[08-Apr-2021 14:35:55 America/Denver] downloadFile: url = https://videos.nadar.tv/videos/original_Testeon08Apr21143458_YPTuniqid_606f692ac67eb8.26096484
[08-Apr-2021 14:35:55 America/Denver] downloadFile:strpos global['webSiteRootURL'] = https://encoder.nadar.tv/
[08-Apr-2021 14:35:55 America/Denver] downloadFile: keep the same URL
[08-Apr-2021 14:35:55 America/Denver] downloadFile: downloadedFile = https://videos.nadar.tv/videos/original_Testeon08Apr21143458_YPTuniqid_606f692ac67eb8.26096484 | url = https://videos.nadar.tv/videos/original_Testeon08Apr21143458_YPTuniqid_606f692ac67eb8.26096484
[08-Apr-2021 14:35:55 America/Denver] Try to get UTF8 URL https://videos.nadar.tv/videos/original_Testeon08Apr21143458_YPTuniqid_606f692ac67eb8.26096484
[08-Apr-2021 14:35:55 America/Denver] Try to get UTF8 decode URL https://videos.nadar.tv/videos/original_Testeon08Apr21143458_YPTuniqid_606f692ac67eb8.26096484
[08-Apr-2021 14:35:55 America/Denver] downloadFile: success
[08-Apr-2021 14:35:55 America/Denver] Encoder::save id=(48) title=(original_Testeon08Apr21143458_YPTuniqid_606f692ac67eb8)
[08-Apr-2021 14:35:55 America/Denver] downloadFile: {"error":false,"filename":"48_tmpFile.m3u8","pathFileName":"\/var\/www\/encoder.nadar.tv\/public_html\/videos\/48_tmpFile.m3u8"}
[08-Apr-2021 14:35:55 America/Denver] Encoder::save id=(48) title=(original_Testeon08Apr21143458_YPTuniqid_606f692ac67eb8)
[08-Apr-2021 14:35:55 America/Denver] sendImages: Sending image to [91]
[08-Apr-2021 14:35:55 America/Denver] Duration found: 0:00:56
[08-Apr-2021 14:35:55 America/Denver] sendImages: AVideo-Encoder sending file to https://videos.nadar.tv/objects/aVideoEncoderReceiveImage.json.php
[08-Apr-2021 14:35:55 America/Denver] sendImages: AVideo-Encoder reading file from /var/www/encoder.nadar.tv/public_html/videos/48_tmpFile.m3u8
[08-Apr-2021 14:35:55 America/Denver] getImage: ffmpeg -ss 00:00:28 -i "/var/www/encoder.nadar.tv/public_html/videos/48_tmpFile.m3u8" -vframes 1 -y "/var/www/encoder.nadar.tv/public_html/videos/48_tmpFile.m3u8.jpg"
[08-Apr-2021 14:35:55 America/Denver] getImage: takes 0.27254390716553 sec to complete
[08-Apr-2021 14:35:55 America/Denver] getGifImage
[08-Apr-2021 14:35:55 America/Denver] getGif: Starts
[08-Apr-2021 14:35:56 America/Denver] getGif: takes 0.96059012413025 sec to complete
[08-Apr-2021 14:35:57 America/Denver] getWebpImage
[08-Apr-2021 14:35:57 America/Denver] getWebpImage: Starts
[08-Apr-2021 14:35:58 America/Denver] getWebpImage: takes 1.2031178474426 sec to complete
[08-Apr-2021 14:35:58 America/Denver] sendImages: curl_init
[08-Apr-2021 14:35:58 America/Denver] sendImages: curl_exec
[08-Apr-2021 14:35:58 America/Denver] sendImages: AVideo-Streamer answer {"error":false,"video_id":91,"jpgDest":"\/var\/www\/videos.nadar.tv\/public_html\/videos\/Testeon08Apr21143458_YPTuniqid_606f692ac67eb8.26096484.jpg","jpgDestSize":"40.26KB","gifDest":"\/var\/www\/videos.nadar.tv\/public_html\/videos\/Testeon08Apr21143458_YPTuniqid_606f692ac67eb8.26096484.gif","gifDestSize":"403.27KB","webpDest":"\/var\/www\/videos.nadar.tv\/public_html\/videos\/Testeon08Apr21143458_YPTuniqid_606f692ac67eb8.26096484.webp","webpDestSize":"341.43KB"}
[08-Apr-2021 14:35:58 America/Denver] {"error":false,"file":"\/var\/www\/encoder.nadar.tv\/public_html\/videos\/48_tmpFile.m3u8","target":"https:\/\/videos.nadar.tv\/objects\/aVideoEncoderReceiveImage.json.php","postFields":7,"response_raw":"{\"error\":false,\"video_id\":91,\"jpgDest\":\"\\\/var\\\/www\\\/videos.nadar.tv\\\/public_html\\\/videos\\\/Testeon08Apr21143458_YPTuniqid_606f692ac67eb8.26096484.jpg\",\"jpgDestSize\":\"40.26KB\",\"gifDest\":\"\\\/var\\\/www\\\/videos.nadar.tv\\\/public_html\\\/videos\\\/Testeon08Apr21143458_YPTuniqid_606f692ac67eb8.26096484.gif\",\"gifDestSize\":\"403.27KB\",\"webpDest\":\"\\\/var\\\/www\\\/videos.nadar.tv\\\/public_html\\\/videos\\\/Testeon08Apr21143458_YPTuniqid_606f692ac67eb8.26096484.webp\",\"webpDestSize\":\"341.43KB\"}","response":{"error":false,"video_id":91,"jpgDest":"\/var\/www\/videos.nadar.tv\/public_html\/videos\/Testeon08Apr21143458_YPTuniqid_606f692ac67eb8.26096484.jpg","jpgDestSize":"40.26KB","gifDest":"\/var\/www\/videos.nadar.tv\/public_html\/videos\/Testeon08Apr21143458_YPTuniqid_606f692ac67eb8.26096484.gif","gifDestSize":"403.27KB","webpDest":"\/var\/www\/videos.nadar.tv\/public_html\/videos\/Testeon08Apr21143458_YPTuniqid_606f692ac67eb8.26096484.webp","webpDestSize":"341.43KB"}}
[08-Apr-2021 14:35:58 America/Denver] Encoder::save id=(48) title=(original_Testeon08Apr21143458_YPTuniqid_606f692ac67eb8)
[08-Apr-2021 14:35:58 America/Denver] AVideo-Encoder Format::run(/var/www/encoder.nadar.tv/public_html/videos/48_tmpFile.m3u8, 48)
[08-Apr-2021 14:35:58 America/Denver] run (else): 9
[08-Apr-2021 14:35:58 America/Denver] AVideo-Encoder Format::getFromOrder(9)
[08-Apr-2021 14:35:58 America/Denver] AVideo-Encoder Format::exec [29, /var/www/encoder.nadar.tv/public_html/videos/48_tmpFile.m3u8, /var/www/encoder.nadar.tv/public_html/videos/avideoTmpFile_48_streamers_id_1_.m3u8, 48] code=(ffmpeg -re -i {$pathFileName} -c:a aac -strict -2 -b:a 128k -c:v libx264 -vf scale=-2:360 -g 48 -keyint_min 48 -sc_threshold 0 -bf 3 -b_strategy 2 -b:v 800k -maxrate 856k -bufsize 1200k -f hls -hls_time 6 -hls_list_size 0 -hls_key_info_file {$destinationFile}keyinfo {$destinationFile}low/index.m3u8 -c:a aac -strict -2 -b:a 128k -c:v libx264 -vf scale=-2:540 -g 48 -keyint_min 48 -sc_threshold 0 -bf 3 -b_strategy 2 -b:v 1400k -maxrate 1498k -bufsize 2100k -f hls -hls_time 6 -hls_list_size 0 -hls_key_info_file {$destinationFile}keyinfo {$destinationFile}sd/index.m3u8 -c:a aac -strict -2 -b:a 128k -c:v libx264 -vf scale=-2:720 -g 48 -keyint_min 48 -sc_threshold 0 -bf 3 -b_strategy 2 -b:v 2800k -maxrate 2996k -bufsize 4200k -f hls -hls_time 6 -hls_list_size 0 -hls_key_info_file {$destinationFile}keyinfo {$destinationFile}hd/index.m3u8)
[08-Apr-2021 14:35:58 America/Denver] AVideo-Encoder Format::exec Start Encoder [ffmpeg -re -i /var/www/encoder.nadar.tv/public_html/videos/48_tmpFile.m3u8 -c:a aac -strict -2 -b:a 128k -c:v libx264 -vf scale=-2:360 -g 48 -keyint_min 48 -sc_threshold 0 -bf 3 -b_strategy 2 -b:v 800k -maxrate 856k -bufsize 1200k -f hls -hls_time 6 -hls_list_size 0 -hls_key_info_file /var/www/encoder.nadar.tv/public_html/videos/avideoTmpFile_48_streamers_id_1_/keyinfo /var/www/encoder.nadar.tv/public_html/videos/avideoTmpFile_48_streamers_id_1_/low/index.m3u8 -c:a aac -strict -2 -b:a 128k -c:v libx264 -vf scale=-2:540 -g 48 -keyint_min 48 -sc_threshold 0 -bf 3 -b_strategy 2 -b:v 1400k -maxrate 1498k -bufsize 2100k -f hls -hls_time 6 -hls_list_size 0 -hls_key_info_file /var/www/encoder.nadar.tv/public_html/videos/avideoTmpFile_48_streamers_id_1_/keyinfo /var/www/encoder.nadar.tv/public_html/videos/avideoTmpFile_48_streamers_id_1_/sd/index.m3u8 -c:a aac -strict -2 -b:a 128k -c:v libx264 -vf scale=-2:720 -g 48 -keyint_min 48 -sc_threshold 0 -bf 3 -b_strategy 2 -b:v 2800k -maxrate 2996k -bufsize 4200k -f hls -hls_time 6 -hls_list_size 0 -hls_key_info_file /var/www/encoder.nadar.tv/public_html/videos/avideoTmpFile_48_streamers_id_1_/keyinfo /var/www/encoder.nadar.tv/public_html/videos/avideoTmpFile_48_streamers_id_1_/hd/index.m3u8]
[08-Apr-2021 14:35:58 America/Denver] Encoder::save id=(48) title=(original_Testeon08Apr21143458_YPTuniqid_606f692ac67eb8)
[08-Apr-2021 14:38:56 America/Denver] Encoder::save id=(48) title=(original_Testeon08Apr21143458_YPTuniqid_606f692ac67eb8)
[08-Apr-2021 14:38:56 America/Denver] Encoder::save id=(48) title=(original_Testeon08Apr21143458_YPTuniqid_606f692ac67eb8)
[08-Apr-2021 14:38:56 America/Denver] posProcessHLS: ZIP start /var/www/encoder.nadar.tv/public_html/videos/avideoTmpFile_48_streamers_id_1_/
[08-Apr-2021 14:38:58 America/Denver] posProcessHLS: ZIP created /var/www/encoder.nadar.tv/public_html/videos/avideoTmpFile_48_streamers_id_1_.zip 37.96MB
[08-Apr-2021 14:38:58 America/Denver] getReturn_vars {"videos_id":91}
[08-Apr-2021 14:38:58 America/Denver] Encoder::save id=(48) title=(original_Testeon08Apr21143458_YPTuniqid_606f692ac67eb8)
[08-Apr-2021 14:38:58 America/Denver] Encoder::send() order_id=9
[08-Apr-2021 14:38:58 America/Denver] Encoder::send() NOT multiResolutionOrder
[08-Apr-2021 14:38:58 America/Denver] Encoder::send webmOnly
[08-Apr-2021 14:38:58 America/Denver] Encoder::sendFileToDownload videos_id=91, format=zip
[08-Apr-2021 14:38:58 America/Denver] {"status":"error", "msg":"getDurationFromFile ERROR, File (/var/www/encoder.nadar.tv/public_html/videos/avideoTmpFile_48_streamers_id_1_.mp4) Not Found"}
[08-Apr-2021 14:38:58 America/Denver] Encoder::sendFileToDownload sending file to https://videos.nadar.tv/aVideoEncoder.json
[08-Apr-2021 14:38:58 America/Denver] Encoder::sendFileToDownload reading file from /var/www/encoder.nadar.tv/public_html/videos/avideoTmpFile_48_streamers_id_1_.zip
[08-Apr-2021 14:39:02 America/Denver] AVideo-Streamer answer 2 {"error":false,"video_id":91}
[08-Apr-2021 14:39:02 America/Denver] {"error":false,"format":"zip","file":"\/var\/www\/encoder.nadar.tv\/public_html\/videos\/avideoTmpFile_48_streamers_id_1_.zip","resolution":"","videoDownloadedLink":null,"target":"https:\/\/videos.nadar.tv\/aVideoEncoder.json","postFields":12,"videoFileSize":"37.96MB","response_raw":"{\"error\":false,\"video_id\":91}","response":{"error":false,"video_id":91}}
[08-Apr-2021 14:39:02 America/Denver] Encoder::save id=(48) title=(original_Testeon08Apr21143458_YPTuniqid_606f692ac67eb8)
[08-Apr-2021 14:39:02 America/Denver] Encoder:sendFileChunk no need, we could download
[08-Apr-2021 14:39:02 America/Denver] Encoder::send() response {"error":false,"format":"zip","file":"\/var\/www\/encoder.nadar.tv\/public_html\/videos\/avideoTmpFile_48_streamers_id_1_.zip","resolution":"","videoDownloadedLink":null,"target":"https:\/\/videos.nadar.tv\/aVideoEncoder.json","postFields":12,"videoFileSize":"37.96MB","response_raw":"{\"error\":false,\"video_id\":91}","response":{"error":false,"video_id":91}}
[08-Apr-2021 14:39:02 America/Denver] Encoder::save id=(48) title=(original_Testeon08Apr21143458_YPTuniqid_606f692ac67eb8)
[08-Apr-2021 14:39:02 America/Denver] Encoder::save id=(48) title=(original_Testeon08Apr21143458_YPTuniqid_606f692ac67eb8)
[08-Apr-2021 14:39:02 America/Denver] getReturn_vars {"videos_id":91}
[08-Apr-2021 14:39:02 America/Denver] AVideo-Encoder sending confirmation to https://videos.nadar.tv/objects/aVideoEncoderNotifyIsDone.json.php
[08-Apr-2021 14:39:02 America/Denver] getSpritsFromVideo: /usr/bin/php "/var/www/encoder.nadar.tv/public_html/objects/createSpiritsFromVideo.php" "https://videos.nadar.tv/videos/Testeon08Apr21143458_YPTuniqid_606f692ac67eb8.26096484/index.m3u8?token=eyJzYWx0IjoiaHR0cHM6XC9cL3ZpZGVvcy5uYWRhci50diIsInRva2VuVGltZU91dCI6IjM2MCIsImZpbGVuYW1lIjoiVGVzdGVvbjA4QXByMjExNDM0NThfWVBUdW5pcWlkXzYwNmY2OTJhYzY3ZWI4LjI2MDk2NDg0IiwidGltZSI6MTYxNzkxNDM0Mn0=" "0.56" "150" "84" "/var/www/encoder.nadar.tv/public_html/videos/sprit_ef4ce5e31106e9e637b91eb96f136a52.jpg" "100" "ef4ce5e31106e9e637b91eb96f136a52"
[08-Apr-2021 14:39:02 America/Denver] CreateSpirits: creating directory /var/www/encoder.nadar.tv/public_html/videos/thumbs_ef4ce5e31106e9e637b91eb96f136a52/
[08-Apr-2021 14:39:02 America/Denver] CreateSpirits: ffmpeg -i "https://videos.nadar.tv/videos/Testeon08Apr21143458_YPTuniqid_606f692ac67eb8.26096484/index.m3u8?token=eyJzYWx0IjoiaHR0cHM6XC9cL3ZpZGVvcy5uYWRhci50diIsInRva2VuVGltZU91dCI6IjM2MCIsImZpbGVuYW1lIjoiVGVzdGVvbjA4QXByMjExNDM0NThfWVBUdW5pcWlkXzYwNmY2OTJhYzY3ZWI4LjI2MDk2NDg0IiwidGltZSI6MTYxNzkxNDM0Mn0=" -map 0:v:0 -vf fps=1/0.56 -s 150x84 /var/www/encoder.nadar.tv/public_html/videos/thumbs_ef4ce5e31106e9e637b91eb96f136a52/out%03d.png
[08-Apr-2021 14:39:02 America/Denver] AVideo-Streamer confirmation answer {"error":false,"video_id":91}
[08-Apr-2021 14:39:02 America/Denver] {"error":false,"target":"https:\/\/videos.nadar.tv\/objects\/aVideoEncoderNotifyIsDone.json.php","postFields":{"videos_id":91,"user":"admin","password":"1d1359ef16318027fb7ab8f6e65ac22d","fail":0},"response_raw":"{\"error\":false,\"video_id\":91}","response":{"error":false,"video_id":91}}
[08-Apr-2021 14:39:02 America/Denver] Encoder::save id=(48) title=(original_Testeon08Apr21143458_YPTuniqid_606f692ac67eb8)
[08-Apr-2021 14:39:05 America/Denver] CreateSpirits: removing directory /var/www/encoder.nadar.tv/public_html/videos/thumbs_ef4ce5e31106e9e637b91eb96f136a52/
there is something strange in your encoder.
as long as you are using automatic resolutions you should see something like this
does this happen only with the recorded files or also with uploaded files?
BTW please check this update https://github.com/WWBN/AVideo/commit/7b310ba21d42f9343eff0332d623cf5e18ede2fc
make sure you got it
update was ok:
maybe the -re ffmpeg flag that did not work and was removed... ? #4879
does this happen only with the recorded files or also with uploaded files?
does your encoder screen look like mine?
does this happen only with the recorded files or also with uploaded files?
recorded files only. just tested for uploaded and it is ok:
does your encoder screen look like mine?
Only for uploaded videos. I've added back the ffmpeg -re flag, restart nginx, and nothing change for livestreamed videos encoding...
Ok, so the resolution thing should be something on the Recorder plugin I will check that and release an update in the future.
just to make clear, you want to upload files to Vimeo correct? but Vimeo supports only MP4 to upload, we cannot upload HLS. In the future, we will update the Vimeo plugin to use the download feature to generate the MP4 from HLS and upload it, so this issue will not be fixed now.
is there anything else that I am missing?
just to make clear, you want to upload files to Vimeo correct? but Vimeo supports only MP4 to upload, we cannot upload HLS. In the future, we will update the Vimeo plugin to use the download feature to generate the MP4 from HLS and upload it, so this issue will not be fixed now.
understood. when in production, i will find a way to do it manually until have something automatically.
is there anything else that I am missing?
no, for now it's ok. i really appreciate your help in all this cases.
I'm streaming a test, and notice that no finished streamed video are sent to encoder. There are a lot of this kind of video in myvideos list:
streamer and encoder in the same server. both up-to-date. v10.5 streamer, v3.8 encoder.
streamer log:
streamed video is still on /var/www/tmp directory.
encoder log:
nginx log:
Live plugin parameters:
{"button_title":"LIVE","server":"rtmp://videos.nadar.tv/live","playerServer":"https://videos.nadar.tv:8443/live","stats":"https://videos.nadar.tv:8443/stat","restreamerURL":"https://videos.nadar.tv/plugin/Live/standAloneFiles/restreamer.json.php","controlURL":"https://videos.nadar.tv/plugin/Live/standAloneFiles/control.json.php","disableRestream":false,"disableDVR":false,"disableGifThumbs":false,"disableLiveThumbs":false,"hideTopButton":false,"useAadaptiveMode":true,"protectLive":false,"experimentalWebcam":false,"doNotShowLiveOnVideosList":false,"doNotShowOnlineOfflineLabel":false,"doNotShowLiveOnCategoryList":false,"doNotShowOfflineLiveOnCategoryList":false,"limitLiveOnVideosList":"12","doNotProcessNotifications":false,"useLiveServers":false,"disableMeetCamera":false,"playLiveInFullScreen":false,"playLiveInFullScreenOnIframe":false,"hls_path":"/HLS/live","requestStatsTimout":"4","cacheStatsTimout":"15","requestStatsInterval":"15","streamDeniedMsg":"You can not stream live videos","allowMultipleLivesPerUser":true}
recorder video on rmtp section from nginx.conf working. on_record_done also working according to avideo.log.
reboot full server. no success. already watch some similar issues (#3911, #3981, #3813, #4728, #4593, #4613 and on...)
i remembered i changed the streamer admin password. does this mean the encoder admin user may have login problem ?