Audio files (regardless of file type) are not working when uploading via the "Encode video and audio" menu link.
Video files are working fine for the most part.
OS: Ubuntu 16.04.4 LTS (3 dedicated servers: Streamer, Encoder, Database)
Kernel: 4.4.0-119-generic
MariaDB: 10.1.32
Apache: 2.4.18
PHP: 7.0.28
YouPHPTube Version: 5.0 (pulled from git on 2018-04-04)
All steps I took to install YouPHPTube: http://hammondslegacy.com/forum/viewtopic.php?f=40&t=242
All steps I took to install Encoder: http://hammondslegacy.com/forum/viewtopic.php?f=40&t=243
YouPHPTube configuration.php has the default allowed filetypes:
$global['allowed'] = array('mp4', 'avi', 'mov', 'mkv', 'flv', 'mp3', 'wav', 'm4v', 'webm', 'wmv', '3gp', 'mpg', 'mod');
ebola.wav - Uploaded this file on Encoder but failed to transfer to Streamer.
[06-Apr-2018 11:48:20 America/Chicago] {"status":"error", "msg":"getDurationFromFile ERROR, File () Not Found"}
[06-Apr-2018 11:48:20 America/Chicago] YouPHPTube-Encoder sending file to http://video.obfuscated.com/youPHPTubeEncoder.json
[06-Apr-2018 11:48:20 America/Chicago] YouPHPTube-Encoder reading file from
[06-Apr-2018 11:48:20 America/Chicago] YouPHPTube-Streamer answer
[06-Apr-2018 11:48:20 America/Chicago] {"error":false,"format":null,"file":"","resolution":"","target":"http:\/\/video.obfuscated.com\/youPHPTubeEncoder.json","postFields":9,"response_raw":"","response":null}
[06-Apr-2018 11:48:20 America/Chicago] Extension not allowed File /var/www/YouPHPTube/objects/youPHPTubeEncoder.json.php: Array
(
[duration] => EE:EE:EE
[title] => ebola
[videos_id] => 0
[format] =>
[resolution] =>
[videoDownloadedLink] =>
[description] =>
[user] => LHammonds
[password] => 123456789OBFUSCATED987654321
)
# ls -l /var/www/YouPHPTube-Encoder/videos/
total 296
-rw-r--r-- 1 www-data www-data 572 Apr 5 10:38 configuration.php
-rw-r--r-- 1 www-data www-data 293038 Apr 6 11:48 original_ebola_YPTuniqid_5ac7a4d4ea2c91.19307720
-rw-r--r-- 1 www-data www-data 594 Apr 6 11:48 youphptube.log
No entries are in the Apache error log.
machine.mp3 - Uploaded this file on Encoder but failed to transfer to Streamer.
[06-Apr-2018 11:59:48 America/Chicago] {"status":"error", "msg":"getDurationFromFile ERROR, File () Not Found"}
[06-Apr-2018 11:59:48 America/Chicago] YouPHPTube-Encoder sending file to http://video.obfuscated.com/youPHPTubeEncoder.json
[06-Apr-2018 11:59:48 America/Chicago] YouPHPTube-Encoder reading file from
[06-Apr-2018 11:59:48 America/Chicago] YouPHPTube-Streamer answer
[06-Apr-2018 11:59:48 America/Chicago] {"error":false,"format":null,"file":"","resolution":"","target":"http:\/\/video.obfuscated.com\/youPHPTubeEncoder.json","postFields":9,"response_raw":"","response":null}
[06-Apr-2018 11:59:48 America/Chicago] Extension not allowed File /var/www/YouPHPTube/objects/youPHPTubeEncoder.json.php: Array
(
[duration] => EE:EE:EE
[title] => machine
[videos_id] => 0
[format] =>
[resolution] =>
[videoDownloadedLink] =>
[description] =>
[user] => LHammonds
[password] => 123456789OBFUSCATED987654321
)
# ls -l /var/www/YouPHPTube-Encoder/videos/
total 276
-rw-r--r-- 1 www-data www-data 572 Apr 5 10:38 configuration.php
-rw-r--r-- 1 www-data www-data 271640 Apr 6 11:59 original_machine_YPTuniqid_5ac7a7849574f0.05361018
-rw-r--r-- 1 www-data www-data 594 Apr 6 11:59 youphptube.log
No entries are in the Apache error log.
i'm not working on the encoder (so not a idea about the bug), but with #563 (if accepted), there would be a direct-upload possible for .mp3's and .ogg's in the streamer-site. maybe this would help you also?
testing would be welcome..
I think that is what the encoder is trying to do though. I do not think it is attempting to convert the format but just forward over to the streamer site but it's just not happening. Others have said it works so I'm guessing it is just me doing something wrong during setup but I cannot tell what that would be.
yeah, but the encoder also send it via network.
don't get me wrong, this bug with the encoder should be fixed anyway..
there where some issues about audio and the encoder, i would guess, it's not your fault, but as i said, i have no concrete idea, what it could be. some guessings
Others have said it works so I'm guessing it is just me doing something wrong during setup but I cannot tell what that would be.
i had sometimes issues by the database. when you have a bit expirience with sql, you may can check install/database.sql?
YouPHPTube configuration.php has the default allowed filetypes:
$global['allowed'] = array('mp4', 'avi', 'mov', 'mkv', 'flv', 'mp3', 'wav', 'm4v', 'webm', 'wmv', '3gp', 'mpg', 'mod');
i could be wrong, but i didn't see this yet in youphptube-streamer - is this maybe part of the encoder?
shouldn't convert the encoder mp3/avi/etc to mp4 anyway, so allow mp3 in streamer would be kind of non-sense? not shure, this just confuses me a bit.
while writing this, i had a look into youPHPTubeEncoder.json.php (still in the streamer) to check for $global['allowed'] - guess what i've found:
$global['allowedExtension']
so you maybe only have to change the name in your configuration?
good luck :)
@hersche, we must have different versions. In my 5.0 streamer site, that youPHPTubeEncoder.json.php does not have that line. It does reference the variable but mainly is checking to see if empty...not setting the variable.
I'm going to start over from scratch again but this time I'm going to load both onto the same new server just to make sure there are no differences in the apache and php configurations. I'll still be utilizing a separate/dedicated database server but that should not matter where the database is running as long as the app can connect to it.
should be usual git, i think we have the same..
i mean this line: https://github.com/DanielnetoDotCom/YouPHPTube/blob/master/objects/youPHPTubeEncoder.json.php#L21
but that should be
$global['allowedExtension'] = array('mp4', 'avi', 'mov', 'mkv', 'flv', 'mp3', 'wav', 'm4v', 'webm', 'wmv', '3gp', 'mpg', 'mod');
in configuration.php, i assume..
for the rest of your config, it's difficult to say anything..
Ok, the "if empty" line is the same. The streamer configuration.php does not have the "allowed" variable like it does on the encoder site.
Here is what the streamer configuration file looks like:
<?php
$global['disableAdvancedConfigurations'] = 0;
$global['videoStorageLimitMinutes'] = 0;
$global['webSiteRootURL'] = 'http://youphptube.obfuscated.com/';
$global['systemRootPath'] = '/var/www/YouPHPTube/';
$mysqlHost = 'srv-database';
$mysqlPort = '3306';
$mysqlUser = 'youphptubeuser';
$mysqlPass = 'obfuscated';
$mysqlDatabase = 'youphptube';
/**
* Do NOT change from here
*/
require_once $global['systemRootPath'].'objects/include_config.php';
LHammonds
what happens when you just insert the line?
(the error a line downer just looks like your error, and when you redefine it in config, it will may pass the condition)
That was one of the 1st things I tried. I copied the global variable from the encoder site but it made no difference. If the problem persists on this new install, I'll try it again. I got the streamer setup but for whatever reason, the encoder (on the same server) is not installing. I'll have to get that fixed before I can continue testing this.
ok..
would be good when @DanielnetoDotCom have a look here..
I had the same issue, edited objects/include_config.php and changed line 54.
-$global['allowedExtension'] = array('gif', 'jpg', 'mp4', 'webm');
+$global['allowedExtension'] = array('gif', 'jpg', 'mp4', 'webm', 'mp3');
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
I had the same issue, edited
objects/include_config.phpand changed line 54.