AVideo icon indicating copy to clipboard operation
AVideo copied to clipboard

Half my videos are not playing

Open para2022 opened this issue 1 year ago • 40 comments

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.

para2022 avatar Dec 08 '23 12:12 para2022

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/

DanielnetoDotCom avatar Dec 08 '23 12:12 DanielnetoDotCom

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.

para2022 avatar Dec 08 '23 13:12 para2022

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

DanielnetoDotCom avatar Dec 08 '23 13:12 DanielnetoDotCom

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.

para2022 avatar Dec 08 '23 14:12 para2022

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

DanielnetoDotCom avatar Dec 08 '23 16:12 DanielnetoDotCom

Screenshot 2023-12-08 at 17 58 33

Screenshot 2023-12-08 at 17 59 24

Thanks

para2022 avatar Dec 08 '23 18:12 para2022

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

para2022 avatar Dec 08 '23 18:12 para2022

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

DanielnetoDotCom avatar Dec 08 '23 18:12 DanielnetoDotCom

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 avatar Dec 08 '23 18:12 para2022

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

para2022 avatar Dec 08 '23 18:12 para2022

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

DanielnetoDotCom avatar Dec 08 '23 18:12 DanielnetoDotCom

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

para2022 avatar Dec 08 '23 18:12 para2022

yes, very weird

DanielnetoDotCom avatar Dec 08 '23 18:12 DanielnetoDotCom

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.

para2022 avatar Dec 08 '23 18:12 para2022

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

DanielnetoDotCom avatar Dec 08 '23 18:12 DanielnetoDotCom

I fully understand mate

para2022 avatar Dec 08 '23 18:12 para2022

Did you try to clear the cache?

DanielnetoDotCom avatar Dec 08 '23 18:12 DanielnetoDotCom

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.

para2022 avatar Dec 08 '23 18:12 para2022

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

DanielnetoDotCom avatar Dec 08 '23 18:12 DanielnetoDotCom

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

para2022 avatar Dec 08 '23 18:12 para2022

yes i also did a cache_rebuild.php

para2022 avatar Dec 08 '23 18:12 para2022

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 avatar Dec 08 '23 18:12 para2022

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?

para2022 avatar Dec 08 '23 19:12 para2022

Try this

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

run this ...

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

DanielnetoDotCom avatar Dec 08 '23 19:12 DanielnetoDotCom

it just returns: Done! then stops

para2022 avatar Dec 08 '23 19:12 para2022

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 avatar Dec 08 '23 20:12 para2022

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 avatar Dec 08 '23 22:12 para2022

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 avatar Dec 09 '23 01:12 para2022

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

para2022 avatar Dec 09 '23 01:12 para2022

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

DanielnetoDotCom avatar Dec 11 '23 12:12 DanielnetoDotCom