Closed DrDoug88 closed 2 years ago
I ended up solving my own problem. However, I will leave this post with a follow up for anyone else encountering the same issue. Basically, you have to ensure the Control Server is pointing to the right place in the Live plugin:
I am attempting to use the record live stream by user functionality along with the SendRecordedToEncoder plugin. I have selected the option from within the SendRecordedToEncoder plugin:
I have also enabled it for thie user:
I have also selected the option to Auto record this live:
In the NGINX config (nginx.conf), if I set it to record all, everything works correctly - the stream automatically gets recorded and when it has stopped, the result automatically gets sent to the recorder. My config is very similar to https://github.com/WWBN/AVideo/wiki/Record-Live-Stream, except I am using Adaptive Bit Rate functionality. But this doesn't really matter, it works correctly with "record all". If I set it to "record all manual", which I believe is required here, otherwise ALL streams will record (something I do not want), then nothing gets recorded.
About a minute into the second test (the failing one), I navigated to the following addresses:
https://example.com/plugin/SendRecordedToEncoder/callback.json.php?key=6198375a78bbc
Result: {"error":false,"msg":"","vars":[],"recordLimit":21600,"username":"User2@example.com","password":""}
https://example.com/plugin/SendRecordedToEncoder/recordStart.json.php?key=6198375a78bbc
Result:
{"error":false,"msg":"","callbackURL":"https:\/\/example.com\/plugin\/SendRecordedToEncoder\/callback.json.php?streamerURL=https%3A%2F%2Fexample.com%2F","callbackResponse":{"error":false,"msg":"","vars":[],"isTokenValid":true,"recordLimit":21600,"username":false,"password":""},"vars":{"PATH":"\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin","USER":"apache","HOME":"\/usr\/share\/httpd","SCRIPT_NAME":"\/plugin\/SendRecordedToEncoder\/recordStart.json.php","REQUEST_URI":"\/plugin\/SendRecordedToEncoder\/recordStart.json.php?key=6198375a78bbc","QUERY_STRING":"key=6198375a78bbc","REQUEST_METHOD":"GET","SERVER_PROTOCOL":"HTTP\/1.1","GATEWAY_INTERFACE":"CGI\/1.1","REMOTE_PORT":"54945","SCRIPT_FILENAME":"\/var\/www\/AVideo\/plugin\/SendRecordedToEncoder\/recordStart.json.php","SERVER_ADMIN":"root@localhost","CONTEXT_DOCUMENT_ROOT":"\/var\/www\/AVideo","CONTEXT_PREFIX":"","REQUEST_SCHEME":"https","DOCUMENT_ROOT":"\/var\/www\/AVideo","REMOTE_ADDR":"0.0.0.0","SERVER_PORT":"443","SERVER_ADDR":"206.83.72.32","SERVER_NAME":"example.com","SERVER_SOFTWARE":"Apache\/2.4.37 (centos) OpenSSL\/1.1.1g","SERVER_SIGNATURE":"","HTTP_SEC_GPC":"1","HTTP_COOKIE":"cross-site-cookie=name; yptDeviceID=02a5fc2e-173e-413e-9767-efa1d7288067; timezone=America\/Chicago; donotShowUnmuteAgain=true; _ga=GA1.2.1813320649.1636228690; socketInfoMinimized=0; #socketUser148=false; #socketUserfalse=false; #socketUser53=false; #socketUser3=false; socketInfoPositionTop=179; aVideoURL=https%3A%2F%2Fexample.com%2F; playerLoop=false; encoderd8a7a984ec099129fd4c87e2ada2c0de=cfi4abm2fsd70526ri2fpmkpng; autoplay=false; socketInfoPositionLeft=1518; compress=false; #socketUser8=false; yptChat2Minimized=true; cross-site-cookie=name; muted=false; key=value; 0af9fc9e4dca6c9a53d304e1c6b5306e=lg61de8284l88af6vk9mq89bvp; encoder_user=User2%40example.com; encoder_pass=1aced3886b0b5017b9d9ca4ba1047d7a; addView_PHPSESSID=false; addView_videos_id=false; addView_playerCurrentTime=false; addView_seconds_watching_video=false; rememberme=0; user=User2%40example.com; pass=1aced3886b0b5017b9d9ca4ba1047d7a","HTTP_ACCEPT_LANGUAGE":"en-US,en;q=0.9","HTTP_ACCEPT_ENCODING":"gzip, deflate, br","HTTP_SEC_FETCH_DEST":"document","HTTP_SEC_FETCH_USER":"?1","HTTP_SEC_FETCH_MODE":"navigate","HTTP_SEC_FETCH_SITE":"none","HTTP_ACCEPT":"text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/avif,image\/webp,image\/apng,\/;q=0.8,application\/signed-exchange;v=b3;q=0.9","HTTP_USER_AGENT":"Mozilla\/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/96.0.4664.45 Safari\/537.36","HTTP_UPGRADE_INSECURE_REQUESTS":"1","HTTP_SEC_CH_UA_PLATFORM":"\"Windows\"","HTTP_SEC_CH_UA_MOBILE":"?0","HTTP_SEC_CH_UA":"\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"96\", \"Google Chrome\";v=\"96\"","HTTP_CONNECTION":"keep-alive","HTTP_HOST":"example.com","proxy-nokeepalive":"1","SSL_TLS_SNI":"example.com","HTTPS":"on","UNIQUE_ID":"YZhMnUQCQIYaCCR76AqGtAAAAEk","FCGI_ROLE":"RESPONDER","PHP_SELF":"\/plugin\/SendRecordedToEncoder\/recordStart.json.php","REQUEST_TIME_FLOAT":1637371037.439063,"REQUEST_TIME":1637371037,"key":"6198375a78bbc","avideoToken":"OFFRVEZYLy9INHJ4bGp1b3AwV0MvV1R0SGEvYXYzeWZJWWRxZWN6MDhObkwra0NTM2pYYjJoMlRtdm51VUNoclkzL2xIcG1wM2F3VmcyZktYQ3p6dmVmYVZ5dmw2TXlTWXYwUTlwWlpsbFdWbzRhNGRWODc0UjJjSFdMcStTSkk="},"controlResponse":{"error":false,"msg":"","remoteResponse":true},"stopSchedule":false}
The short of it is, it works fine with "record all", but fails with "record all manual".