WWBN / AVideo

Create Your Own Broadcast Network With AVideo Platform Open-Source. OAVP OVP
https://avideo.tube/AVideo_OpenSource
Other
1.9k stars 972 forks source link

Question about SendRecodedtoencoder #2177

Closed maxlinux2000 closed 4 years ago

maxlinux2000 commented 4 years ago

I'm configuring the plugin I there is the webSiteRootURL: that I don't understand..

Captura de pantalla de 2019-10-21 16-34-17

the site is in https://mytube.com in same server I have: https://encoder.mytube.com

the local path is: /var/www/html/mytube.com/YouPHPTube and /var/www/html/mytube.com/YouPHPTube-Encoder/

witch one?

Another question.... in the nginx config there is:

server {
                    listen 1935;
                    allow play all;
                    #creates our "live" full-resolution HLS
videostream from our incoming encoder stream and tells where to put
the HLS video manifest and video fragments
                    application live {
                            allow play all;
                            live on;
                            #record all;
                            #record_path /video_recordings;
                            #record_unique on;

I have to uncomment #record all; and configure #record_path ??

The HLS folder is in /HLS

regards MaX

DanielnetoDotCom commented 4 years ago

please paste your full nginx.conf, I may be able to help you better

maxlinux2000 commented 4 years ago

hera you have it:

# cat /usr/local/nginx/conf/nginx.conf
    worker_processes  1;
    error_log  logs/error.log debug;
    events {
            worker_connections  1024;
    }
    rtmp {
            server {
                    listen 1935;
                    allow play all;
                    #creates our "live" full-resolution HLS videostream from our incoming encoder stream and tells where to put the HLS video manifest and video fragments
                    application live {
                            allow play all;
                            live on;
                            #record all;
                            #record_path /video_recordings;
                            #record_unique on;
                            hls on;
                            hls_nested on;
                            hls_path /HLS/live;
                            #hls_playlist_length 4s;
                            #hls_fragment 1s;
                            hls_fragment 10s;
                            on_publish http://live.mytube.com/plugin/Live/on_publish.php;
                            on_play http://mytube.com/plugin/Live/on_play.php;
                            on_record_done http://mytube.com/plugin/Live/on_record_done.php;
                    }
            }
    }
    http {
            include       mime.types;
            default_type  application/octet-stream;
            server {
                    listen 8080;
                    server_name localhost mytube.com;
                    #creates the http-location for our full-resolution (desktop) HLS stream - "http://my-ip/live/my-stream-key/index.m3u8"      
                    location /live {
                            # Disable cache
                            add_header 'Cache-Control' 'no-cache';

                            # CORS setup
                            add_header 'Access-Control-Allow-Origin' '*' always;
                            add_header 'Access-Control-Expose-Headers' 'Content-Length';

                            # allow CORS preflight requests
                            if ($request_method = 'OPTIONS') {
                                    add_header 'Access-Control-Allow-Origin' '*';
                                    add_header 'Access-Control-Max-Age' 1728000;
                                    add_header 'Content-Type' 'text/plain charset=UTF-8';
                                    add_header 'Content-Length' 0;
                                    return 204;
                            }
                            types {
                                    application/vnd.apple.mpegurl m3u8;
                            }
                            alias /HLS/live;
                    }
                    #allows us to see how stats on viewers on our Nginx site using a URL like: "http://my-ip/stats"     
                    #location /stats {
                    #        stub_status;
                    #}
                    location /stat {
                            rtmp_stat all;
                            rtmp_stat_stylesheet stat.xsl;
                    }
                    location /stat.xsl {
                            root html;
                    }
                    location /control {
                            rtmp_control all;
                    }
                    #allows us to host some webpages which can show our videos: "http://my-ip/my-page.html"     
                    location / {
                            root   html;
                            index  index.html index.htm;
                    }

            listen 444 ssl; # managed by Certbot
            ssl_certificate /etc/letsencrypt/live/mytube.com-0001/fullchain.pem; # managed by Certbot
            ssl_certificate_key /etc/letsencrypt/live/mytube.com-0001/privkey.pem; # managed by Certbot
            include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot

            }
    }
root@s1:~# 
DanielnetoDotCom commented 4 years ago
    worker_processes  1;
    error_log  logs/error.log debug;
    events {
            worker_connections  1024;
    }
    rtmp {
            server {
                    listen 1935;
                    allow play all;
                    #creates our "live" full-resolution HLS videostream from our incoming encoder stream and tells where to put the HLS video manifest and video fragments
                    application live {
                            allow play all;
                            live on;
                            #record all;
                            #record_path /video_recordings;
                            #record_unique on;
                            hls on;
                            hls_nested on;
                            hls_path /HLS/live;
                            #hls_playlist_length 4s;
                            #hls_fragment 1s;
                            hls_fragment 10s;
                            on_publish http://live.mytube.com/plugin/Live/on_publish.php;
                            on_play http://mytube.com/plugin/Live/on_play.php;
                            on_record_done http://mytube.com/plugin/Live/on_record_done.php;
                           recorder video{
                               record all;
                               record_path /var/www/tmp;
                               record_notify on;
                               record_max_size 2048M; 
                               #will produce files of the form yourUserKey-24-Apr-13-18:23:38.flv
                               record_suffix -%d-%b-%y-%T.flv;
                           }
                    }
            }
    }
    http {
            include       mime.types;
            default_type  application/octet-stream;
            server {
                    listen 8080;
                    server_name localhost mytube.com;
                    #creates the http-location for our full-resolution (desktop) HLS stream - "http://my-ip/live/my-stream-key/index.m3u8"      
                    location /live {
                            # Disable cache
                            add_header 'Cache-Control' 'no-cache';

                            # CORS setup
                            add_header 'Access-Control-Allow-Origin' '*' always;
                            add_header 'Access-Control-Expose-Headers' 'Content-Length';

                            # allow CORS preflight requests
                            if ($request_method = 'OPTIONS') {
                                    add_header 'Access-Control-Allow-Origin' '*';
                                    add_header 'Access-Control-Max-Age' 1728000;
                                    add_header 'Content-Type' 'text/plain charset=UTF-8';
                                    add_header 'Content-Length' 0;
                                    return 204;
                            }
                            types {
                                    application/vnd.apple.mpegurl m3u8;
                            }
                            alias /HLS/live;
                    }
                    #allows us to see how stats on viewers on our Nginx site using a URL like: "http://my-ip/stats"     
                    #location /stats {
                    #        stub_status;
                    #}
                    location /stat {
                            rtmp_stat all;
                            rtmp_stat_stylesheet stat.xsl;
                    }
                    location /stat.xsl {
                            root html;
                    }
                    location /control {
                            rtmp_control all;
                    }
                    #allows us to host some webpages which can show our videos: "http://my-ip/my-page.html"     
                    location / {
                            root   html;
                            index  index.html index.htm;
                    }

            listen 444 ssl; # managed by Certbot
            ssl_certificate /etc/letsencrypt/live/mytube.com-0001/fullchain.pem; # managed by Certbot
            ssl_certificate_key /etc/letsencrypt/live/mytube.com-0001/privkey.pem; # managed by Certbot
            include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot

            }
    }

Make sure you create a directory /var/www/tmp and make it writable, just make it 777

maxlinux2000 commented 4 years ago

tnx for help! :)

there is an strange error root@s1:/usr/local/nginx/conf# /usr/local/nginx/sbin/nginx -s reload nginx: [emerg] "record_max_size" directive invalid value in /usr/local/nginx/conf/nginx.conf:30

for the moment I commented line 30...

but I don't know why nginx don't accept the directive "record_max_size" In the documentation there is an example https://github.com/arut/nginx-rtmp-module/wiki/Directives#record_max_size

2048M is too much?

maxlinux2000 commented 4 years ago

ok I lowered to 2000M and now is working... perhaps depend of the RAM avalaible?

DanielnetoDotCom commented 4 years ago

I see, good to know.

XemTube-TV commented 4 years ago

@maxlinux2000 Sorry I had a small problem yesterday, so I cannot comment on the problem. I'm glad you fixed the error.

maxlinux2000 commented 4 years ago

Hi all, the plugin still not working, I think that in the modal window (swal) is missing websiterooturl

Captura de pantalla de 2019-10-22 07-21-00

in /var/www/tmp there is some video files

ls /var/www/tmp/
5dada4a091549-22-Oct-19-07:09:17.flv  5dada4a091549-22-Oct-19-07:29:08.flv
5dada4a091549-22-Oct-19-07:10:26.flv  5dada4a091549-22-Oct-19-07:42:58.flv
5dada4a091549-22-Oct-19-07:26:53.flv

I tried to put in the websiterooturl the url of encoder antd the website too,buth nothig.

Looking in the encoder, there are no videos processing

Any idea?

XemTube-TV commented 4 years ago

Please let me know which Plugin you are using does not work?

DanielnetoDotCom commented 4 years ago

You do not need to ser the webSiteRootURL

check your streamer and your nginx log files

XemTube-TV commented 4 years ago

@maxlinux2000 Do you want me to review the configuration for you? If you agree, please send your account to my mail. I will review where the error problem comes from for you.

maxlinux2000 commented 4 years ago

Thanks for the offer, but this time I want to solve the problem myself to understand and learn from it

I have clear the logs and start a Live from mobile with the app.

Here the logs just starting the streaming form app.


========================================================================================
/usr/local/nginx/logs/error.log---------------------------------------------------------

2019/10/22 15:11:27 [info] 6582#0: *10414 client connected '199.150.224.215'
2019/10/22 15:11:27 [info] 6582#0: *10414 connect: app='live' args='p=78f6520b4ecee62b24eb474a3fe3ce4a' flashver='FMLE/3.0 (compatible; Lavf57.56' swf_url='' tc_url='rtmp://live.mytube.com/live?p=78f6520b4ecee62b24eb474a3fe3ce4a' page_url='' acodecs=3575 vcodecs=252 object_encoding=0, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/22 15:11:27 [info] 6582#0: *10414 createStream, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/22 15:11:28 [info] 6582#0: *10414 publish: name='5dada4a091549' args='' type=live silent=0, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/22 15:11:28 [info] 6582#0: *10414 notify: publish 'live.mytube.com/plugin/Live/on_publish.php', client: 199.150.224.215, server: 0.0.0.0:1935
========================================================================================
/usr/local/nginx/logs/access.log--------------------------------------------------------

192.168.0.2 - - [22/Oct/2019:15:11:32 +0200] "GET /stat HTTP/1.0" 200 1344 "-" "-"
========================================================================================
/var/www/html/mytube.com/YouPHPTube/videos/youphptube.log----------------------------

    [host] => live.mytube.com
    [path] => /live
    [query] => p=78f6520b4ecee62b24eb474a3fe3ce4a
)

[22-Oct-2019 15:11:28 Europe/Berlin] Array
(
    [p] => 78f6520b4ecee62b24eb474a3fe3ce4a
)

========================================================================================
/var/www/html/mytube.com/YouPHPTube-Encoder/videos/youphptube.log-------------------

root@s1:~# 

Below the logs just after closed the streaming from the app.

========================================================================================
/usr/local/nginx/logs/error.log---------------------------------------------------------

2019/10/22 15:11:27 [info] 6582#0: *10414 client connected '199.150.224.215'
2019/10/22 15:11:27 [info] 6582#0: *10414 connect: app='live' args='p=78f6520b4ecee62b24eb474a3fe3ce4a' flashver='FMLE/3.0 (compatible; Lavf57.56' swf_url='' tc_url='rtmp://live.mytube.com/live?p=78f6520b4ecee62b24eb474a3fe3ce4a' page_url='' acodecs=3575 vcodecs=252 object_encoding=0, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/22 15:11:27 [info] 6582#0: *10414 createStream, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/22 15:11:28 [info] 6582#0: *10414 publish: name='5dada4a091549' args='' type=live silent=0, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/22 15:11:28 [info] 6582#0: *10414 notify: publish 'live.mytube.com/plugin/Live/on_publish.php', client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/22 15:11:54 [info] 6582#0: *10414 closeStream, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/22 15:11:54 [info] 6582#0: *10414 notify: record_done recorder=video path='/var/www/tmp/5dada4a091549-22-Oct-19-15:11:28.flv' url='mytube.com/plugin/Live/on_record_done.php', client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/22 15:11:54 [info] 6582#0: *10414 disconnect, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/22 15:11:54 [info] 6582#0: *10414 deleteStream, client: 199.150.224.215, server: 0.0.0.0:1935
========================================================================================
/usr/local/nginx/logs/access.log--------------------------------------------------------

192.168.0.2 - - [22/Oct/2019:15:11:32 +0200] "GET /stat HTTP/1.0" 200 1344 "-" "-"
192.168.0.2 - - [22/Oct/2019:15:11:42 +0200] "GET /stat HTTP/1.0" 200 1365 "-" "-"
192.168.0.2 - - [22/Oct/2019:15:11:54 +0200] "GET /stat HTTP/1.0" 200 1363 "-" "-"
199.150.224.215 [22/Oct/2019:15:11:54 +0200] PUBLISH "live" "5dada4a091549" "" - 4517938 738 "" "FMLE/3.0 (compatible; Lavf57.56" (27s)
========================================================================================
/var/www/html/mytube.com/YouPHPTube/videos/youphptube.log----------------------------

    [host] => live.mytube.com
    [path] => /live
    [query] => p=78f6520b4ecee62b24eb474a3fe3ce4a
)

[22-Oct-2019 15:11:28 Europe/Berlin] Array
(
    [p] => 78f6520b4ecee62b24eb474a3fe3ce4a
)

========================================================================================
/var/www/html/mytube.com/YouPHPTube-Encoder/videos/youphptube.log-------------------

root@s1:~# 

More log after 30 secs

========================================================================================
/usr/local/nginx/logs/error.log---------------------------------------------------------

2019/10/22 15:11:27 [info] 6582#0: *10414 client connected '199.150.224.215'
2019/10/22 15:11:27 [info] 6582#0: *10414 connect: app='live' args='p=78f6520b4ecee62b24eb474a3fe3ce4a' flashver='FMLE/3.0 (compatible; Lavf57.56' swf_url='' tc_url='rtmp://live.mytube.com/live?p=78f6520b4ecee62b24eb474a3fe3ce4a' page_url='' acodecs=3575 vcodecs=252 object_encoding=0, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/22 15:11:27 [info] 6582#0: *10414 createStream, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/22 15:11:28 [info] 6582#0: *10414 publish: name='5dada4a091549' args='' type=live silent=0, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/22 15:11:28 [info] 6582#0: *10414 notify: publish 'live.mytube.com/plugin/Live/on_publish.php', client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/22 15:11:54 [info] 6582#0: *10414 closeStream, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/22 15:11:54 [info] 6582#0: *10414 notify: record_done recorder=video path='/var/www/tmp/5dada4a091549-22-Oct-19-15:11:28.flv' url='mytube.com/plugin/Live/on_record_done.php', client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/22 15:11:54 [info] 6582#0: *10414 disconnect, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/22 15:11:54 [info] 6582#0: *10414 deleteStream, client: 199.150.224.215, server: 0.0.0.0:1935
========================================================================================
/usr/local/nginx/logs/access.log--------------------------------------------------------

192.168.0.2 - - [22/Oct/2019:15:12:38 +0200] "GET /stat HTTP/1.0" 200 572 "-" "-"
192.168.0.2 - - [22/Oct/2019:15:12:49 +0200] "GET /stat HTTP/1.0" 200 572 "-" "-"
192.168.0.2 - - [22/Oct/2019:15:13:00 +0200] "GET /stat HTTP/1.0" 200 572 "-" "-"
192.168.0.2 - - [22/Oct/2019:15:13:11 +0200] "GET /stat HTTP/1.0" 200 572 "-" "-"
192.168.0.2 - - [22/Oct/2019:15:13:22 +0200] "GET /stat HTTP/1.0" 200 572 "-" "-"
192.168.0.2 - - [22/Oct/2019:15:13:33 +0200] "GET /stat HTTP/1.0" 200 572 "-" "-"
192.168.0.2 - - [22/Oct/2019:15:13:44 +0200] "GET /stat HTTP/1.0" 200 572 "-" "-"
192.168.0.2 - - [22/Oct/2019:15:13:55 +0200] "GET /stat HTTP/1.0" 200 572 "-" "-"
192.168.0.2 - - [22/Oct/2019:15:14:06 +0200] "GET /stat HTTP/1.0" 200 572 "-" "-"
192.168.0.2 - - [22/Oct/2019:15:14:17 +0200] "GET /stat HTTP/1.0" 200 572 "-" "-"
========================================================================================
/var/www/html/mytube.com/YouPHPTube/videos/youphptube.log----------------------------

    [host] => live.mytube.com
    [path] => /live
    [query] => p=78f6520b4ecee62b24eb474a3fe3ce4a
)

[22-Oct-2019 15:11:28 Europe/Berlin] Array
(
    [p] => 78f6520b4ecee62b24eb474a3fe3ce4a
)

========================================================================================
/var/www/html/mytube.com/YouPHPTube-Encoder/videos/youphptube.log-------------------

root@s1:~# 
DanielnetoDotCom commented 4 years ago

Hi, what about the streamer log? looks like your nginx was fine

XemTube-TV commented 4 years ago

@maxlinux2000 I would love to guide you to fix the error yourself, but There are many things to check. So it is difficult to predict where the error comes from if you cannot check the whole system.

felipe5512 commented 4 years ago

IMG-20191022-WA0036

Need help

I'm in version 7.6 and the same bug as version 4.0 I don't know what else to do to install

I have version 7.6 and the same error as version 4.0

DanielnetoDotCom commented 4 years ago

@felipe5512 your question does not makes sense here

felipe5512 commented 4 years ago

answer me by email so i need help

maxlinux2000 commented 4 years ago

Hi I found that the video file in /var/tmp was created with wrong user and group 1.6M -rw-r--r-- 1 nobody nogroup 1.6M Oct 22 21:41 5dada4a091549-22-Oct-19-21:41:38.flv

I think that must be www-data.www-data

Why nobody,nogroup? How to fix it?

EDIT: and /HLS is wrong: the live folder have nobody.root as owner

root@s1:~# ls -lhas /HLS/
total 12K
4.0K drwxrwxrwx  3 root   root 4.0K Oct 20 07:36 .
4.0K drwxr-xr-x 22 root   root 4.0K Oct 20 07:36 ..
4.0K drwxrwxrwx  2 nobody root 4.0K Oct 22 21:43 live
felipe5512 commented 4 years ago

Should I go like this then?

root@s1:~# ls -lhas /HLS/ total 12K 4.0K drwxrwxrwx 3 root root 4.0K Oct 20 07:36 . 4.0K drwxr-xr-x 22 root root 4.0K Oct 20 07:36 .. 4.0K drwxrwxrwx 2 nobody root 4.0K Oct 22 21:43 live

DanielnetoDotCom commented 4 years ago

@maxlinux2000 I guess your directory should be /var/www/tmp/ instead /var/tmp/

you must make sure apache can read from there

try the following commands

chown -R www-data:www-data /var/www/tmp/

And

chmode -R 777 /var/www/tmp/

felipe5512 commented 4 years ago

Problem is that I don't know what you're talking about

felipe5512 commented 4 years ago

I do not know how to do it

maxlinux2000 commented 4 years ago

@felipe5512 esto no es el sitio. Si tienes un problema, abre otra discussion apretando el botón ISSUE arriba a la derecha

felipe5512 commented 4 years ago

Can anyone help me then?

maxlinux2000 commented 4 years ago

@felipe5512 !!! >:( please open a new Issue (the green button at rigth top) And write down how to reproduce your error. I think that nobody can help you if you don't tell us how to reproduce the bug you have found.

maxlinux2000 commented 4 years ago

Hi daniel, yes here I wrote a wron path... it was in /var/www/tmp. I have already do

chown -R www-data.www-data /HLS
chmod -R 777 /HLS
chown -R www-data.www-data /var/www/tmp
chmod -R 777 /var/www/tmp

Resetting all logs

NGINX Error ========================================================================================
/usr/local/nginx/logs/error.log---------------------------------------------------------

NGNX Access ========================================================================================
/usr/local/nginx/logs/access.log--------------------------------------------------------

192.168.0.2 - - [22/Oct/2019:23:07:01 +0200] "GET /stat HTTP/1.0" 200 569 "-" "-"

STREAMER ========================================================================================
/var/www/html/mytube.com/YouPHPTube/videos/youphptube.log----------------------------

ENCODER ========================================================================================
/var/www/html/mytube.com/YouPHPTube-Encoder/videos/youphptube.log-------------------

root@s1:~# 

Now I press the Stream in the android App

NGINX Error ========================================================================================
/usr/local/nginx/logs/error.log---------------------------------------------------------

2019/10/22 23:10:47 [info] 22859#0: *11690 client connected '195.166.12.99'
2019/10/22 23:10:47 [info] 22859#0: *11690 connect: app='live' args='p=78f6520b4ecee62b24eb474a3fe3ce4a' flashver='FMLE/3.0 (compatible; Lavf57.56' swf_url='' tc_url='rtmp://live.mytube.com/live?p=78f6520b4ecee62b24eb474a3fe3ce4a' page_url='' acodecs=3575 vcodecs=252 object_encoding=0, client: 195.166.12.99, server: 0.0.0.0:1935
2019/10/22 23:10:48 [info] 22859#0: *11690 createStream, client: 195.166.12.99, server: 0.0.0.0:1935
2019/10/22 23:10:48 [info] 22859#0: *11690 publish: name='5dada4a091549' args='' type=live silent=0, client: 195.166.12.99, server: 0.0.0.0:1935
2019/10/22 23:10:48 [info] 22859#0: *11690 notify: publish 'live.mytube.com/plugin/Live/on_publish.php', client: 195.166.12.99, server: 0.0.0.0:1935

NGNX Access ========================================================================================
/usr/local/nginx/logs/access.log--------------------------------------------------------

192.168.0.2 - - [22/Oct/2019:23:10:44 +0200] "GET /stat HTTP/1.0" 200 569 "-" "-"
192.168.0.2 - - [22/Oct/2019:23:10:54 +0200] "GET /stat HTTP/1.0" 200 1334 "-" "-"

STREAMER ========================================================================================
/var/www/html/mytube.com/YouPHPTube/videos/youphptube.log----------------------------

    [host] => live.mytube.com
    [path] => /live
    [query] => p=78f6520b4ecee62b24eb474a3fe3ce4a
)

[22-Oct-2019 23:10:48 Europe/Berlin] Array
(
    [p] => 78f6520b4ecee62b24eb474a3fe3ce4a
)

ENCODER ========================================================================================
/var/www/html/mytube.com/YouPHPTube-Encoder/videos/youphptube.log-------------------

root@s1:~# 

Now I stop the streaming

NGINX Error ========================================================================================
/usr/local/nginx/logs/error.log---------------------------------------------------------

2019/10/22 23:10:47 [info] 22859#0: *11690 client connected '195.166.12.99'
2019/10/22 23:10:47 [info] 22859#0: *11690 connect: app='live' args='p=78f6520b4ecee62b24eb474a3fe3ce4a' flashver='FMLE/3.0 (compatible; Lavf57.56' swf_url='' tc_url='rtmp://live.mytube.com/live?p=78f6520b4ecee62b24eb474a3fe3ce4a' page_url='' acodecs=3575 vcodecs=252 object_encoding=0, client: 195.166.12.99, server: 0.0.0.0:1935
2019/10/22 23:10:48 [info] 22859#0: *11690 createStream, client: 195.166.12.99, server: 0.0.0.0:1935
2019/10/22 23:10:48 [info] 22859#0: *11690 publish: name='5dada4a091549' args='' type=live silent=0, client: 195.166.12.99, server: 0.0.0.0:1935
2019/10/22 23:10:48 [info] 22859#0: *11690 notify: publish 'live.mytube.com/plugin/Live/on_publish.php', client: 195.166.12.99, server: 0.0.0.0:1935
2019/10/22 23:10:55 [error] 22859#0: *11693 open() "/HLS/live/5dada4a091549/index.m3u8" failed (2: No such file or directory), client: 192.168.0.2, server: localhost, request: "GET /live/5dada4a091549/index.m3u8 HTTP/1.1", host: "mytube.com:444"
2019/10/22 23:11:30 [info] 22859#0: *11690 closeStream, client: 195.166.12.99, server: 0.0.0.0:1935
2019/10/22 23:11:30 [info] 22859#0: *11690 notify: record_done recorder=video path='/var/www/tmp/5dada4a091549-22-Oct-19-23:10:48.flv' url='mytube.com/plugin/Live/on_record_done.php', client: 195.166.12.99, server: 0.0.0.0:1935
2019/10/22 23:11:30 [info] 22859#0: *11690 disconnect, client: 195.166.12.99, server: 0.0.0.0:1935
2019/10/22 23:11:30 [info] 22859#0: *11690 deleteStream, client: 195.166.12.99, server: 0.0.0.0:1935

NGNX Access ========================================================================================
/usr/local/nginx/logs/access.log--------------------------------------------------------

192.168.0.2 - - [22/Oct/2019:23:10:44 +0200] "GET /stat HTTP/1.0" 200 569 "-" "-"
192.168.0.2 - - [22/Oct/2019:23:10:54 +0200] "GET /stat HTTP/1.0" 200 1334 "-" "-"
192.168.0.2 - - [22/Oct/2019:23:10:55 +0200] "GET /live/5dada4a091549/index.m3u8 HTTP/1.1" 404 153 "-" "Lavf/58.20.100"
192.168.0.2 - - [22/Oct/2019:23:11:05 +0200] "GET /stat HTTP/1.0" 200 1359 "-" "-"
192.168.0.2 - - [22/Oct/2019:23:11:17 +0200] "GET /stat HTTP/1.0" 200 1362 "-" "-"
192.168.0.2 - - [22/Oct/2019:23:11:27 +0200] "GET /stat HTTP/1.0" 200 1362 "-" "-"
195.166.12.99 [22/Oct/2019:23:11:30 +0200] PUBLISH "live" "5dada4a091549" "" - 7263242 754 "" "FMLE/3.0 (compatible; Lavf57.56" (43s)

STREAMER ========================================================================================
/var/www/html/mytube.com/YouPHPTube/videos/youphptube.log----------------------------

)

[22-Oct-2019 23:10:48 Europe/Berlin] Array
(
    [p] => 78f6520b4ecee62b24eb474a3fe3ce4a
)

[22-Oct-2019 23:10:55 Europe/Berlin]  Image Expired in 01/01/1970 01:00:00 NOW is 22/10/2019 23:10:55
[22-Oct-2019 23:10:55 Europe/Berlin]  New Image will Expired in 22/10/2019 23:12:55 NOW is 22/10/2019 23:10:55
[22-Oct-2019 23:10:55 Europe/Berlin]  Cached Good until 22/10/2019 23:12:55 NOW is 22/10/2019 23:10:55

ENCODER ========================================================================================
/var/www/html/mytube.com/YouPHPTube-Encoder/videos/youphptube.log-------------------

[22-Oct-2019 23:10:55 Europe/Berlin] getImage  Destination get Temp Image from https://mytube.com:444/live/5dada4a091549/index.m3u8 jpg: /var/www/html/mytube.com/YouPHPTube-Encoder/view/img/OnAir.jpg
[22-Oct-2019 23:10:55 Europe/Berlin] Exec get Image: ffmpeg -i https://mytube.com:444/live/5dada4a091549/index.m3u8 -f image2  -s 400x225 -vframes 1 -y /tmp/e55d9b8cce77490e309e0274501910f1.jpg &> /dev/null &
root@s1:~# 

I loggend in the local encoder.... but there isn't video processing

NGINX Error ========================================================================================
/usr/local/nginx/logs/error.log---------------------------------------------------------

2019/10/22 23:10:47 [info] 22859#0: *11690 client connected '195.166.12.99'
2019/10/22 23:10:47 [info] 22859#0: *11690 connect: app='live' args='p=78f6520b4ecee62b24eb474a3fe3ce4a' flashver='FMLE/3.0 (compatible; Lavf57.56' swf_url='' tc_url='rtmp://live.mytube.com/live?p=78f6520b4ecee62b24eb474a3fe3ce4a' page_url='' acodecs=3575 vcodecs=252 object_encoding=0, client: 195.166.12.99, server: 0.0.0.0:1935
2019/10/22 23:10:48 [info] 22859#0: *11690 createStream, client: 195.166.12.99, server: 0.0.0.0:1935
2019/10/22 23:10:48 [info] 22859#0: *11690 publish: name='5dada4a091549' args='' type=live silent=0, client: 195.166.12.99, server: 0.0.0.0:1935
2019/10/22 23:10:48 [info] 22859#0: *11690 notify: publish 'live.mytube.com/plugin/Live/on_publish.php', client: 195.166.12.99, server: 0.0.0.0:1935
2019/10/22 23:10:55 [error] 22859#0: *11693 open() "/HLS/live/5dada4a091549/index.m3u8" failed (2: No such file or directory), client: 192.168.0.2, server: localhost, request: "GET /live/5dada4a091549/index.m3u8 HTTP/1.1", host: "mytube.com:444"
2019/10/22 23:11:30 [info] 22859#0: *11690 closeStream, client: 195.166.12.99, server: 0.0.0.0:1935
2019/10/22 23:11:30 [info] 22859#0: *11690 notify: record_done recorder=video path='/var/www/tmp/5dada4a091549-22-Oct-19-23:10:48.flv' url='mytube.com/plugin/Live/on_record_done.php', client: 195.166.12.99, server: 0.0.0.0:1935
2019/10/22 23:11:30 [info] 22859#0: *11690 disconnect, client: 195.166.12.99, server: 0.0.0.0:1935
2019/10/22 23:11:30 [info] 22859#0: *11690 deleteStream, client: 195.166.12.99, server: 0.0.0.0:1935

NGNX Access ========================================================================================
/usr/local/nginx/logs/access.log--------------------------------------------------------

192.168.0.2 - - [22/Oct/2019:23:12:30 +0200] "GET /stat HTTP/1.0" 200 569 "-" "-"
192.168.0.2 - - [22/Oct/2019:23:12:41 +0200] "GET /stat HTTP/1.0" 200 569 "-" "-"
192.168.0.2 - - [22/Oct/2019:23:12:52 +0200] "GET /stat HTTP/1.0" 200 569 "-" "-"
192.168.0.2 - - [22/Oct/2019:23:13:03 +0200] "GET /stat HTTP/1.0" 200 569 "-" "-"
192.168.0.2 - - [22/Oct/2019:23:13:15 +0200] "GET /stat HTTP/1.0" 200 569 "-" "-"
192.168.0.2 - - [22/Oct/2019:23:13:26 +0200] "GET /stat HTTP/1.0" 200 569 "-" "-"
192.168.0.2 - - [22/Oct/2019:23:13:37 +0200] "GET /stat HTTP/1.0" 200 569 "-" "-"
192.168.0.2 - - [22/Oct/2019:23:13:48 +0200] "GET /stat HTTP/1.0" 200 569 "-" "-"
192.168.0.2 - - [22/Oct/2019:23:13:59 +0200] "GET /stat HTTP/1.0" 200 569 "-" "-"
192.168.0.2 - - [22/Oct/2019:23:14:10 +0200] "GET /stat HTTP/1.0" 200 569 "-" "-"

STREAMER ========================================================================================
/var/www/html/mytube.com/YouPHPTube/videos/youphptube.log----------------------------

[22-Oct-2019 23:10:55 Europe/Berlin]  Image Expired in 01/01/1970 01:00:00 NOW is 22/10/2019 23:10:55
[22-Oct-2019 23:10:55 Europe/Berlin]  New Image will Expired in 22/10/2019 23:12:55 NOW is 22/10/2019 23:10:55
[22-Oct-2019 23:10:55 Europe/Berlin]  Cached Good until 22/10/2019 23:12:55 NOW is 22/10/2019 23:10:55
[22-Oct-2019 23:12:31 Europe/Berlin] Start Login Request
[22-Oct-2019 23:12:31 Europe/Berlin] redirectUri: 
[22-Oct-2019 23:12:31 Europe/Berlin] sane redirectUri: https://mytube.com/
[22-Oct-2019 23:12:31 Europe/Berlin] user::login: noPass = , encodedPass = true, this->user, admin 192.168.0.2
[22-Oct-2019 23:12:31 Europe/Berlin] encryptPasswordVerify: do not encrypt
[22-Oct-2019 23:12:31 Europe/Berlin] user::login: Do login without cookie

ENCODER ========================================================================================
/var/www/html/mytube.com/YouPHPTube-Encoder/videos/youphptube.log-------------------

[22-Oct-2019 23:10:55 Europe/Berlin] getImage  Destination get Temp Image from https://mytube.com:444/live/5dada4a091549/index.m3u8 jpg: /var/www/html/mytube.com/YouPHPTube-Encoder/view/img/OnAir.jpg
[22-Oct-2019 23:10:55 Europe/Berlin] Exec get Image: ffmpeg -i https://mytube.com:444/live/5dada4a091549/index.m3u8 -f image2  -s 400x225 -vframes 1 -y /tmp/e55d9b8cce77490e309e0274501910f1.jpg &> /dev/null &
[22-Oct-2019 23:12:31 Europe/Berlin] https://mytube.com/ == https://mytube.com/
[22-Oct-2019 23:12:31 Europe/Berlin] Verification Start https://mytube.com/
[22-Oct-2019 23:12:31 Europe/Berlin] Verification Creating the Cache https://mytube.com/
[22-Oct-2019 23:12:33 Europe/Berlin] Verification Response (https://search.youphptube.com/verify.php?url=https%3A%2F%2Fmytube.com%2F): {"msg":["Start","https:\/\/mytube.com\/ Site verified"],"verified":true,"status":"a"}
root@s1:~# 

In the /var/www/tmp the .flv was created with nobody.nogroup but both there remains forever (I tried two times after resetting, so there are 2 .flv)

root@s1:~# ls -las /var/www/tmp/
total 7496
   4 drwxrwxrwx 2 www-data www-data    4096 Oct 22 23:10 .
   4 drwxr-xr-x 4 root     root        4096 Oct 21 22:19 ..
 436 -rw-r--r-- 1 nobody   nogroup   444439 Oct 22 22:59 5dada4a091549-22-Oct-19-22:59:23.flv
7052 -rw-r--r-- 1 nobody   nogroup  7217611 Oct 22 23:11 5dada4a091549-22-Oct-19-23:10:48.flv
root@s1:~# 
XemTube-TV commented 4 years ago

Tôi không biết làm thế nào để làm điều đó

I will be able to help you if you agree to share your SSH and administrator account so that I can consider your error. You can contact me via Email: XemTube.TV@Gmail.com

DanielnetoDotCom commented 4 years ago

Hi @maxlinux2000

thanks for the very detailed log, but I can not find any clue on that.

I am pretty sure you miss something in the streamer log file.

looks like it sends to the on_record_done file

once the record is finished you should at least have a "Record Finish" in your streamer log file

https://github.com/YouPHPTube/YouPHPTube/blob/584416ab286f12dcec858d6c165b939bbcd41322/plugin/Live/on_record_done.php#L5

maybe your on_record_done URL is not reachable.

maxlinux2000 commented 4 years ago

The url is reachable... I have a echo "hello word" to test with the browser and it works.

It's possible that the nginx daemon is rurrnig with worg user (root) and that is blocking the plugin ?

DanielnetoDotCom commented 4 years ago

I mean if the URL is reachable from your nginx server

your nginx log said the record was complete and notified

2019/10/22 23:11:30 [info] 22859#0: *11690 notify: record_done recorder=video path='/var/www/tmp/5dada4a091549-22-Oct-19-23:10:48.flv' url='mytube.com/plugin/Live/on_record_done.php', client: 195.166.12.99, server: 0.0.0.0:1935

based on your configuration it should notify here

on_record_done http://mytube.com/plugin/Live/on_record_done.php;

but for some reason looks like it was never reached or you did not post the complete log file.

maxlinux2000 commented 4 years ago

mmm a url without https?

have a look to this line of log: 2019/10/22 23:11:30 [info] 22859#0: *11690 notify: record_done recorder=video path='/var/www/tmp/5dada4a091549-22-Oct-19-23:10:48.flv' url='mytube.com/plugin/Live/on_record_done.php', client: 195.166.12.99, server: 0.0.0.0:1935

why is missing https:// ? It's normal?

XemTube-TV commented 4 years ago

@maxlinux2000 -I see you have a problem in this. I want to send you my test service that has installed the Live Stream Recording Plugin successfully. Use the public encoder. -You can collate to your service to find errors faster.

-Website: http://live.xemtube.tv

admin user: admin. Pass: zxc123

XemTube-TV commented 4 years ago

@maxlinux2000 Due to the lack of time, I was unable to configure ssl on the web. But its properties still work almost the same.

DanielnetoDotCom commented 4 years ago

@maxlinux2000 the URL MUST BE HTTP NOT HTTPS

and must be reachable thru http

maxlinux2000 commented 4 years ago

Hi XemTube tnx for that. I'm in!

I thought it was necessary to put Youphptube-streamer + Youphptube-encoder on the same server. Maybe I have not understood correctly. Nginx-rtsp allows live and record the video in /var/www/tmp/xyz.flv Then enter the plugin that sends the video from /var/www/tmp/xyz.flv to the encoder that has to be on the same server.

it is right?

Well, there is only the youphptube stremer on your server and the /var/www/tmp folder is missing

maxlinux2000 commented 4 years ago

@DanielnetoDotCom I understand ... so the automatic redirect to ssl of the url may be responsible for the problem?

I have this in apache

<VirtualHost *:80> DocumentRoot "/var/www/html/mytube.com/YouPHPTube" ServerName mytube.com ServerAlias live.mytube.com

Other directives here

RewriteEngine on
RewriteCond %{SERVER_NAME} =mytube.com 
**RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]** 

XemTube-TV commented 4 years ago

@DanielnetoDotCom Tôi hiểu ... vậy việc tự động chuyển hướng đến ssl của url có thể chịu trách nhiệm cho vấn đề này không?

Tôi có điều này trong apache

<Virtualhost *: 80> DocumentRoot "/var/www/html/myTube.com/YouPHPTube" ServerName myTube.com ServerAlias ​​live.myTube.com

Các chỉ thị khác tại đây

RewriteEngine trên RewriteCond% {SERVER_NAME} = myTube.com RewriteRule ^ https: //% {SERVER_NAME}% {REQUEST_URI} [END, NE, R = vĩnh viễn]

This configuration still works on the web https://xemtube.tv. It still records the live stream. I don't think the error comes from here.

DanielnetoDotCom commented 4 years ago

@maxlinux2000 yes, maybe, try to set up nignx with your ip instead a domain.

maxlinux2000 commented 4 years ago

Ok, the plugin starts working. It was the https itself. At the moment I have disabled redirection from apache. Before I want to see the system work, and then I will make it safer.

Now the plugin receives the on_record_done.php and the plugin (claims to) transfer the video in the Encoder, and apparently it works, but then it gives an error, just after downloading

Here the encoder log

ENCODER ========================================================================================
/var/www/html/mytube.com/YouPHPTube-Encoder/videos/youphptube.log-------------------

[23-Oct-2019 19:53:06 Europe/Berlin] {"error":false,"file":"\/var\/www\/html\/mytube.com\/YouPHPTube-Encoder\/videos\/252_tmpFile.mp4","target":"https:\/\/mytube.com\/objects\/youPHPTubeEncoderReceiveImage.json.php","postFields":6,"response_raw":"{\"error\":false,\"video_id\":458}","response":{"error":false,"video_id":458}}
[23-Oct-2019 19:53:06 Europe/Berlin] run:runMultiResolution
[23-Oct-2019 19:53:06 Europe/Berlin] YouPHPTube-Encoder Start Encoder [ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/252_tmpFile.mp4 -vf scale=-2:720 -movflags faststart -preset ultrafast -vcodec h264 -acodec aac -strict -2 -max_muxing_queue_size 1024 -y /var/www/html/mytube.com/YouPHPTube-Encoder/videos/252_tmpFile_converted_HD.mp4] 
[23-Oct-2019 19:53:07 Europe/Berlin] ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/252_tmpFile.mp4 -vf scale=-2:720 -movflags faststart -preset ultrafast -vcodec h264 -acodec aac -strict -2 -max_muxing_queue_size 1024 -y /var/www/html/mytube.com/YouPHPTube-Encoder/videos/252_tmpFile_converted_HD.mp4 --- [] --- (8, /var/www/html/mytube.com/YouPHPTube-Encoder/videos/252_tmpFile.mp4, /var/www/html/mytube.com/YouPHPTube-Encoder/videos/252_tmpFile_converted_HD.mp4, 252) 
[23-Oct-2019 19:53:07 Europe/Berlin] YouPHPTube-Encoder Start Encoder [ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/252_tmpFile.mp4 -vf scale=-2:540 -movflags faststart -preset ultrafast -vcodec h264 -acodec aac -strict -2 -max_muxing_queue_size 1024 -y /var/www/html/mytube.com/YouPHPTube-Encoder/videos/252_tmpFile_converted_SD.mp4] 
[23-Oct-2019 19:53:07 Europe/Berlin] ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/252_tmpFile.mp4 -vf scale=-2:540 -movflags faststart -preset ultrafast -vcodec h264 -acodec aac -strict -2 -max_muxing_queue_size 1024 -y /var/www/html/mytube.com/YouPHPTube-Encoder/videos/252_tmpFile_converted_SD.mp4 --- [] --- (7, /var/www/html/mytube.com/YouPHPTube-Encoder/videos/252_tmpFile.mp4, /var/www/html/mytube.com/YouPHPTube-Encoder/videos/252_tmpFile_converted_SD.mp4, 252) 
[23-Oct-2019 19:53:07 Europe/Berlin] YouPHPTube-Encoder Start Encoder [ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/252_tmpFile.mp4 -vf scale=-2:360 -movflags faststart -preset ultrafast -vcodec h264 -acodec aac -strict -2 -max_muxing_queue_size 1024 -y /var/www/html/mytube.com/YouPHPTube-Encoder/videos/252_tmpFile_converted_Low.mp4] 
[23-Oct-2019 19:53:07 Europe/Berlin] ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/252_tmpFile.mp4 -vf scale=-2:360 -movflags faststart -preset ultrafast -vcodec h264 -acodec aac -strict -2 -max_muxing_queue_size 1024 -y /var/www/html/mytube.com/YouPHPTube-Encoder/videos/252_tmpFile_converted_Low.mp4 --- [] --- (1, /var/www/html/mytube.com/YouPHPTube-Encoder/videos/252_tmpFile.mp4, /var/www/html/mytube.com/YouPHPTube-Encoder/videos/252_tmpFile_converted_Low.mp4, 252) 
[23-Oct-2019 19:53:07 Europe/Berlin] Trying again: [1] => Execute code error "Array\n(\n)\n" 
 Code: ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/252_tmpFile.mp4 -vf scale=-2:360 -movflags faststart -preset ultrafast -vcodec h264 -acodec aac -strict -2 -max_muxing_queue_size 1024 -y /var/www/html/mytube.com/YouPHPTube-Encoder/videos/252_tmpFile_converted_Low.mp4

The question is ... but if the video in /var/www/tmp is in .flv format, why does the log say there is a video in mp4 as input? 252_tmpFile.mp4

# ls -lash /var/www/tmp/
total 16M
4.0K drwxrwxrwx 2 www-data www-data 4.0K Oct 23 20:03 .
4.0K drwxr-xr-x 4 root     root     4.0K Oct 21 22:19 ..
436K -rw-r--r-- 1 nobody   nogroup  435K Oct 22 22:59 5dada4a091549-22-Oct-19-22:59:23.flv
6.9M -rw-r--r-- 1 nobody   nogroup  6.9M Oct 22 23:11 5dada4a091549-22-Oct-19-23:10:48.flv
8.5M -rw-r--r-- 1 nobody   nogroup  8.4M Oct 23 16:04 5dada4a091549-23-Oct-19-16:03:28.flv
 52K -rw-r--r-- 1 nobody   nogroup   51K Oct 23 16:15 5dada4a091549-23-Oct-19-16:15:52.flv

Does the plugin do a previous conversion from .flv to .mp4? It sounds weird to me.

Here a video test uploaded from encoder as usual Captura de pantalla de 2019-10-23 19-48-48

Here he error of video streamed from android with the app Captura de pantalla de 2019-10-23 20-05-51

DanielnetoDotCom commented 4 years ago

flv will not play in your browser, that is why it need to be converted to MP4

try to execute it in your terminal and check what is going on

ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/252_tmpFile.mp4 -vf scale=-2:360 -movflags faststart -preset ultrafast -vcodec h264 -acodec aac -strict -2 -max_muxing_queue_size 1024 -y /var/www/html/mytube.com/YouPHPTube-Encoder/videos/252_tmpFile_converted_Low.mp4

maxlinux2000 commented 4 years ago

It understand that the .flv have before being converted into .mp4, but something else is happening.

When I am transmitting all the traffic of video pieces (in .TS format they are in /HLS/live/chunk/xyz.ts and when the transmission finishes, nginx creates a single .flv in /var/www/tmp /*xyz. flv Then the plugin sends the signal that the recording is over, and the encoder starts converting a .mp4 into HD, SD and LOW ... and here the error! The process stops because no mp4 arrives in the video folder of the encoder. To check it I have put a "watch ls -lash" in the video folder of the encoder, and I assure you that no entry .mp4 file appears, and therefore ffmpeg not having an input file, it stops with an error. So I wonder but what does a temporary file not get to the encoder ... so I have done a test with ffmpeg to manually convert the .flv file into mp4 ... and it turns out that ffmpeg cannot do it. Maybe I have a wrong version of ffmpeg installed and because of that it's not works?

See below

root@s1:/var/www/tmp# ls
5dada4a091549-23-Oct-19-16:03:28.flv
root@s1:/var/www/tmp# ffmpeg -i "5dada4a091549-23-Oct-19-16:03:28.flv" -vf scale=-2:360 -movflags faststart -preset ultrafast -vcodec h264 -acodec aac -strict -2 -max_muxing_queue_size 1024 -y 254_tmpFile_converted_Low.mp4
ffmpeg version 4.1.4-1+rpt1~deb10u1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8 (Raspbian 8.3.0-6+rpi1)
  configuration: --prefix=/usr --extra-version='1+rpt1~deb10u1' --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --arch=arm --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
5dada4a091549-23-Oct-19-16:03:28.flv: Protocol not found
Did you mean file:5dada4a091549-23-Oct-19-16:03:28.flv?
root@s1:/var/www/tmp# file 5dada4a091549-23-Oct-19-16\:03\:28.flv 
5dada4a091549-23-Oct-19-16:03:28.flv: Macromedia Flash Video
root@s1:/var/www/tmp# 
root@s1:/var/www/tmp# ls -lash
total 8.5M
4.0K drwxrwxrwx 2 www-data www-data 4.0K Oct 24 10:04 .
4.0K drwxr-xr-x 4 root     root     4.0K Oct 21 22:19 ..
8.5M -rw-r--r-- 1 nobody   nogroup  8.4M Oct 23 16:04 5dada4a091549-23-Oct-19-16:03:28.flv
root@s1:/var/www/tmp# 
XemTube-TV commented 4 years ago

@maxlinux2000 Can you show me a screenshot of this part of your web?

image

maxlinux2000 commented 4 years ago

Captura de pantalla de 2019-10-24 10-26-53

XemTube-TV commented 4 years ago

I have yet to see which error has occurred on your YouPHPTube. It is very difficult to find errors without checking the internal configuration of YouPHPTube. Do you have a service test installed but the same error? I can check on it and tell you the error when fixing.

DanielnetoDotCom commented 4 years ago

Your FFMPEG seems to be updated

are you sure your filename is that? "5dada4a091549-23-Oct-19-16:03:28.flv"

seems to be a problem in the " : "

maxlinux2000 commented 4 years ago

Yes, this is the file created automatically by nginx. What is a configuration error? FFmpeg has no problem with flv: I renamed the video in test.flv and ffmpeg can convert it without problems

root@s1:/var/www/tmp# ls 
5dada4a091549-23-Oct-19-16:03:28.flv  test.flv  test.mp4
root@s1:/var/www/tmp# 

in nginx.conf there is a: record_suffix -%d-%b-%y-%T.flv;

i will change to: record_suffix -%d-%b-%y-%d-%b-%y-%H_%M_%S.flv;

maxlinux2000 commented 4 years ago

no... I can't change the filename because is internal of plugin. this is the error:

[24-Oct-2019 19:47:56 Europe/Berlin] on_record_done ERROR: Pattern does not match /.*\/5dada4a091549-([0-9]{2}-[a-zA-z]{3}-[0-9]{2}-[0-9]{2}:[0-9]{2}:[0-9]{2}).flv$/
[24-Oct-2019 19:47:56 Europe/Berlin] on_record_done END

and ffmpeg can't accept filenames with ":"

We need to change the regex from

([0-9]{2}-[a-zA-z]{3}-[0-9]{2}-[0-9]{2}:[0-9]{2}:[0-9]{2}).flv$ to ([0-9]{2}-[a-zA-z]{3}-[0-9]{2}-[0-9]{2}_[0-9]{2}_[0-9]{2}).flv$

and edit the nginx.conf from

record_suffix -%d-%b-%y-%T.flv; to record_suffix -%d-%b-%y-%d-%b-%y-%H_%M_%S.flv;

maxlinux2000 commented 4 years ago

I can't find this regex in the code, so I thick is included in the plugin SendRecodedtoencoder.

Daniel, it's your turn

maxlinux2000 commented 4 years ago

mmm daniel, can you try with

ffmpeg -i "file:([0-9]{2}-[a-zA-z]{3}-[0-9]{2}-[0-9]{2}:[0-9]{2}:[0-9]{2}).flv$" blablabla....

?

DanielnetoDotCom commented 4 years ago

what I am seeing is

5dada4a091549-23-Oct-19-16:03:28.flv: Protocol not found

I have no idea why it is happening, I guess is the dots, but I am not sure.

can you please try to manually rename it and run the script without ":"?