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

Encoder not obeying resolution rules #510

Open para2022 opened 1 year ago

para2022 commented 1 year ago

Hi,

I only use 720p 360p and 240p so why am i still getting the original 1080p also? i dont use a res that high on my platform, waste of space and really is not needed for me as it isnt netflix, 720p is more than enough. 2 encoders both doing the same.

Any ideas whats causing this? Thanks.

DanielnetoDotCom commented 1 year ago

I found something, this text was wrong

image

I just rename this option to 'Save the original video resolution'

If you do not want to save the original file this option must be unchecked

para2022 commented 1 year ago

Thanks Dan for the fix. What does the save original video mean? Im looking at turning it off but just want to be sure first.

para2022 commented 1 year ago

I just put a file through from YouTube 1080P and all i got back was max 480p even though i had 720p as my max selected. This keeps happening. Which is what my problem is. Now i have 'original saved video' turned off that has resolved one issue but it still isnt converting correctly with my max resolution.

para2022 commented 1 year ago

the problem seems to be 720p it doesnt like it

para2022 commented 1 year ago

One encoder is obeying the 720p max and one isnt so im going to install that encoder again. What is the cause of the broken files issue? I get it a lot but the files are there and i have to go into database and switch the b to a and then it works permantly but ts is very annoying as the user deletes it before i get a chance to fix it most of the time.

para2022 commented 1 year ago

Also some are not finishing and im getting:

PHP Warning: filesize(): stat failed for /var/www/public_html/2/videos/15_tmpFile.mp4

[04-May-2023 02:41:51 Europe/London] downloadFile: ":"Could not save file https:\/\/encoder2.ourtube.co.uk\/2\/videos\/original_SecretSymbolsoftheRosicrucians_YPTuniqid_6453092b06e559.54326865 in \/home\/ourtube\/public_html\/2\/videos\/15_tmpFile.mp4"}

[04-May-2023 02:41:55 Europe/London] Encoder::run: Max tries reached Could not save file https://encoder2.ourtube.co.uk/2/videos/original_SecretSymbolsoftheRosicrucians_YPTuniqid_6453092b06e559.54326865 in /home/ourtube/public_html/2/videos/15_tmpFile.mp4

Permissions are all correct

para2022 commented 1 year ago

Everything seems ok with the 2 servers. Ive reinstalled the encoders and installed yt-dlp cleanly. Not seen any errors as of yet. However im getting broken missing files on the streamer site. In the encoder log it is clean and everything was successful. Ive looked in the streamer log also and it saves it correctly into database ect with no errors however it saves it as b and not a. If i switch it back to a (active) the video appears fine. Ive checked the permissions on the files and folders for the failing vids and they are exact same as all the other vids. So cannot get my head around it. It never happens with direct upload just the remote encoders.

DanielnetoDotCom commented 1 year ago

for broken missing files check streamer and encoder logs, when the video is encoded.

para2022 commented 1 year ago

I have checked the encoder log (no errors) and it completes. I checked the streamer log and it receives the file and adds to the database, no errors and no errors when it fails. I just did 5 imports and one was broken missing files from rumble. A user tried to upload a video 4 times by uploading to the encoder and using both encoders and all attempts were broken files. Why is this so hit and miss? If there are no errors how am supposed to find the cause? It is bizarre and only seems to happen so randomly and the files are there and there is nothing wrong with them Dan, it just sets some to broken in the database for no apparent reason. I hope i can fix this as its becoming an issue and users are not using the encoder adding to more issues using direct upload lol. Thanks

para2022 commented 1 year ago

would this be the cause in my streamer log during the transfer?

05-May-2023 00:39:31 Europe/London] AVideoLog::DEBUG: onUpdateVideo error $saved is empty SCRIPT_NAME: /objects/aVideoEncoder.json.php **** **** ** *** **** ** **** ** * * *** * ***** * ***** * * * **** * * **** * * ***** * * **** * **** * ** * **** * ** * ** * *** * *** * * ** * *** * * ** * * ***** * ** * * ** * * ** * * ** * ** * *** * ***** * * ***** * * ** * * ** * * **** * * **** * ** * * ** * ** * * **** * * *** * *** * * ** * * ** * * ** * * *** * *** * * * ** **** ***** - password

[05-May-2023 00:39:31 Europe/London] AVideoLog::DEBUG: writeSql [1366] Incorrect string value: '\xF0\x9F\x94\xB4 L...' for column myMySQLDatabase.videos.description at row 1

para2022 commented 1 year ago

I am using Ubuntu 23.04 for my encoder servers and ubuntu 22.04.2 for my streamer site btw.

DanielnetoDotCom commented 1 year ago

what error are you referring to?

if you talking about the resolution this means nothing, if is about something else it may mean something

para2022 commented 1 year ago

I have reinstalled both encoder servers with 20.04 ubuntu and i'm not getting broken files now.

Also the encoders are both obeying the 720p max res now and i'm not downloading the original so thats all fine.

Videos keep getting stuck on both encoders and i get these errors. I am using the recent yt-dlp

[05-May-2023 20:46:42 Europe/London] PHP Warning: filesize(): stat failed for /var/www/1/videos/16_tmpFile.mp4 in /var/www/1/objects/Encoder.php on line 515

[05-May-2023 20:46:42 Europe/London] downloadFile: {"error":true,"filename":"16_tmpFile.mp4","pathFileName":"\/var\/www\/1\/videos\/16_tmpFile.mp4","msg":"Could not save file https:\/\/encoder1.ourtube.co.uk\/1\/videos\/original_AttentionAllAmericansLookWhataMajorEmbarrassmentourNavyhasBecomeWhichisanAbominationtoGod_YPTuniqid_64555be24bd0c1>

[05-May-2023 20:46:46 Europe/London] Encoder::run: Max tries reached Could not save file https://encoder1.ourtube.co.uk/1/videos/original_AttentionAllAmericansLookWhataMajorEmbarrassmentourNavyhasBecomeWhichisanAbominationtoGod_YPTuniqid_64555be24bd0c1.12672129 in /var/www/1/videos/16_tmpFile.mp4

The conversion will not restart they just throw the same errors and hang in the encoder.

Hope you can help. Thanks

DanielnetoDotCom commented 1 year ago

as long as new installations are working fine, you should delete the old encoder and make new installations.

para2022 commented 1 year ago

The broken files issue seems to have resolved but im still getting lots of failures/errors in logs.

[07-May-2023 09:28:18 Europe/London] PHP Warning: filesize(): stat failed for /var/www/1/videos/37_tmpFile.mp4 in /var/www/1/objects/Encoder.php on line 515 [07-May-2023 09:28:18 Europe/London] downloadFile: trying getYoutubeDl queue_id = 37 [07-May-2023 09:28:18 Europe/London] getYoutubeDl: Getting from Youtube DL yt-dlp --no-check-certificate --force-ipv4 --no-playlist -k -o /tmp/youtubeDl705ZqF.mp4 -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4' 'https://encoder1.ourtube.co.uk/1/videos/original_1IWD3jTTa3uk_YPTuniqid_64575dbc35c6f0.49192971' [{"file":"\/var\/www\/1\/objects\/Encoder.php","line":530,"function":"getYoutubeDl","class":"Encoder","type":"::"},{"file":"\/var\/www\/1\/objects\/Encoder.php","line":1003,"function":"downloadFile","class":"Encoder","type":"::"},{"file":"\/var\/www\/1\/objects\/Encoder.php","line":1011,"function":"run","class":"Encoder","type":"::"},{"file":"\/var\/www\/1\/objects\/Encoder.php","line":1011,"function":"run","class":"Encoder","type":"::"},{"file":"\/var\/www\/1\/objects\/Encoder.php","line":1038,"function":"run","class":"Encoder","type":"::"},{"file":"\/var\/www\/1\/view\/run.php","line":7,"function":"run","class":"Encoder","type":"::"}] [07-May-2023 09:28:19 Europe/London] yt-dlp --no-check-certificate --force-ipv4 --no-playlist -k -o /tmp/youtubeDl705ZqF.mp4 -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4' 'https://encoder1.ourtube.co.uk/1/videos/original_1IWD3jTTa3uk_YPTuniqid_64575dbc35c6f0.49192971' Array ( )

[07-May-2023 09:28:19 Europe/London] getYoutubeDl: Getting from Youtube other option DL yt-dlp --no-check-certificate --force-ipv4 --no-playlist -k -o /tmp/youtubeDl705ZqF.mp4 'https://encoder1.ourtube.co.uk/1/videos/original_1IWD3jTTa3uk_YPTuniqid_64575dbc35c6f0.49192971' [07-May-2023 09:28:20 Europe/London] yt-dlp --no-check-certificate --force-ipv4 --no-playlist -k -o /tmp/youtubeDl705ZqF.mp4 'https://encoder1.ourtube.co.uk/1/videos/original_1IWD3jTTa3uk_YPTuniqid_64575dbc35c6f0.49192971' Array ( )

[07-May-2023 09:28:20 Europe/London] getYoutubeDl: Getting from Youtube other option DL yt-dlp --no-check-certificate --no-playlist -k -o /tmp/youtubeDl705ZqF.mp4 'https://encoder1.ourtube.co.uk/1/videos/original_1IWD3jTTa3uk_YPTuniqid_64575dbc35c6f0.49192971' [07-May-2023 09:28:22 Europe/London] yt-dlp --no-check-certificate --no-playlist -k -o /tmp/youtubeDl705ZqF.mp4 'https://encoder1.ourtube.co.uk/1/videos/original_1IWD3jTTa3uk_YPTuniqid_64575dbc35c6f0.49192971' Array ( )

[07-May-2023 09:28:22 Europe/London] downloadFile: {"error":true,"filename":"37_tmpFile.mp4","pathFileName":"\/var\/www\/1\/videos\/37_tmpFile.mp4","msg":"Could not save file https:\/\/encoder1.ourtube.co.uk\/1\/videos\/original_1IWD3jTTa3uk_YPTuniqid_64575dbc35c6f0.49192971 in \/var\/www\/1\/videos\/37_tmpFile.mp4"} [07-May-2023 09:28:22 Europe/London] Encoder::run: Max tries reached Could not save file https://encoder1.ourtube.co.uk/1/videos/original_1IWD3jTTa3uk_YPTuniqid_64575dbc35c6f0.49192971 in \/var\/www\/1/videos/37_tmpFile.mp4 [07-May-2023 09:28:22 Europe/London] setStatusError(37, Encoder::run: Max tries reached Could not save file https://encoder1.ourtube.co.uk/1/videos/original_1IWD3jTTa3uk_YPTuniqid_64575dbc35c6f0.49192971 in \/var\/www\/1/videos/37_tmpFile.mp4, ) [{"file":"\/var\/www\/1\/objects\/Encoder.php","line":1016,"function":"setStatusError","class":"Encoder","type":"::","args":["37","Encoder::run: Max tries reached Could not save file https:\/\/encoder1.ourtube.co.uk\/1\/videos\/original_1IWD3jTTa3uk_YPTuniqid_64575dbc35c6f0.49192971 in \/var\/www\/1\/videos\/37_tmpFile.mp4"]},{"file":"\/var\/www\/1\/objects\/Encoder.php","line":1011,"function":"run","class":"Encoder","type":"::","args":[4]},{"file":"\/var\/www\/1\/objects\/Encoder.php","line":1011,"function":"run","class":"Encoder","type":"::","args":[3]},{"file":"\/var\/www\/1\/objects\/Encoder.php","line":1038,"function":"run","class":"Encoder","type":"::","args":[2]},{"file":"\/var\/www\/1\/view\/run.php","line":7,"function":"run","class":"Encoder","type":"::","args":[]}] [07-May-2023 09:28:22 Europe/London] Encoder::save id=(37) title=(1IWD3jTTa3uk)

para2022 commented 1 year ago

Fixed it as it was a collation mismatch. Thanks.