WWBN / AVideo

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

Half my videos are not playing #8708

Open para2022 opened 12 months ago

para2022 commented 12 months ago

I have recently noticed a bug in my videos. Seems to affect older videos.

If you click on this video https://ourtube.co.uk/channel/DailyLifeMedia/video/13817 you will notice it does not load. Nothing is unusual in the database when i check the video in there. Source files are correct and are working. Permissions are correct. It seems these videos are not registered on AVideo system, somehow. They use YPTStorage. Moving them back to local doesnt fix it.

  1. I click on a problem video and it has no play options so therefore cannot play. Dev tools report an error but AVideo.log does not. Server log files do not report errors.
  2. The only fix for these videos is to go into the 'My videos' and click on play in there on the problem video.
  3. Once i have done this i get a short white page in the video play window and then the video appears and has play options. The short white page in the play window doesnt happen on working vids as they load in the window straight away. I assume this short white page is the system registering the video on the system?
  4. If i then go back to the video page on the problem video, it has registered and has play options and works fine from then on.

What is causing this? Any suggestions on a fix mate? Obviously I cannot fix manually as i would have to go through 30,000+ videos to find all the problem videos and i feel this could be affecting 1000s of videos. Im unsure what could cause this.

DanielnetoDotCom commented 12 months ago

How did you add this video? https://ourtube.co.uk/channel/DailyLifeMedia/video/13817

the filename for this video is bHI51rkzJri8W1RHe7bn, which is not a filename created from AVideo, and I do not know where it comes from

check what files you have in the directory videos/bHI51rkzJri8W1RHe7bn/

para2022 commented 12 months ago

They were videos converted from my old site. I thought this was the problem but it also affects old videos created by AVideo too. I have .jpg .gif, spirit thumbs, and the relevant .mp4 with the 240p and 480p in the file names. All files seem correct. They play if played with a direct link. I can send screenshot of video dir contents.

DanielnetoDotCom commented 12 months ago

regading the video https://ourtube.co.uk/channel/DailyLifeMedia/video/13817

the issue is that AVideo cannot detect the video files inside that folder videos/bHI51rkzJri8W1RHe7bn/

I do not know the reason, because it is not a standard folder, the only way to find out is by inspecting the code and debug

para2022 commented 12 months ago

Ok thanks. Do have any idea why they work after either clicking on the video thumbnail to the left inside the ‘my videos’ panel or clicking on the play icon to right of the video in the panel? Seems to register the problematic videos after i do that.

DanielnetoDotCom commented 12 months ago

It is very hard for me to help as long as I have never seen that and I cannot reproduce it on my side.

also screenshot what icons do you mean

para2022 commented 12 months ago

Screenshot 2023-12-08 at 17 58 33

Screenshot 2023-12-08 at 17 59 24

Thanks

para2022 commented 12 months ago

This links work just for reference:

240 https://storage1.ourtube.co.uk/videos/bHI51rkzJri8W1RHe7bn/bHI51rkzJri8W1RHe7bn_240.mp4?token=eyJzYWx0IjoiaHR0cHM6XC9cL291cnR1YmUuY28udWtcLyIsInRva2VuVGltZU91dCI6IjIxNjAwIiwiZmlsZW5hbWUiOiJiSEk1MXJrekpyaThXMVJIZTdibiIsInRpbWUiOjE3MDIwNTgyNzF9 360 https://storage1.ourtube.co.uk/videos/bHI51rkzJri8W1RHe7bn/bHI51rkzJri8W1RHe7bn_360.mp4?token=eyJzYWx0IjoiaHR0cHM6XC9cL291cnR1YmUuY28udWtcLyIsInRva2VuVGltZU91dCI6IjIxNjAwIiwiZmlsZW5hbWUiOiJiSEk1MXJrekpyaThXMVJIZTdibiIsInRpbWUiOjE3MDIwNTgyNzF9 480 https://storage1.ourtube.co.uk/videos/bHI51rkzJri8W1RHe7bn/bHI51rkzJri8W1RHe7bn_480.mp4?token=eyJzYWx0IjoiaHR0cHM6XC9cL291cnR1YmUuY28udWtcLyIsInRva2VuVGltZU91dCI6IjIxNjAwIiwiZmlsZW5hbWUiOiJiSEk1MXJrekpyaThXMVJIZTdibiIsInRpbWUiOjE3MDIwNTgyNzF9

DanielnetoDotCom commented 12 months ago

The problem is not the file, it is because AVideo is not recognizing the mp4 files in your folder. I have no idea why

I just add the same file name here locally and the video works fine.

image

Sorry, I have no idea what is missing on your side. I only can recommend you make sure you are up to date

para2022 commented 12 months ago

the video is working now because i loaded the source files into the browser to play them and check them. The vids start working again once played direct from storage so a problem with the storage system?

para2022 commented 12 months ago

click on this one dan https://ourtube.co.uk/channel/DailyLifeMedia/video/13783

It doesnt play right?

Now click on a direct link from storage and then play the video again and you will see exactly what I mean.

240 https://storage1.ourtube.co.uk/videos/Dtm5FaqBPsW9kCzmQite/Dtm5FaqBPsW9kCzmQite_240.mp4?token=eyJzYWx0IjoiaHR0cHM6XC9cL291cnR1YmUuY28udWtcLyIsInRva2VuVGltZU91dCI6IjIxNjAwIiwiZmlsZW5hbWUiOiJEdG01RmFxQlBzVzlrQ3ptUWl0ZSIsInRpbWUiOjE3MDIwNjAwOTd9 360 https://storage1.ourtube.co.uk/videos/Dtm5FaqBPsW9kCzmQite/Dtm5FaqBPsW9kCzmQite_360.mp4?token=eyJzYWx0IjoiaHR0cHM6XC9cL291cnR1YmUuY28udWtcLyIsInRva2VuVGltZU91dCI6IjIxNjAwIiwiZmlsZW5hbWUiOiJEdG01RmFxQlBzVzlrQ3ptUWl0ZSIsInRpbWUiOjE3MDIwNjAwOTd9

DanielnetoDotCom commented 12 months ago

Yes, it plays fine, you know what, check your folder permissions. Maybe Apache cannot read videos/bHI51rkzJri8W1RHe7bn/

para2022 commented 12 months ago

They are correct it was the first thing i checked. Isnt it wierd?

DanielnetoDotCom commented 12 months ago

yes, very weird

para2022 commented 12 months ago

So it seems the system doesnt recognise 1000s of videos unless somehow we can play them once first. Wether that be clicking on the play button in the 'my videos' or clicking on the thumbnail for the video in the 'my videos' panel which will take you to the video page but the video will work. Or by clicking on a direct link to the source file in the browser. Permissions are correct, database entries are correct and all files are there and working. Makes no sense.

DanielnetoDotCom commented 12 months ago

I really need to be able to reproduce so I can try to find out what is going on. currently I have no idea

para2022 commented 12 months ago

I fully understand mate

DanielnetoDotCom commented 12 months ago

Did you try to clear the cache?

para2022 commented 12 months ago

yes ive even rebooted the server, checked all logs and no clues. What worries me is if this is going on then surely the system must be unstable somehow as it may look for things that dont seem to be there ect. So i feel as if when i solve this site breaking bug then the system would be much more stable in theory. Not to mention users will leave thinking the sites videos are all broken so whats the point in staying around. The site is far to large to manually fix these issues but obviously if i fix it for one then it should be fixed for all the broken ones.

DanielnetoDotCom commented 12 months ago

Not reboot, but really clear the cache. it is different

para2022 commented 12 months ago

Il keep investigating and obviously report back if im on to something :)

para2022 commented 12 months ago

yes i also did a cache_rebuild.php

para2022 commented 12 months ago

Also this is a really old bug mate as users used to say videos dont play on the site but everyone i checked worked so just ignored it and its only the past few days it became apparent when i started viewing historic vids going back years. They all work but just somehow need a little nudge to wake up first haha

para2022 commented 12 months ago

Another thing that gets the video working again is if i take the video id i.e 13929 and search for it in the 'my videos' and when it comes back in results the video will play then. Does the cause sound more likely to be database or videos directorys?

DanielnetoDotCom commented 12 months ago

Try this

https://github.com/WWBN/AVideo/blob/master/install/reviewBrokenVideos.php

run this ...

php /var/www/html/AVideo/install/reviewBrokenVideos.php
para2022 commented 12 months ago

it just returns: Done! then stops

para2022 commented 12 months ago

ive made a little bit of progress.

  1. I go into a none playing videos folder on the main site in /videos
  2. I move all files out of that folder and only move back the *.mp4
  3. I check the video again and it still does not load.
  4. I clear the cache and then the video finally plays

Thats the first time ive been able to get them working from within the server. So its an image issue stoping them from playing then? Anyway to fix this?

para2022 commented 12 months ago

Ok my solution is to set the videos to inactive and then active again and somehow it wakes up the videos and they work perfectly again. I went to small channel who had this issue on all his vids so i set them to inactive/active and all his vids are back playing. Is there a shell script to go through all the videos and set them to inactive then active? That would be easiset way to fix them all. Somehow doing that registers the video on system, not a clue how but it does.

Note: if i do this in the database it will not work. It has to be processed through the AVideo system. For now i will that channel again tommorow to make sure my changes actually still work. Thanks

para2022 commented 12 months ago

I have a plan of action it will take some time but il get there in the end, as its only affecting a % of the older videos and not the whole site thank god lol. Thanks for your help

para2022 commented 12 months ago

maybe add another view option in 'my videos' dan. Currently it only has 10, 25, 50, all for the amount of vids you can view at any one time. Maybe add 100 option too? For big sites. Thanks

DanielnetoDotCom commented 11 months ago

Try this update and run

php /var/www/html/AVideo/install/reviewBrokenVideos.php 1

the 1 will make the script check all the videos, not only the broken missing files

para2022 commented 11 months ago

thanks ive run it and get a lot of these:

28379/28385 is missing {"jpg":{"filename":"emHAoQGoQic.jpg","path":"\/home\/ourtube\/public_html\/ourtube\/videos\/emHAoQGoQic\/emHAoQGoQic.jpg","url":"https:\/\/ourtube.co.uk\/videos\/emHAoQGoQic\/emHAoQGoQic.jpg?cache=16515655001702154578","url_noCDN":"https:\/\/ourtube.co.uk\/videos\/emHAoQGoQic\/emHAoQGoQic.jpg?cache=16515655001702154578","type":"image","format":"jpg"},"jpg_thumbsV2":{"filename":"emHAoQGoQic_thumbsV2.jpg","path":"\/home\/ourtube\/public_html\/ourtube\/videos\/emHAoQGoQic\/emHAoQGoQic_thumbsV2.jpg","url":"https:\/\/ourtube.co.uk\/videos\/emHAoQGoQic\/emHAoQGoQic_thumbsV2.jpg?cache=16960278631702154578","url_noCDN":"https:\/\/ourtube.co.uk\/videos\/emHAoQGoQic\/emHAoQGoQic_thumbsV2.jpg?cache=16960278631702154578","type":"image","format":"jpg"}}

para2022 commented 11 months ago

those will be the embedded though yea?

DanielnetoDotCom commented 11 months ago

I'm not sure if they are embedded, but you are right. I should skip it if it is embedded (not waste time).

this update will skip the embedded videos

para2022 commented 11 months ago

is it supposed to report the broken ones after the script runs?

para2022 commented 11 months ago

Ok the script runs but does not report anything. if i scroll up it displays broken videos but it not practical on 30,000 vids. Can it not just output the broken ones at the end? Thanks

para2022 commented 11 months ago

Some of these video filenames do not look right. They shouldnt look like that? Could that affect the sites performance? They do play though, i do believe. Not sure what caused them to be named like that. These are all new AVideo vids, NOT from the old site import. All imported vids from the old site work fine now. That is not an issue anymore.

13264/26884 Start check tjhWXHGOlCaLejm1Lumz129827c2f7a21887c8fe13c687993864cevideo480pconverted_62cd08e08bd488.46863386 13265/26884 Start check video_220712032551_vf12d 13266/26884 Start check X2DownloadcomNEWSISHREALITYCHECKRANDOMOFFERINGSOFRANTDECAYFREQUENCIESCHASINGGHOSTSGUIDESTONES_62cccfc5458692.63961943 13267/26884 Start check video_220711215046_vb702 13268/26884 Start check video_220711213823_v705f 13269/26884 Start check video_220711213431_v7363 13270/26884 Start check newsbreak153unlawfulpsychkidnapandholdofukactivistsimonparryfornocrimedownload24net_62cc119929e108.53037013 13271/26884 Start check X2DownloadcomLakeMeadDroughtWillAffectEveryoneAsLasVegasRealEstateCrashes_62cbfe175aa686.77152689 13272/26884 Start check video_220711083651_vf086 13273/26884 Start check video_220711072913_v0a18 13274/26884 Start check video_220711034226_v833e 13275/26884 Start check SPERMTRAPPERS720P_62cb550a7b50c9.80214991 13276/26884 Start check HowtheWorldHealthOrganizationplanstoTrackYouthroughGenomicSequencing_62cb370669e1b7.49027902 13277/26884 Start check OnebyOneNewWorldOrderDepopulationandmRNAInjections2014_62cb36c2675197.41393921 13278/26884 Start check BluetoothPeopleOrigins_62cb35ff36d5d4.57590560 13279/26884 Start check TheNextMassEffect5OfficialRareTeaserTrailer_62cb28b5ec88d5.08202956 13280/26884 Start check video_220710201714_v4927 13281/26884 Start check X2DownloadcomDigitalIDAhumanrightsnightmareThoughtCrimes003Replay480p_62cb0e2d550b13.86712908 13282/26884 Start check X2DownloadcomSOMEGUYINILLINOISSOMEROCKSINGEORGIATHESOUNDSOFHELL480p_62cb07ebc94da2.31350470 13283/26884 Start check X2DownloadcomDoctorsPsychotherapistsButchersLiars480p_62cafecc82d265.62417339 13284/26884 Start check video_220710100058_v342b 13285/26884 Start check X2DownloadcomIsLaMDAsentientorjustcleverprogramming_62ca2c01353bf3.36679816 13286/26884 Start check Voice2SkullTheMovie_62ca12dea1cb65.26125804 13287/26884 Start check BorisJohnsonMattHancockandChrisWitty2020NewsBriefingaboutCovid_62c9fe485de8b4.20123303 13288/26884 Start check MAGEIIWhatshapeistheEarth_62c9fde74d29b2.51539260 13289/26884 Start check GeorgiaGuidestonesDecoded07072022_62c9fbccb76ed5.08930176 13290/26884 Start check BillGatesSecretBloodlinesExposed2022_62c9f96974cf48.20273162 13291/26884 Start check X2DownloadcomYoutubehasahugeproblemwhywontyoutubefixspam_62c9dddc61be73.18111724 13292/26884 Start check video_220709191510_v1cf8 13293/26884 Start check JimBreuerTrusttheScience20and21August2021_62c97b410bbda9.82031244 13294/26884 Start check PfizerGuiltyofGenocidethroughthemRNAInjection2022_62c97aa6aaa1f0.70127034 13295/26884 Start check DoctorsDavidWisemanSherriTenpennyPeterMcCulloughandStephanieSeneffOnceyoutakethemRNAyoucannotremoveit2022httpswwwbitchutecomvideoCxZQBAu9CAsA_62c9798dea7918.36406587 13296/26884 Start check video_220709095533_vbc6e 13297/26884 Start check howtocurecancer_62c910c668bbf8.04121614 13298/26884 Start check 9t584ok4m6g3umiwtaorng_62c908f5b48e43.36208135 13299/26884 Start check JoeBidenisaClone_62c90820c838b9.86096602 13300/26884 Start check video_220709001212_vcfe1

para2022 commented 11 months ago

im doing a wild guess and saying that those are imported from other sites using the encoder import function. I noticed yesterday that import does a clean title of 'video automatically booked' so its not working right anyway, and their are to many clean titles from the imported vids to fix now, it would take to long. Ive disabled import now.

para2022 commented 11 months ago

I am on to something mate. all these errors its complaining about are HLS videos only. So problem with the HLS plugin?

[11-Dec-2023 19:43:04 Europe/London] AVideoLog::ERROR: Time: 2.007s | Limit: 0.7s | Location: path/to/my/streamer/site/feed/index.php Line 1585 [getVideosURL_V2::VideoHLS::getSourceFile(video_220528014729_v3165)] IP=213.180.203.159 BOT USER_AGENT=Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots) backtrace=[{"file":"\/home\/myMySQLUser\/public_html\/myMySQLUser\/objects\/functions.php","line":1585,"function":"TimeLogEnd","args":["getVideosURL_V2::VideoHLS::getSourceFile(video_220528014729_v3165)",1585]},{"file":"\/home\/myMySQLUser\/public_html\/myMySQLUser\/objects\/functions.php","line":1407,"function":"getVideosURL_V2","args":["video_220528014729_v3165"]},{"file":"\/home\/myMySQLUser\/public_html\/myMySQLUser\/feed\/mrss.php","line":30,"function":"getVideosURL","args":["video_220528014729_v3165"]},{"file":"\/home\/myMySQLUser\/public_html\/myMySQLUser\/feed\/index.php","line":89,"args":["\/home\/myMySQLUser\/public_html\/myMySQLUser\/feed\/mrss.php"],"function":"include"}] SCRIPT_NAME: /feed/index.php

... [11-Dec-2023 19:43:00 Europe/London] AVideoLog::ERROR: Time: 2.006s | Limit: 0.7s | Location: path/to/my/streamer/site/feed/index.php Line 1585 [getVideosURL_V2::VideoHLS::getSourceFile(video_220529192354_vbdb4)] IP=213.180.203.159 BOT USER_AGENT=Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots) backtrace=[{"file":"\/home\/myMySQLUser\/public_html\/myMySQLUser\/objects\/functions.php","line":1585,"function":"TimeLogEnd","args":["getVideosURL_V2::VideoHLS::getSourceFile(video_220529192354_vbdb4)",1585]},{"file":"\/home\/myMySQLUser\/public_html\/myMySQLUser\/objects\/functions.php","line":1407,"function":"getVideosURL_V2","args":["video_220529192354_vbdb4"]},{"file":"\/home\/myMySQLUser\/public_html\/myMySQLUser\/feed\/mrss.php","line":30,"function":"getVideosURL","args":["video_220529192354_vbdb4"]},{"file":"\/home\/myMySQLUser\/public_html\/myMySQLUser\/feed\/index.php","line":89,"args":["\/home\/myMySQLUser\/public_html\/myMySQLUser\/feed\/mrss.php"],"function":"include"}] SCRIPT_NAME: /feed/index.php

... [11-Dec-2023 19:42:55 Europe/London] AVideoLog::ERROR: Time: 2.005s | Limit: 0.7s | Location: path/to/my/streamer/site/feed/index.php Line 1585 [getVideosURL_V2::VideoHLS::getSourceFile(video_220530002920_v2117)] IP=213.180.203.159 BOT USER_AGENT=Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots) backtrace=[{"file":"\/home\/myMySQLUser\/public_html\/myMySQLUser\/objects\/functions.php","line":1585,"function":"TimeLogEnd","args":["getVideosURL_V2::VideoHLS::getSourceFile(video_220530002920_v2117)",1585]},{"file":"\/home\/myMySQLUser\/public_html\/myMySQLUser\/objects\/functions.php","line":1407,"function":"getVideosURL_V2","args":["video_220530002920_v2117"]},{"file":"\/home\/myMySQLUser\/public_html\/myMySQLUser\/feed\/mrss.php","line":30,"function":"getVideosURL","args":["video_220530002920_v2117"]},{"file":"\/home\/myMySQLUser\/public_html\/myMySQLUser\/feed\/index.php","line":89,"args":["\/home\/myMySQLUser\/public_html\/myMySQLUser\/feed\/mrss.php"],"function":"include"}] SCRIPT_NAME: /feed/index.php

... [11-Dec-2023 19:42:46 Europe/London] AVideoLog::ERROR: Time: 2.007s | Limit: 0.7s | Location: path/to/my/streamer/site/feed/index.php Line 1585 [getVideosURL_V2::VideoHLS::getSourceFile(video_220917100041_v649b)] IP=213.180.203.159 BOT USER_AGENT=Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots) backtrace=[{"file":"\/home\/myMySQLUser\/public_html\/myMySQLUser\/objects\/functions.php","line":1585,"function":"TimeLogEnd","args":["getVideosURL_V2::VideoHLS::getSourceFile(video_220917100041_v649b)",1585]},{"file":"\/home\/myMySQLUser\/public_html\/myMySQLUser\/objects\/functions.php","line":1407,"function":"getVideosURL_V2","args":["video_220917100041_v649b"]},{"file":"\/home\/myMySQLUser\/public_html\/myMySQLUser\/feed\/mrss.php","line":30,"function":"getVideosURL","args":["video_220917100041_v649b"]},{"file":"\/home\/myMySQLUser\/public_html\/myMySQLUser\/feed\/index.php","line":89,"args":["\/home\/myMySQLUser\/public_html\/myMySQLUser\/feed\/mrss.php"],"function":"include"}] SCRIPT_NAME: /feed/index.php

... [11-Dec-2023 19:42:42 Europe/London] AVideoLog::ERROR: Time: 2.007s | Limit: 0.7s | Location: path/to/my/streamer/site/feed/index.php Line 1585 [getVideosURL_V2::VideoHLS::getSourceFile(video_220917204729_v1db8)] IP=213.180.203.159 BOT USER_AGENT=Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots) backtrace=[{"file":"\/home\/myMySQLUser\/public_html\/myMySQLUser\/objects\/functions.php","line":1585,"function":"TimeLogEnd","args":["getVideosURL_V2::VideoHLS::getSourceFile(video_220917204729_v1db8)",1585]},{"file":"\/home\/myMySQLUser\/public_html\/myMySQLUser\/objects\/functions.php","line":1407,"function":"getVideosURL_V2","args":["video_220917204729_v1db8"]},{"file":"\/home\/myMySQLUser\/public_html\/myMySQLUser\/feed\/mrss.php","line":30,"function":"getVideosURL","args":["video_220917204729_v1db8"]},{"file":"\/home\/myMySQLUser\/public_html\/myMySQLUser\/feed\/index.php","line":89,"args":["\/home\/myMySQLUser\/public_html\/myMySQLUser\/feed\/mrss.php"],"function":"include"}] SCRIPT_NAME: /feed/index.php

DanielnetoDotCom commented 11 months ago

Those are not really errors, only logs, and I can see Bots are triggering it.

also, does it resolve your video files playback?

para2022 commented 11 months ago

Oh thats ok then. Yes all my videos are working perfectly, including all the old broken ones and my HLS are all working. Site is running beautiful now cos somehow that issue was slowing down the site, now its massively improved. Search speed has improved for me also. Maybe loading all those broken vids was slowing things down, i dunno.