WWBN / AVideo-Encoder

Encoder Server for AVideo Platform Open-Source
https://platform.avideo.com
GNU Affero General Public License v3.0
152 stars 189 forks source link

after upload, encoder adds item to queue, then does nothing else #70

Open apeironian opened 6 years ago

apeironian commented 6 years ago

Streamer and encoder both installed successfully on same box. Streamer works as expected (mp4 upload and playback in browser work fine).

But with encoder, it will accept an upload, add a queue entry, and then do nothing. It does add a video record to the streamer, but does not transmit any files to the streamer. Here is the relevant log data from both streamer and encoder:

[30-May-2018 13:26:22 Canada/Central] Do not need update duration: Video Object ( [id:Video:private] => 17 [title:Video:private] => dvl_console [clean_title:Video:private] => dvl-console [filename:Video:private] => _YPTuniqid_5b0eecce5c3c31.01647829 [description:Video:private] => [views_count:Video:private] => [status:Video:private] => e [duration:Video:private] => EE:EE:EE [users_id:Video:private] => [categories_id:Video:private] => 1 [old_categories_id:Video:private] => [type:Video:private] => video [rotation:Video:private] => 0 [zoom:Video:private] => 1 [videoDownloadedLink:Video:private] => [videoLink:Video:private] => [next_videos_id:Video:private] => NULL [isSuggested:Video:private] => 0 [videoGroups:Video:private] => [videoAdsCount:Video:private] => [youtubeId:Video:private] => )

[30-May-2018 13:26:22 Canada/Central] Files Received for video 17: dvl_console (END)

[30-May-2018 13:26:21 Canada/Central] MP4 All [30-May-2018 13:26:21 Canada/Central] {"status":"error", "msg":"getDurationFromFile ERROR, File () Not Found"} [30-May-2018 13:26:21 Canada/Central] YouPHPTube-Encoder sending file to http://apeironian.synology.me/YouPHPTube/youPHPTubeEncoder.json [30-May-2018 13:26:21 Canada/Central] YouPHPTube-Encoder reading file from [30-May-2018 13:26:22 Canada/Central] YouPHPTube-Streamer answer {"error":false,"video_id":17} [30-May-2018 13:26:22 Canada/Central] {"error":false,"format":"mp4","file":"","resolution":"","target":"http:\/\/apeironian.synology.me\/YouPHPTube\/youPHPTubeEncoder.json","postFields":10,"response_raw":"{\"error\":false,\"video_id\":17}","response":{"error":false,"video_id":17}} [30-May-2018 13:26:53 Canada/Central] http://192.168.1.129/YouPHPTube/ == http://192.168.1.129/YouPHPTube/ [30-May-2018 13:26:53 Canada/Central] http://192.168.1.129/YouPHPTube/ == http://192.168.1.129/YouPHPTube/ (END)

DanielnetoDotCom commented 6 years ago

For me, this log file, looks like is working fine Can you also check the streamer log file?

apeironian commented 6 years ago

Both streamer and encoder log files included in the post.

MC

On Fri, Jun 1, 2018 at 7:24 AM, YouPHPTube notifications@github.com wrote:

For me, this log file, looks like is working fine Can you also check the streamer log file?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/DanielnetoDotCom/YouPHPTube-Encoder/issues/70#issuecomment-393864594, or mute the thread https://github.com/notifications/unsubscribe-auth/AlqofgeUL4lLN9EPO7fa0BeivmrzmO-_ks5t4TJ_gaJpZM4UT0vR .

DanielnetoDotCom commented 6 years ago

I cant see any problem on the log file. Please try to delete both log files, try to run again and share the log files with us

mikeshoe commented 6 years ago

I'm having the same problem. Everything appears to complete successfully but the video never shows up in the streamer site.

Here are my encoder logs.
[26-Sep-2018 13:23:01 UTC] MP4 All [26-Sep-2018 13:23:01 UTC] {"status":"error", "msg":"getDurationFromFile ERROR, File () Not Found"} [26-Sep-2018 13:23:01 UTC] YouPHPTube-Encoder sending file to http://stlwm224787:8080/youPHPTubeEncoder.json [26-Sep-2018 13:23:01 UTC] YouPHPTube-Encoder reading file from [26-Sep-2018 13:23:01 UTC] YouPHPTube-Streamer answer [26-Sep-2018 13:23:01 UTC] {"error":true,"format":"mp4","file":"","resolution":"","videoDownloadedLink":null,"target":"http:\/\/stlwm224787:8080\/youPHPTubeEncoder.json","postFields":10,"response_raw":false,"response":null,"msg":"cURL error (7):\n Couldn't connect to server \n \n http:\/\/stlwm224787:8080\/youPHPTubeEncoder.json"} [26-Sep-2018 13:23:02 UTC] Getting Video File http://stlwm224787:8080/encoder/videos/original_baseball_YPTuniqid_5bab8834bed3c0.24118614 [26-Sep-2018 13:23:03 UTC] PHP Warning: file_get_contents(/var/www/html/encoder/videos/6_tmpFile_progress.txt): failed to open stream: No such file or directory in /var/www/html/encoder/objects/functions.php on line 28 [26-Sep-2018 13:23:03 UTC] PHP Warning: file_get_contents(/var/www/html/encoder/videos/6_tmpFile_progress.txt): failed to open stream: No such file or directory in /var/www/html/encoder/objects/functions.php on line 43 [26-Sep-2018 13:23:04 UTC] PHP Warning: file_get_contents(/var/www/html/encoder/videos/6_tmpFile_progress.txt): failed to open stream: No such file or directory in /var/www/html/encoder/objects/functions.php on line 28 [26-Sep-2018 13:23:04 UTC] PHP Warning: file_get_contents(/var/www/html/encoder/videos/6_tmpFile_progress.txt): failed to open stream: No such file or directory in /var/www/html/encoder/objects/functions.php on line 43 [26-Sep-2018 13:23:06 UTC] PHP Warning: file_get_contents(/var/www/html/encoder/videos/6_tmpFile_progress.txt): failed to open stream: No such file or directory in /var/www/html/encoder/objects/functions.php on line 28 [26-Sep-2018 13:23:06 UTC] PHP Warning: file_get_contents(/var/www/html/encoder/videos/6_tmpFile_progress.txt): failed to open stream: No such file or directory in /var/www/html/encoder/objects/functions.php on line 43 [26-Sep-2018 13:23:07 UTC] PHP Warning: file_get_contents(/var/www/html/encoder/videos/6_tmpFile_progress.txt): failed to open stream: No such file or directory in /var/www/html/encoder/objects/functions.php on line 28 [26-Sep-2018 13:23:07 UTC] PHP Warning: file_get_contents(/var/www/html/encoder/videos/6_tmpFile_progress.txt): failed to open stream: No such file or directory in /var/www/html/encoder/objects/functions.php on line 43 [26-Sep-2018 13:23:07 UTC] PHP Warning: file_get_contents(/var/www/html/encoder/videos/6_tmpFile_progress.txt): failed to open stream: No such file or directory in /var/www/html/encoder/objects/functions.php on line 28 [26-Sep-2018 13:23:07 UTC] PHP Warning: file_get_contents(/var/www/html/encoder/videos/6_tmpFile_progress.txt): failed to open stream: No such file or directory in /var/www/html/encoder/objects/functions.php on line 43 [26-Sep-2018 13:23:08 UTC] PHP Warning: file_get_contents(/var/www/html/encoder/videos/6_tmpFile_progress.txt): failed to open stream: No such file or directory in /var/www/html/encoder/objects/functions.php on line 28 [26-Sep-2018 13:23:08 UTC] PHP Warning: file_get_contents(/var/www/html/encoder/videos/6_tmpFile_progress.txt): failed to open stream: No such file or directory in /var/www/html/encoder/objects/functions.php on line 43 [26-Sep-2018 13:23:08 UTC] PHP Notice: Undefined property: stdClass::$videos_id in /var/www/html/encoder/objects/Encoder.php on line 456 [26-Sep-2018 13:23:08 UTC] sendImages: Sending image to [] [26-Sep-2018 13:23:08 UTC] Duration founded: 0:04:44 [26-Sep-2018 13:23:08 UTC] sendImages: YouPHPTube-Encoder sending file to http://stlwm224787:8080/objects/youPHPTubeEncoderReceiveImage.json.php [26-Sep-2018 13:23:08 UTC] sendImages: YouPHPTube-Encoder reading file from /var/www/html/encoder/videos/6_tmpFile.mp4 [26-Sep-2018 13:23:09 UTC] PHP Warning: file_get_contents(/var/www/html/encoder/videos/6_tmpFile_progress.txt): failed to open stream: No such file or directory in /var/www/html/encoder/objects/functions.php on line 28 [26-Sep-2018 13:23:09 UTC] PHP Warning: file_get_contents(/var/www/html/encoder/videos/6_tmpFile_progress.txt): failed to open stream: No such file or directory in /var/www/html/encoder/objects/functions.php on line 43 [26-Sep-2018 13:23:09 UTC] PHP Warning: file_get_contents(/var/www/html/encoder/videos/6_tmpFile_progress.txt): failed to open stream: No such file or directory in /var/www/html/encoder/objects/functions.php on line 28 [26-Sep-2018 13:23:09 UTC] PHP Warning: file_get_contents(/var/www/html/encoder/videos/6_tmpFile_progress.txt): failed to open stream: No such file or directory in /var/www/html/encoder/objects/functions.php on line 43 [26-Sep-2018 13:23:10 UTC] PHP Warning: file_get_contents(/var/www/html/encoder/videos/6_tmpFile_progress.txt): failed to open stream: No such file or directory in /var/www/html/encoder/objects/functions.php on line 28 [26-Sep-2018 13:23:10 UTC] PHP Warning: file_get_contents(/var/www/html/encoder/videos/6_tmpFile_progress.txt): failed to open stream: No such file or directory in /var/www/html/encoder/objects/functions.php on line 43 [26-Sep-2018 13:23:11 UTC] PHP Warning: file_get_contents(/var/www/html/encoder/videos/6_tmpFile_progress.txt): failed to open stream: No such file or directory in /var/www/html/encoder/objects/functions.php on line 28 [26-Sep-2018 13:23:11 UTC] PHP Warning: file_get_contents(/var/www/html/encoder/videos/6_tmpFile_progress.txt): failed to open stream: No such file or directory in /var/www/html/encoder/objects/functions.php on line 43 [26-Sep-2018 13:23:11 UTC] PHP Warning: file_get_contents(/var/www/html/encoder/videos/6_tmpFile_progress.txt): failed to open stream: No such file or directory in /var/www/html/encoder/objects/functions.php on line 28 [26-Sep-2018 13:23:11 UTC] PHP Warning: file_get_contents(/var/www/html/encoder/videos/6_tmpFile_progress.txt): failed to open stream: No such file or directory in /var/www/html/encoder/objects/functions.php on line 43 [26-Sep-2018 13:23:12 UTC] PHP Warning: file_get_contents(/var/www/html/encoder/videos/6_tmpFile_progress.txt): failed to open stream: No such file or directory in /var/www/html/encoder/objects/functions.php on line 28 [26-Sep-2018 13:23:12 UTC] PHP Warning: file_get_contents(/var/www/html/encoder/videos/6_tmpFile_progress.txt): failed to open stream: No such file or directory in /var/www/html/encoder/objects/functions.php on line 43 [26-Sep-2018 13:23:12 UTC] sendImages: YouPHPTube-Streamer answer [26-Sep-2018 13:23:12 UTC] {"error":true,"file":"\/var\/www\/html\/encoder\/videos\/6_tmpFile.mp4","target":"http:\/\/stlwm224787:8080\/objects\/youPHPTubeEncoderReceiveImage.json.php","postFields":6,"response_raw":false,"response":null,"msg":"cURL error (7):\n Couldn't connect to server \n \/var\/www\/html\/encoder\/videos\/6_tmpFile.mp4 \n http:\/\/stlwm224787:8080\/objects\/youPHPTubeEncoderReceiveImage.json.php"} [26-Sep-2018 13:23:12 UTC] runMultiResolution [26-Sep-2018 13:23:12 UTC] YouPHPTube-Encoder Start Encoder [ffmpeg -i /var/www/html/encoder/videos/6_tmpFile.mp4 -vf scale=1280:720 -movflags faststart -preset ultrafast -vcodec h264 -acodec aac -strict -2 -y /var/www/html/encoder/videos/6_tmpFile_converted_HD.mp4] [26-Sep-2018 13:24:04 UTC] YouPHPTube-Encoder Start Encoder [ffmpeg -i /var/www/html/encoder/videos/6_tmpFile.mp4 -vf scale=720:540 -movflags faststart -preset ultrafast -vcodec h264 -acodec aac -strict -2 -y /var/www/html/encoder/videos/6_tmpFile_converted_SD.mp4] [26-Sep-2018 13:24:35 UTC] YouPHPTube-Encoder Start Encoder [ffmpeg -i /var/www/html/encoder/videos/6_tmpFile.mp4 -vf scale=-2:360 -movflags faststart -preset ultrafast -vcodec h264 -acodec aac -strict -2 -y /var/www/html/encoder/videos/6_tmpFile_converted_Low.mp4] [26-Sep-2018 13:25:07 UTC] Duration founded: 0:04:44 [26-Sep-2018 13:25:07 UTC] YouPHPTube-Encoder sending file to http://stlwm224787:8080/youPHPTubeEncoder.json [26-Sep-2018 13:25:07 UTC] YouPHPTube-Encoder reading file from /var/www/html/encoder/videos/6_tmpFile_converted_HD.mp4 [26-Sep-2018 13:25:07 UTC] YouPHPTube-Streamer answer [26-Sep-2018 13:25:07 UTC] {"error":true,"format":"mp4","file":"\/var\/www\/html\/encoder\/videos\/6_tmpFile_converted_HD.mp4","resolution":"HD","videoDownloadedLink":null,"target":"http:\/\/stlwm224787:8080\/youPHPTubeEncoder.json","postFields":11,"videoFileSize":"162.21MB","response_raw":false,"response":null,"msg":"cURL error (7):\n Couldn't connect to server \n \/var\/www\/html\/encoder\/videos\/6_tmpFile_converted_HD.mp4 \n http:\/\/stlwm224787:8080\/youPHPTubeEncoder.json"} [26-Sep-2018 13:25:08 UTC] Duration founded: 0:04:44 [26-Sep-2018 13:25:08 UTC] YouPHPTube-Encoder sending file to http://stlwm224787:8080/youPHPTubeEncoder.json [26-Sep-2018 13:25:08 UTC] YouPHPTube-Encoder reading file from /var/www/html/encoder/videos/6_tmpFile_converted_SD.mp4 [26-Sep-2018 13:25:08 UTC] YouPHPTube-Streamer answer [26-Sep-2018 13:25:08 UTC] {"error":true,"format":"mp4","file":"\/var\/www\/html\/encoder\/videos\/6_tmpFile_converted_SD.mp4","resolution":"SD","videoDownloadedLink":null,"target":"http:\/\/stlwm224787:8080\/youPHPTubeEncoder.json","postFields":11,"videoFileSize":"90.46MB","response_raw":false,"response":null,"msg":"cURL error (7):\n Couldn't connect to server \n \/var\/www\/html\/encoder\/videos\/6_tmpFile_converted_SD.mp4 \n http:\/\/stlwm224787:8080\/youPHPTubeEncoder.json"} [26-Sep-2018 13:25:08 UTC] Duration founded: 0:04:44 [26-Sep-2018 13:25:08 UTC] YouPHPTube-Encoder sending file to http://stlwm224787:8080/youPHPTubeEncoder.json [26-Sep-2018 13:25:08 UTC] YouPHPTube-Encoder reading file from /var/www/html/encoder/videos/6_tmpFile_converted_Low.mp4 [26-Sep-2018 13:25:08 UTC] YouPHPTube-Streamer answer [26-Sep-2018 13:25:08 UTC] {"error":true,"format":"mp4","file":"\/var\/www\/html\/encoder\/videos\/6_tmpFile_converted_Low.mp4","resolution":"Low","videoDownloadedLink":null,"target":"http:\/\/stlwm224787:8080\/youPHPTubeEncoder.json","postFields":11,"videoFileSize":"54.65MB","response_raw":false,"response":null,"msg":"cURL error (7):\n Couldn't connect to server \n \/var\/www\/html\/encoder\/videos\/6_tmpFile_converted_Low.mp4 \n http:\/\/stlwm224787:8080\/youPHPTubeEncoder.json"} [26-Sep-2018 13:25:08 UTC] {}

Streamer Logs No logs so it looks like the encoder can't talk to the streamer site, even though they are linked properly.

DanielnetoDotCom commented 6 years ago

I can see many errors like this on your server cURL error (7):\n Couldn't connect to server

try to fix it. maybe a DNS problem

mikeshoe commented 6 years ago

I can successfully log into the encoder app using the proper creds + streamer url. Doesn't this rule out DNS?

DanielnetoDotCom commented 6 years ago

So, does this domain works on your network? http://stlwm224787:8080

is your streamer and encoder on the same server or different server?

what is your encoder and streamer URLs?

mikeshoe commented 6 years ago

They are both deployed on the same machine and within the same apache instance.

Streamer is at http://stlwm224787:8080

Encoder is at http://stlwm224787:8080/encoder

DanielnetoDotCom commented 6 years ago

If you go to your server, and make a ping command, will it be resolved?

inside the streamer server make it ping stlwm224787

mikeshoe commented 6 years ago

Daniel, I've updated my .htaccess file and it still doesn't work. Did these couple lines fix the same issue for you?

Is there a way to turn off the "encoder network" link in the top right dropdown on the streamer site. I'll live with forcing people to upload .mp4 files until I resolve it.

DanielnetoDotCom commented 6 years ago

Hey, I just face a similar problem.

For some reason, the server cannot resolve his own domain.

for example, my domain is youphptube.com

To fix it I create a line on the /etc/hosts with ...

127.0.0.1 youphptube.com

so everytime my server try to access my own domain it will use the hosts IP, will not try to resolve any more

so yours should be

127.0.0.1 stlwm224787