WWBN / AVideo

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

Question about SendRecodedtoencoder #2177

Closed maxlinux2000 closed 4 years ago

maxlinux2000 commented 5 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

maxlinux2000 commented 5 years ago

Ok Daniel

As your request, I tried to rename and convert the file, and yes, it works.

After some tests and searchs, result that now ffmpeg have the colon (:) charcater reserved fot other functions. But we can continue to use filenames:with:colon.mp4 if we put a "file:" before the name

ffmpeg -i file:5dada4a091549-25-Oct-19-07\:03\:59.flv test.mp4

And "file:" works with normal files like:

ffmpeg -i file:thisIsATest.mp4 test2.flv

Please explain how this plugin works. If I understand it correctly it goes like this: 1) when the trigger "end_of_record" arrives, the plugin searches in /var/www/tmp, the file [code] date.flv 2) convert the .flv to number_temp.mp4 in the video folder of encoder 3) delete the .flv file from /var/www/tmp 4) sends the order to the encoder to convert the new number_temp.mp4 to HD, SD and LOW.

Is it right here?

Proposal: Wouldn't it be faster to convert the .flv directly to HD, SD and LOW.mp4, without going through a previous mp4 conversion?

To do this, the encoder command should be something like this:

ffmpeg -i file:/var/www/tmp/5dada4a091549-25-Oct-19-07\:03\:59.flv -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/260_tmpFile_converted_Low.mp4

DanielnetoDotCom commented 5 years ago

Hi,

you are correct how it works.

Your proposal may work, but the problem is because the resolutions may change, also you may want to use the HLS or WebM format instead of MP4

what is weird is that we use this filename pattern in many servers, and that is the first time it fails. and we also use quotation marks at the file name

maxlinux2000 commented 5 years ago

Hi, I think that the problem come from ffmpeg 4.1.x

My system (raspbian x rasperry pi4) come with this version.

But I think that add "file:" before the name don't create a new bug for previous version... But tomorrow I will confirm it. Now I'm out.

Other way: Check the version of ffmpeg and pass the proper arguments with a conditional:

If [ $ffmpeg == 3.* ] then ... fi

If [ $ffmpeg == 4.* ] then ... fi

El vie., 25 oct. 2019 13:20, YouPHPTube notifications@github.com escribió:

Hi,

you are correct how it works.

Your proposal may work, but the problem is because the resolutions may change, also you may want to use the HLS or WebM format instead of MP4

what is weird is that we use this filename pattern in many servers, and that is the first time it fails. and we also use quotation marks at the file name

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/YouPHPTube/YouPHPTube/issues/2177?email_source=notifications&email_token=ABLLVUIFLVHA4C44ROEWA23QQLI7FA5CNFSM4JC62PHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECIBSLA#issuecomment-546314540, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLLVULPMT4QBYEZFZVGUHTQQLI7FANCNFSM4JC62PHA .

DanielnetoDotCom commented 5 years ago

I recently use FFMPEG 4.2.1 without any problem.

can you try to update your FFMPEG?

maxlinux2000 commented 5 years ago

I can't... there is not the 4.2.1 for raspberrypi4 yet. I will try to compile it but I suspect that there is a problem, and because on that on ffmpeg.org is not avalaible.

I tried the static compiled 4.2.1 for armhf, but there is a segfault

On 10/25/19, YouPHPTube notifications@github.com wrote:

I recently use FFMPEG 4.2.1 without any problem.

can you try to update your FFMPEG?

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/YouPHPTube/YouPHPTube/issues/2177#issuecomment-546321756

maxlinux2000 commented 5 years ago

OK I build ffmpeg 4.2.1! :) ...but...

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

2019/10/26 14:08:45 [info] 1293#0: *889 client connected '195.166.12.99'
2019/10/26 14:08:45 [info] 1293#0: *889 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/26 14:08:45 [info] 1293#0: *889 createStream, client: 195.166.12.99, server: 0.0.0.0:1935
2019/10/26 14:08:45 [info] 1293#0: *889 publish: name='5dada4a091549' args='' type=live silent=0, client: 195.166.12.99, server: 0.0.0.0:1935
2019/10/26 14:08:45 [info] 1293#0: *889 notify: publish 'live.mytube.com/plugin/Live/on_publish.php', client: 195.166.12.99, server: 0.0.0.0:1935
2019/10/26 14:09:17 [info] 1293#0: *889 closeStream, client: 195.166.12.99, server: 0.0.0.0:1935
2019/10/26 14:09:17 [info] 1293#0: *889 notify: record_done recorder=video path='/var/www/tmp/5dada4a091549-26-Oct-19-14:08:45.flv' url='mytube.com/plugin/Live/on_record_done.php', client: 195.166.12.99, server: 0.0.0.0:1935
2019/10/26 14:09:17 [info] 1293#0: *889 disconnect, client: 195.166.12.99, server: 0.0.0.0:1935
2019/10/26 14:09:17 [info] 1293#0: *889 deleteStream, client: 195.166.12.99, server: 0.0.0.0:1935

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

192.168.0.2 - - [26/Oct/2019:14:08:43 +0200] "GET /stat HTTP/1.0" 200 570 "-" "-"
192.168.0.2 - - [26/Oct/2019:14:08:50 +0200] "GET /stat HTTP/1.0" 200 1339 "-" "-"
192.168.0.2 - - [26/Oct/2019:14:08:58 +0200] "GET /stat HTTP/1.0" 200 1361 "-" "-"
192.168.0.2 - - [26/Oct/2019:14:09:01 +0200] "GET /stat HTTP/1.0" 200 1360 "-" "-"
192.168.0.2 - - [26/Oct/2019:14:09:12 +0200] "GET /stat HTTP/1.0" 200 1361 "-" "-"
192.168.0.2 - - [26/Oct/2019:14:09:13 +0200] "GET /stat HTTP/1.0" 200 1360 "-" "-"
195.166.12.99 [26/Oct/2019:14:09:17 +0200] PUBLISH "live" "5dada4a091549" "" - 5396097 754 "" "FMLE/3.0 (compatible; Lavf57.56" (32s)
192.168.0.2 - - [26/Oct/2019:14:09:23 +0200] "GET /stat HTTP/1.0" 200 577 "-" "-"
192.168.0.2 - - [26/Oct/2019:14:09:28 +0200] "GET /stat HTTP/1.0" 200 577 "-" "-"
192.168.0.2 - - [26/Oct/2019:14:09:34 +0200] "GET /stat HTTP/1.0" 200 570 "-" "-"

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

            [name] => notfound.gif
            [type] => application/octet-stream
            [tmp_name] => /tmp/php26vMVj
            [error] => 0
            [size] => 2095341
        )

)

[26-Oct-2019 14:09:18 Europe/Berlin] ReceiveImage: Files Received for video 468: Live Streaming Test from android on 26-Oct-19-14:08:45

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

[26-Oct-2019 14:09:18 Europe/Berlin] {"error":false,"file":"\/var\/www\/html\/mytube.com\/YouPHPTube-Encoder\/videos\/262_tmpFile.mp4","target":"https:\/\/mytube.com\/objects\/youPHPTubeEncoderReceiveImage.json.php","postFields":6,"response_raw":"{\"error\":false,\"video_id\":468}","response":{"error":false,"video_id":468}}
[26-Oct-2019 14:09:18 Europe/Berlin] run:runMultiResolution
[26-Oct-2019 14:09:18 Europe/Berlin] YouPHPTube-Encoder Start Encoder [ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/262_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/262_tmpFile_converted_HD.mp4] 
[26-Oct-2019 14:09:18 Europe/Berlin] ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/262_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/262_tmpFile_converted_HD.mp4 --- [] --- (8, /var/www/html/mytube.com/YouPHPTube-Encoder/videos/262_tmpFile.mp4, /var/www/html/mytube.com/YouPHPTube-Encoder/videos/262_tmpFile_converted_HD.mp4, 262) 
[26-Oct-2019 14:09:18 Europe/Berlin] YouPHPTube-Encoder Start Encoder [ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/262_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/262_tmpFile_converted_SD.mp4] 
[26-Oct-2019 14:09:18 Europe/Berlin] ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/262_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/262_tmpFile_converted_SD.mp4 --- [] --- (7, /var/www/html/mytube.com/YouPHPTube-Encoder/videos/262_tmpFile.mp4, /var/www/html/mytube.com/YouPHPTube-Encoder/videos/262_tmpFile_converted_SD.mp4, 262) 
[26-Oct-2019 14:09:18 Europe/Berlin] YouPHPTube-Encoder Start Encoder [ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/262_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/262_tmpFile_converted_Low.mp4] 
[26-Oct-2019 14:09:18 Europe/Berlin] ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/262_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/262_tmpFile_converted_Low.mp4 --- [] --- (1, /var/www/html/mytube.com/YouPHPTube-Encoder/videos/262_tmpFile.mp4, /var/www/html/mytube.com/YouPHPTube-Encoder/videos/262_tmpFile_converted_Low.mp4, 262) 
[26-Oct-2019 14:09:18 Europe/Berlin] Trying again: [1] => Execute code error "Array\n(\n)\n" 
 Code: ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/262_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/262_tmpFile_converted_Low.mp4
root@s1:/var/www/html/mytube.com/YouPHPTube-Encoder/videos# 

Here ffmpeg 4.2.1 for raspberrypi4

ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8 (Raspbian 8.3.0-6+rpi1)
  configuration: --target-os=linux --enable-gpl --enable-omx --enable-omx-rpi --enable-nonfree
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

But the error of colom still present:

root@s1:/var/www/html/mytube.com/YouPHPTube-Encoder# ffmpeg -i 5dada4a091549-26-Oct-19-14\:08\:45.flv 
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8 (Raspbian 8.3.0-6+rpi1)
  configuration: --target-os=linux --enable-gpl --enable-omx --enable-omx-rpi --enable-nonfree
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
5dada4a091549-26-Oct-19-14:08:45.flv: Protocol not found
Did you mean file:5dada4a091549-26-Oct-19-14:08:45.flv?
root@s1:/var/www/html/mytube.com/YouPHPTube-Encoder# 

sorry!

DanielnetoDotCom commented 5 years ago

I just notice you execute

ffmpeg -i 5dada4a091549-26-Oct-19-14\:08\:45.flv

I guess the encoder executes this instead

ffmpeg -i "5dada4a091549-26-Oct-19-14:08:45.flv"

and the error I saw in your new post with the logs was

ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/262_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/262_tmpFile_converted_Low.mp4

you should manually try this code to see the output

maxlinux2000 commented 5 years ago

and with " the same

root@s1:# ffmpeg -i "5dada4a091549-26-Oct-19-14:08:45.flv"  test.mp4
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8 (Raspbian 8.3.0-6+rpi1)
  configuration: --target-os=linux --enable-gpl --enable-omx --enable-omx-rpi --enable-nonfree
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
5dada4a091549-26-Oct-19-14:08:45.flv: Protocol not found
Did you mean file:5dada4a091549-26-Oct-19-14:08:45.flv?
root@s1:# 
maxlinux2000 commented 5 years ago
ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/262_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/262_tmpFile_converted_Low.mp4
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8 (Raspbian 8.3.0-6+rpi1)
  configuration: --target-os=linux --enable-gpl --enable-omx --enable-omx-rpi --enable-nonfree
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Unrecognized option 'preset'.
DanielnetoDotCom commented 5 years ago

Definitely the problem is your ffmpeg compilation

please check here https://stackoverflow.com/questions/20035338/ffmpeg-on-heroku-unrecognized-option-preset

maxlinux2000 commented 5 years ago

Ok, I'm trying to build again twhit there options:

./configure --enable-version3 --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --target-os=linux --enable-gpl --enable-omx --enable-omx-rpi --enable-nonfree

but.... remember that the file "262_tmpFile.mp4" not exist. Never I have see an automactly conversion form /var/www/tmp/xxx.flv to Encoder/video/temp.mp4

maxlinux2000 commented 5 years ago

ok rebuild with h264 support (before I forgot to add it), but as expected there there are no input file

root@s1:/var/www/html/mytube.com/YouPHPTube-Encoder/videos# ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/262_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/262_tmpFile_converted_Low.mp4
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8 (Raspbian 8.3.0-6+rpi1)
  configuration: --enable-version3 --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --target-os=linux --enable-gpl --enable-omx --enable-omx-rpi --enable-nonfree
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
/var/www/html/mytube.com/YouPHPTube-Encoder/videos/262_tmpFile.mp4: No such file or directory

Now I will try to "live" again form android with the app

maxlinux2000 commented 5 years ago

OK on Arm cpu we need to use ffmpeg -i "file:video.flv" out.mp4

look here

ffmpeg -i "5dada4a091549-26-Oct-19-16:34:43.flv" out.mp4
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8 (Raspbian 8.3.0-6+rpi1)
  configuration: --enable-version3 --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --target-os=linux --enable-gpl --enable-omx --enable-omx-rpi --enable-nonfree
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
5dada4a091549-26-Oct-19-16:34:43.flv: Protocol not found
Did you mean file:5dada4a091549-26-Oct-19-16:34:43.flv?
root@s1:/var/www/html/mytube.com/YouPHPTube-Encoder/test# ffmpeg -i 5dada4a091549-26-Oct-19-16:34:43.flv out.mp4
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8 (Raspbian 8.3.0-6+rpi1)
  configuration: --enable-version3 --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --target-os=linux --enable-gpl --enable-omx --enable-omx-rpi --enable-nonfree
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
5dada4a091549-26-Oct-19-16:34:43.flv: Protocol not found
Did you mean file:5dada4a091549-26-Oct-19-16:34:43.flv?
root@s1:/var/www/html/mytube.com/YouPHPTube-Encoder/test# ffmpeg -i file:5dada4a091549-26-Oct-19-16:34:43.flv out.mp4
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8 (Raspbian 8.3.0-6+rpi1)
  configuration: --enable-version3 --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --target-os=linux --enable-gpl --enable-omx --enable-omx-rpi --enable-nonfree
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, flv, from 'file:5dada4a091549-26-Oct-19-16:34:43.flv':
  Duration: 00:01:10.78, start: 0.161000, bitrate: 1361 kb/s
    Stream #0:0: Audio: aac (LC), 44100 Hz, stereo, fltp
    Stream #0:1: Video: h264 (Baseline), yuv420p(tv, unknown/bt470bg/unknown, progressive), 480x640, 1k tbr, 1k tbn
Stream mapping:
  Stream #0:1 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:0 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x28ca1b0] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x28ca1b0] profile High, level 5.2
[libx264 @ 0x28ca1b0] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'out.mp4':
  Metadata:
    encoder         : Lavf58.29.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 480x640, q=-1--1, 1k fps, 16k tbn, 1k tbc
    Metadata:
      encoder         : Lavc58.54.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc58.54.100 aac
More than 1000 frames duplicated       0kB time=00:00:01.10 bitrate=   0.3kbits/s dup=958 drop=0 speed=0.226x    
frame= 1278 fps=163 q=-1.0 Lsize=     273kB time=00:00:01.42 bitrate=1572.7kbits/s dup=1258 drop=0 speed=0.181x    
video:230kB audio:26kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 7.023707%
[libx264 @ 0x28ca1b0] frame I:7     Avg QP:16.85  size: 16549
[libx264 @ 0x28ca1b0] frame P:322   Avg QP:19.81  size:   297
[libx264 @ 0x28ca1b0] frame B:949   Avg QP:26.87  size:    24
[libx264 @ 0x28ca1b0] consecutive B-frames:  0.9%  0.3%  0.2% 98.6%
[libx264 @ 0x28ca1b0] mb I  I16..4: 26.0% 51.1% 22.8%
[libx264 @ 0x28ca1b0] mb P  I16..4:  0.1%  0.2%  0.0%  P16..4:  3.4%  0.7%  0.2%  0.0%  0.0%    skip:95.3%
[libx264 @ 0x28ca1b0] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.4%  0.0%  0.0%  direct: 0.0%  skip:99.6%  L0:34.8% L1:65.0% BI: 0.2%
[libx264 @ 0x28ca1b0] 8x8 transform intra:51.9% inter:44.6%
[libx264 @ 0x28ca1b0] coded y,uvDC,uvAC intra: 42.0% 46.7% 28.2% inter: 0.2% 0.5% 0.0%
[libx264 @ 0x28ca1b0] i16 v,h,dc,p: 71% 13%  8%  7%
[libx264 @ 0x28ca1b0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 20% 44%  3%  3%  2%  3%  3%  6%
[libx264 @ 0x28ca1b0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 31% 10%  5%  6%  4%  6%  4%  9%
[libx264 @ 0x28ca1b0] i8c dc,h,v,p: 59% 19% 15%  7%
[libx264 @ 0x28ca1b0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x28ca1b0] ref P L0: 86.7%  9.0%  3.9%  0.4%
[libx264 @ 0x28ca1b0] ref B L0: 60.3% 39.3%  0.5%
[libx264 @ 0x28ca1b0] ref B L1: 95.4%  4.6%
[libx264 @ 0x28ca1b0] kb/s:1467.69
[aac @ 0x28c8530] Qavg: 3442.718

Now I copy the .flv file on my laptop (amd64 ubuntu 18.04 lts standard) with ffmpeg 3.4.x form ubuntu repository


ffmpeg -i "5dada4a091549-26-Oct-19-16:34:43.flv" outo-OnAMD64.mp4
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
  configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  WARNING: library configuration mismatch
  avcodec     configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
5dada4a091549-26-Oct-19-16:34:43.flv: Protocol not found
Did you mean file:5dada4a091549-26-Oct-19-16:34:43.flv?
max@max-ESPRIMO-Mobile-U9200:~/test$ 

Same ERROR??!! Why ?

DanielnetoDotCom commented 5 years ago

Ok

just for a test, can you try to change the record suffix in your nginx config file

Change this

record_suffix -%d-%b-%y-%T.flv;

To this

record_suffix -%d-%b-%y.flv;

the problem is, you will not have the time anymore in your filename, it can mix some things.

change it. restart your nginx and try again

maxlinux2000 commented 5 years ago

Reset logs

root@s1:~# ResetLogs.sh 
root@s1:~# GetLogs.sh 
NGINX Error ========================================================================================
/usr/local/nginx/logs/error.log---------------------------------------------------------

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

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

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

Start streming from android

root@s1:~# GetLogs.sh
NGINX Error ========================================================================================
/usr/local/nginx/logs/error.log---------------------------------------------------------

2019/10/28 12:31:14 [info] 1298#0: *4 client connected '199.150.224.215'
2019/10/28 12:31:14 [info] 1298#0: *4 connect: app='live' args='p=e9f9008d8a74b8c7fb3e09466b78c13b' flashver='FMLE/3.0 (compatible; Lavf57.56' swf_url='' tc_url='rtmp://live.mytube.com/live?p=e9f9008d8a74b8c7fb3e09466b78c13b' page_url='' acodecs=3575 vcodecs=252 object_encoding=0, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/28 12:31:14 [info] 1298#0: *4 createStream, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/28 12:31:14 [info] 1298#0: *4 publish: name='5dada4a091549' args='' type=live silent=0, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/28 12:31:14 [info] 1298#0: *4 notify: publish 'live.mytube.com/plugin/Live/on_publish.php', client: 199.150.224.215, server: 0.0.0.0:1935

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

192.168.0.2 - - [28/Oct/2019:12:31:13 +0100] "GET /stat HTTP/1.0" 200 556 "-" "-"
192.168.0.2 - - [28/Oct/2019:12:31:24 +0100] "GET /stat HTTP/1.0" 200 1329 "-" "-"
192.168.0.2 - - [28/Oct/2019:12:31:25 +0100] "GET /stat HTTP/1.0" 200 1355 "-" "-"

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

)

[28-Oct-2019 12:31:14 Europe/Berlin] Array
(
    [p] => e9f9008d8a74b8c7fb3e09466b78c13b
)

[28-Oct-2019 12:31:24 Europe/Berlin]  Image Expired in 01/01/1970 01:00:00 NOW is 28/10/2019 12:31:24
[28-Oct-2019 12:31:24 Europe/Berlin]  New Image will Expired in 28/10/2019 12:33:24 NOW is 28/10/2019 12:31:24
[28-Oct-2019 12:31:24 Europe/Berlin]  Cached Good until 28/10/2019 12:33:24 NOW is 28/10/2019 12:31:24

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

[28-Oct-2019 12:31:24 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
[28-Oct-2019 12:31:24 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:~# 

Stop Streaming

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

2019/10/28 12:31:14 [info] 1298#0: *4 client connected '199.150.224.215'
2019/10/28 12:31:14 [info] 1298#0: *4 connect: app='live' args='p=e9f9008d8a74b8c7fb3e09466b78c13b' flashver='FMLE/3.0 (compatible; Lavf57.56' swf_url='' tc_url='rtmp://live.mytube.com/live?p=e9f9008d8a74b8c7fb3e09466b78c13b' page_url='' acodecs=3575 vcodecs=252 object_encoding=0, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/28 12:31:14 [info] 1298#0: *4 createStream, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/28 12:31:14 [info] 1298#0: *4 publish: name='5dada4a091549' args='' type=live silent=0, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/28 12:31:14 [info] 1298#0: *4 notify: publish 'live.mytube.com/plugin/Live/on_publish.php', client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/28 12:32:02 [info] 1298#0: *4 closeStream, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/28 12:32:02 [info] 1298#0: *4 notify: record_done recorder=video path='/var/www/tmp/5dada4a091549-28-Oct-19.flv' url='mytube.com/plugin/Live/on_record_done.php', client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/28 12:32:02 [info] 1298#0: *4 disconnect, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/28 12:32:02 [info] 1298#0: *4 deleteStream, client: 199.150.224.215, server: 0.0.0.0:1935

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

192.168.0.2 - - [28/Oct/2019:12:31:25 +0100] "GET /stat HTTP/1.0" 200 1355 "-" "-"
192.168.0.2 - - [28/Oct/2019:12:31:34 +0100] "GET /stat HTTP/1.0" 200 1355 "-" "-"
192.168.0.2 - - [28/Oct/2019:12:31:40 +0100] "GET /stat HTTP/1.0" 200 1352 "-" "-"
192.168.0.2 - - [28/Oct/2019:12:31:44 +0100] "GET /stat HTTP/1.0" 200 1353 "-" "-"
192.168.0.2 - - [28/Oct/2019:12:31:54 +0100] "GET /stat HTTP/1.0" 200 1351 "-" "-"
192.168.0.2 - - [28/Oct/2019:12:31:55 +0100] "GET /stat HTTP/1.0" 200 1351 "-" "-"
199.150.224.215 [28/Oct/2019:12:32:02 +0100] PUBLISH "live" "5dada4a091549" "" - 8101557 754 "" "FMLE/3.0 (compatible; Lavf57.56" (47s)
192.168.0.2 - - [28/Oct/2019:12:32:05 +0100] "GET /stat HTTP/1.0" 200 572 "-" "-"
192.168.0.2 - - [28/Oct/2019:12:32:10 +0100] "GET /stat HTTP/1.0" 200 571 "-" "-"
192.168.0.2 - - [28/Oct/2019:12:32:15 +0100] "GET /stat HTTP/1.0" 200 571 "-" "-"

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

    [clientid] => 4
    [call] => record_done
    [recorder] => video
    [name] => 5dada4a091549
    [path] => /var/www/tmp/5dada4a091549-28-Oct-19.flv
    [redirectUri] => 
)

[28-Oct-2019 12:32:02 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$/
[28-Oct-2019 12:32:02 Europe/Berlin] on_record_done END

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

[28-Oct-2019 12:31:24 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
[28-Oct-2019 12:31:24 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:~# 

the encoder don't receive the flv converter in .mp4 So I try to convert it manually

root@s1:~# ls /var/www/tmp/
5dada4a091549-28-Oct-19.flv
root@s1:~# 
root@s1:~# ffmpeg -i /var/www/tmp/5dada4a091549-28-Oct-19.flv /var/www/tmp/out.mp4
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8 (Raspbian 8.3.0-6+rpi1)
  configuration: --enable-version3 --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --target-os=linux --enable-gpl --enable-omx --enable-omx-rpi --enable-nonfree
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, flv, from '/var/www/tmp/5dada4a091549-28-Oct-19.flv':
  Duration: 00:00:47.96, start: 0.172000, bitrate: 1342 kb/s
    Stream #0:0: Audio: aac (LC), 44100 Hz, stereo, fltp
    Stream #0:1: Video: h264 (Baseline), yuv420p(tv, unknown/bt470bg/unknown, progressive), 480x640, 1k tbr, 1k tbn
Stream mapping:
  Stream #0:1 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:0 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x2b5b480] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x2b5b480] profile High, level 5.2
[libx264 @ 0x2b5b480] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '/var/www/tmp/out.mp4':
  Metadata:
    encoder         : Lavf58.29.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 480x640, q=-1--1, 1k fps, 16k tbn, 1k tbc
    Metadata:
      encoder         : Lavc58.54.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc58.54.100 aac
More than 1000 frames duplicated       0kB time=00:00:01.02 bitrate=   0.4kbits/s dup=943 drop=0 speed=0.151x    
q

Here my nginx.conf

root@s1:/usr/local/nginx/conf# cat nginx.conf
 user  www-data;
 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 2000M;
                               #will produce files of the form yourUserKey-24-Apr-13-18:23:38.flv
                               #record_suffix -%d-%b-%y-%T.flv;
                               record_suffix -%d-%b-%y.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

            }
    }
maxlinux2000 commented 5 years ago

Hi Daniel, but why complicate life with this standard date system when we can use Epoch under unix?

date +%s
1572263314

So the videos would be like:

root@s1:~# ls /var/www/tmp/
5dada4a091549-1572263314.flv
root@s1:~# 

and record_suffix will be:

record_suffix -%s.flv;

DanielnetoDotCom commented 5 years ago

I can see I have a file name checker, that is why is not accepting your new filename

[28-Oct-2019 12:32:02 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$/

I just upload a new version of the SendRecordedToEncoder plugin. please download the plugin again and try again.

this version should accept your filename;

maxlinux2000 commented 5 years ago

Hi , I have put back in nginx.conf the original pattern

                               #will produce files of the form yourUserKey-24-Apr-13-18:23:38.flv
                               record_suffix -%d-%b-%y-%T.flv;
                               #record_suffix -%d-%b-%y.flv;

then uploaded the plugin and chowned to www-data Here the logs:


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

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

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

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

root@s1:/var/www# GetLogs.sh 

**Start Streaming from android **

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

2019/10/29 18:37:07 [info] 1212#0: *4 client connected '199.150.224.215'
2019/10/29 18:37:08 [info] 1212#0: *4 connect: app='live' args='p=e9f9008d8a74b8c7fb3e09466b78c13b' flashver='FMLE/3.0 (compatible; Lavf57.56' swf_url='' tc_url='rtmp://live.mytube.com/live?p=e9f9008d8a74b8c7fb3e09466b78c13b' page_url='' acodecs=3575 vcodecs=252 object_encoding=0, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 18:37:08 [info] 1212#0: *4 createStream, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 18:37:08 [info] 1212#0: *4 publish: name='5dada4a091549' args='' type=live silent=0, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 18:37:08 [info] 1212#0: *4 notify: publish 'live.mytube.com/plugin/Live/on_publish.php', client: 199.150.224.215, server: 0.0.0.0:1935

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

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

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

[29-Oct-2019 18:37:08 Europe/Berlin] Array
(
    [p] => e9f9008d8a74b8c7fb3e09466b78c13b
)

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

root@s1:/var/www# 

**Stop Streaming **

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

2019/10/29 18:37:07 [info] 1212#0: *4 client connected '199.150.224.215'
2019/10/29 18:37:08 [info] 1212#0: *4 connect: app='live' args='p=e9f9008d8a74b8c7fb3e09466b78c13b' flashver='FMLE/3.0 (compatible; Lavf57.56' swf_url='' tc_url='rtmp://live.mytube.com/live?p=e9f9008d8a74b8c7fb3e09466b78c13b' page_url='' acodecs=3575 vcodecs=252 object_encoding=0, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 18:37:08 [info] 1212#0: *4 createStream, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 18:37:08 [info] 1212#0: *4 publish: name='5dada4a091549' args='' type=live silent=0, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 18:37:08 [info] 1212#0: *4 notify: publish 'live.mytube.com/plugin/Live/on_publish.php', client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 18:38:11 [info] 1212#0: *4 closeStream, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 18:38:11 [info] 1212#0: *4 notify: record_done recorder=video path='/var/www/tmp/5dada4a091549-29-Oct-19-18:37:08.flv' url='mytube.com/plugin/Live/on_record_done.php', client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 18:38:11 [info] 1212#0: *4 disconnect, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 18:38:11 [info] 1212#0: *4 deleteStream, client: 199.150.224.215, server: 0.0.0.0:1935

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

199.150.224.215 [29/Oct/2019:18:38:11 +0100] PUBLISH "live" "5dada4a091549" "" - 10913072 770 "" "FMLE/3.0 (compatible; Lavf57.56" (1m 4s)

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

            [name] => notfound.gif
            [type] => application/octet-stream
            [tmp_name] => /tmp/phpD4NBxG
            [error] => 0
            [size] => 2095341
        )

)

[29-Oct-2019 18:38:12 Europe/Berlin] ReceiveImage: Files Received for video 471: Live Streaming Test from android on 29-Oct-19-18:37:08

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

[29-Oct-2019 18:38:12 Europe/Berlin] {"error":false,"file":"\/var\/www\/html\/mytube.com\/YouPHPTube-Encoder\/videos\/265_tmpFile.mp4","target":"https:\/\/mytube.com\/objects\/youPHPTubeEncoderReceiveImage.json.php","postFields":6,"response_raw":"{\"error\":false,\"video_id\":471}","response":{"error":false,"video_id":471}}
[29-Oct-2019 18:38:12 Europe/Berlin] run:runMultiResolution
[29-Oct-2019 18:38:12 Europe/Berlin] YouPHPTube-Encoder Start Encoder [ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/265_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/265_tmpFile_converted_HD.mp4] 
[29-Oct-2019 18:38:12 Europe/Berlin] ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/265_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/265_tmpFile_converted_HD.mp4 --- [] --- (8, /var/www/html/mytube.com/YouPHPTube-Encoder/videos/265_tmpFile.mp4, /var/www/html/mytube.com/YouPHPTube-Encoder/videos/265_tmpFile_converted_HD.mp4, 265) 
[29-Oct-2019 18:38:12 Europe/Berlin] YouPHPTube-Encoder Start Encoder [ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/265_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/265_tmpFile_converted_SD.mp4] 
[29-Oct-2019 18:38:13 Europe/Berlin] ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/265_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/265_tmpFile_converted_SD.mp4 --- [] --- (7, /var/www/html/mytube.com/YouPHPTube-Encoder/videos/265_tmpFile.mp4, /var/www/html/mytube.com/YouPHPTube-Encoder/videos/265_tmpFile_converted_SD.mp4, 265) 
[29-Oct-2019 18:38:13 Europe/Berlin] YouPHPTube-Encoder Start Encoder [ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/265_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/265_tmpFile_converted_Low.mp4] 
[29-Oct-2019 18:38:13 Europe/Berlin] ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/265_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/265_tmpFile_converted_Low.mp4 --- [] --- (1, /var/www/html/mytube.com/YouPHPTube-Encoder/videos/265_tmpFile.mp4, /var/www/html/mytube.com/YouPHPTube-Encoder/videos/265_tmpFile_converted_Low.mp4, 265) 
[29-Oct-2019 18:38:13 Europe/Berlin] Trying again: [1] => Execute code error "Array\n(\n)\n" 
 Code: ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/265_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/265_tmpFile_converted_Low.mp4
root@s1:/var/www# 

in the Encoder I have:

Captura de pantalla de 2019-10-29 18-43-50

I wiil repeat the procedure in order to check the filename pattern in /var/www/tmp (It's will be deteted automacally after recod_stop signal

root@s1:/var/www# ls /var/www/tmp/
5dada4a091549-29-Oct-19-18:46:04.flv
root@s1:/var/www#

It's correct? I have missing something?

DanielnetoDotCom commented 5 years ago

yes, it auto-delete the file once it is transferred to the encoder

what I asked you was to try to update the plugin and keep the configuration

record_suffix -%d-%b-%y.flv;

maxlinux2000 commented 5 years ago

Ok, I have change again to

                               #record_suffix -%d-%b-%y-%T.flv;
                               record_suffix -%d-%b-%y.flv;

...then rebooted

at login I start nginx (I don't have yet make a service) and reset and get the empty logs

root@s1:~# /usr/local/nginx/sbin/nginx
root@s1:~# ResetLogs.sh
root@s1:~# GetLogs.sh

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

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

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

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

root@s1:~# 

Start the streaming from android

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

2019/10/29 19:11:30 [info] 1296#0: *1 client connected '199.150.224.215'
2019/10/29 19:11:30 [info] 1296#0: *1 connect: app='live' args='p=e9f9008d8a74b8c7fb3e09466b78c13b' flashver='FMLE/3.0 (compatible; Lavf57.56' swf_url='' tc_url='rtmp://live.mytube.com/live?p=e9f9008d8a74b8c7fb3e09466b78c13b' page_url='' acodecs=3575 vcodecs=252 object_encoding=0, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 19:11:30 [info] 1296#0: *1 createStream, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 19:11:30 [info] 1296#0: *1 publish: name='5dada4a091549' args='' type=live silent=0, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 19:11:30 [info] 1296#0: *1 notify: publish 'live.mytube.com/plugin/Live/on_publish.php', client: 199.150.224.215, server: 0.0.0.0:1935

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

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

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

[29-Oct-2019 19:11:30 Europe/Berlin] Array
(
    [p] => e9f9008d8a74b8c7fb3e09466b78c13b
)

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

root@s1:~# 

root@s1:~# ls /var/www/tmp/
5dada4a091549-29-Oct-19.flv
root@s1:~# 

Stop Streaming

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

2019/10/29 19:11:30 [info] 1296#0: *1 client connected '199.150.224.215'
2019/10/29 19:11:30 [info] 1296#0: *1 connect: app='live' args='p=e9f9008d8a74b8c7fb3e09466b78c13b' flashver='FMLE/3.0 (compatible; Lavf57.56' swf_url='' tc_url='rtmp://live.mytube.com/live?p=e9f9008d8a74b8c7fb3e09466b78c13b' page_url='' acodecs=3575 vcodecs=252 object_encoding=0, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 19:11:30 [info] 1296#0: *1 createStream, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 19:11:30 [info] 1296#0: *1 publish: name='5dada4a091549' args='' type=live silent=0, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 19:11:30 [info] 1296#0: *1 notify: publish 'live.mytube.com/plugin/Live/on_publish.php', client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 19:12:17 [info] 1296#0: *1 closeStream, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 19:12:17 [info] 1296#0: *1 notify: record_done recorder=video path='/var/www/tmp/5dada4a091549-29-Oct-19.flv' url='mytube.com/plugin/Live/on_record_done.php', client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 19:12:17 [info] 1296#0: *1 disconnect, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 19:12:17 [info] 1296#0: *1 deleteStream, client: 199.150.224.215, server: 0.0.0.0:1935

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

199.150.224.215 [29/Oct/2019:19:12:17 +0100] PUBLISH "live" "5dada4a091549" "" - 8076562 754 "" "FMLE/3.0 (compatible; Lavf57.56" (47s)

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

    [addr] => 199.150.224.215
    [clientid] => 1
    [call] => record_done
    [recorder] => video
    [name] => 5dada4a091549
    [path] => /var/www/tmp/5dada4a091549-29-Oct-19.flv
    [redirectUri] => 
)

[29-Oct-2019 19:12:18 Europe/Berlin] on_record_done ERROR: Pattern does not match /.*\/5dada4a091549-(.*}).flv$/

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

root@s1:~# 
DanielnetoDotCom commented 5 years ago

I am really sorry, I made a mistake in the plugin, I just sent a new version of it.

maxlinux2000 commented 5 years ago

ok, again.

root@s1:~# ResetLogs.sh 
root@s1:~# GetLogs.sh 
NGINX Error ========================================================================================
/usr/local/nginx/logs/error.log---------------------------------------------------------

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

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

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

Start sreaming from android

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

2019/10/29 19:26:54 [info] 1181#0: *1 client connected '199.150.224.215'
2019/10/29 19:26:54 [info] 1181#0: *1 connect: app='live' args='p=e9f9008d8a74b8c7fb3e09466b78c13b' flashver='FMLE/3.0 (compatible; Lavf57.56' swf_url='' tc_url='rtmp://live.mytube.com/live?p=e9f9008d8a74b8c7fb3e09466b78c13b' page_url='' acodecs=3575 vcodecs=252 object_encoding=0, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 19:26:54 [info] 1181#0: *1 createStream, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 19:26:55 [info] 1181#0: *1 publish: name='5dada4a091549' args='' type=live silent=0, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 19:26:55 [info] 1181#0: *1 notify: publish 'live.mytube.com/plugin/Live/on_publish.php', client: 199.150.224.215, server: 0.0.0.0:1935

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

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

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

[29-Oct-2019 19:26:55 Europe/Berlin] Array
(
    [p] => e9f9008d8a74b8c7fb3e09466b78c13b
)

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

root@s1:~# 

Stop Streaming

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

2019/10/29 19:26:54 [info] 1181#0: *1 client connected '199.150.224.215'
2019/10/29 19:26:54 [info] 1181#0: *1 connect: app='live' args='p=e9f9008d8a74b8c7fb3e09466b78c13b' flashver='FMLE/3.0 (compatible; Lavf57.56' swf_url='' tc_url='rtmp://live.mytube.com/live?p=e9f9008d8a74b8c7fb3e09466b78c13b' page_url='' acodecs=3575 vcodecs=252 object_encoding=0, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 19:26:54 [info] 1181#0: *1 createStream, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 19:26:55 [info] 1181#0: *1 publish: name='5dada4a091549' args='' type=live silent=0, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 19:26:55 [info] 1181#0: *1 notify: publish 'live.mytube.com/plugin/Live/on_publish.php', client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 19:27:31 [info] 1181#0: *1 closeStream, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 19:27:31 [info] 1181#0: *1 notify: record_done recorder=video path='/var/www/tmp/5dada4a091549-29-Oct-19.flv' url='mytube.com/plugin/Live/on_record_done.php', client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 19:27:31 [info] 1181#0: *1 disconnect, client: 199.150.224.215, server: 0.0.0.0:1935
2019/10/29 19:27:31 [info] 1181#0: *1 deleteStream, client: 199.150.224.215, server: 0.0.0.0:1935

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

199.150.224.215 [29/Oct/2019:19:27:31 +0100] PUBLISH "live" "5dada4a091549" "" - 6198082 754 "" "FMLE/3.0 (compatible; Lavf57.56" (37s)

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

            [name] => notfound.gif
            [type] => application/octet-stream
            [tmp_name] => /tmp/phpIqirUq
            [error] => 0
            [size] => 2095341
        )

)

[29-Oct-2019 19:27:35 Europe/Berlin] ReceiveImage: Files Received for video 473: Live Streaming Test from android on 29-Oct-19

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

[29-Oct-2019 19:27:35 Europe/Berlin] {"error":false,"file":"\/var\/www\/html\/mytube.com\/YouPHPTube-Encoder\/videos\/267_tmpFile.mp4","target":"https:\/\/mytube.com\/objects\/youPHPTubeEncoderReceiveImage.json.php","postFields":6,"response_raw":"{\"error\":false,\"video_id\":473}","response":{"error":false,"video_id":473}}
[29-Oct-2019 19:27:35 Europe/Berlin] run:runMultiResolution
[29-Oct-2019 19:27:35 Europe/Berlin] YouPHPTube-Encoder Start Encoder [ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/267_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/267_tmpFile_converted_HD.mp4] 
[29-Oct-2019 19:27:35 Europe/Berlin] ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/267_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/267_tmpFile_converted_HD.mp4 --- [] --- (8, /var/www/html/mytube.com/YouPHPTube-Encoder/videos/267_tmpFile.mp4, /var/www/html/mytube.com/YouPHPTube-Encoder/videos/267_tmpFile_converted_HD.mp4, 267) 
[29-Oct-2019 19:27:35 Europe/Berlin] YouPHPTube-Encoder Start Encoder [ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/267_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/267_tmpFile_converted_SD.mp4] 
[29-Oct-2019 19:27:35 Europe/Berlin] ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/267_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/267_tmpFile_converted_SD.mp4 --- [] --- (7, /var/www/html/mytube.com/YouPHPTube-Encoder/videos/267_tmpFile.mp4, /var/www/html/mytube.com/YouPHPTube-Encoder/videos/267_tmpFile_converted_SD.mp4, 267) 
[29-Oct-2019 19:27:35 Europe/Berlin] YouPHPTube-Encoder Start Encoder [ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/267_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/267_tmpFile_converted_Low.mp4] 
[29-Oct-2019 19:27:35 Europe/Berlin] ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/267_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/267_tmpFile_converted_Low.mp4 --- [] --- (1, /var/www/html/mytube.com/YouPHPTube-Encoder/videos/267_tmpFile.mp4, /var/www/html/mytube.com/YouPHPTube-Encoder/videos/267_tmpFile_converted_Low.mp4, 267) 
[29-Oct-2019 19:27:35 Europe/Berlin] Trying again: [1] => Execute code error "Array\n(\n)\n" 
 Code: ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/267_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/267_tmpFile_converted_Low.mp4
root@s1:~# 

Here the Error in the encoder and the plugin version

Captura de pantalla de 2019-10-29 19-29-29 Captura de pantalla de 2019-10-29 19-30-19

DanielnetoDotCom commented 5 years ago

Ok,

Looks like the file get to the encoder, but fail to encode the Low resolution

what do you get when you manually run this ?

ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/267_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/267_tmpFile_converted_Low.mp4

maxlinux2000 commented 5 years ago

The problem is that the number_tmpFile.mp4 still missing

root@s1:/var/www/html/mytube.com/YouPHPTube-Encoder/videos# ffmpeg -i /var/www/html/mytube.com/YouPHPTube-Encoder/videos/267_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/267_tmpFile_converted_Low.mp4
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8 (Raspbian 8.3.0-6+rpi1)
  configuration: --enable-version3 --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --target-os=linux --enable-gpl --enable-omx --enable-omx-rpi --enable-nonfree
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
/var/www/html/mytube.com/YouPHPTube-Encoder/videos/267_tmpFile.mp4: No such file or directory
root@s1:/var/www/html/mytube.com/YouPHPTube-Encoder/videos# 
root@s1:/var/www/html/mytube.com/YouPHPTube-Encoder/videos# ls -las
total 36
 4 drwxr-xr-x  3 www-data www-data 4096 Oct 29 19:27 .
 4 drwxr-xr-x 11 www-data www-data 4096 Oct 26 16:35 ..
 4 -rw-r--r--  1 www-data www-data   30 Oct 29 19:27 267_tmpFile_downloadProgress.txt
 4 -rw-r--r--  1 www-data www-data  720 Oct 29 19:27 267_tmpFile_progress.txt
 4 drwxr-xr-x  6 www-data www-data 4096 Oct  9 17:53 chunk
 4 -rw-r--r--  1 www-data www-data  671 Oct 20 20:02 configuration.php
12 -rw-r--r--  1 www-data www-data 8619 Oct 29 19:28 youphptube.log
root@s1:/var/www/html/mytube.com/YouPHPTube-Encoder/videos# 
maxlinux2000 commented 5 years ago

You have a private email

DanielnetoDotCom commented 5 years ago

I think I found the error,

https://cathotube.comvideos/original_LiveStreamingTestfromandroidon29Oct19_YPTuniqid_5db88fe01d1a98.82711146

is missing a backslash

I am working in a fix to make sure it will not happen again

DanielnetoDotCom commented 5 years ago

The last slash was missing here

image

Add it and is working now, I will send a patch for it

maxlinux2000 commented 5 years ago

As always the nonsense that wastes a lot of time!! TNX A LOT! :D

maxlinux2000 commented 5 years ago

Captura de pantalla de 2019-10-29 20-47-25

It's working!! :D