you could also scrape a lot of urls, using scrapebox or something similar, then put them into a mysql db, then have php grab a random row from the db.
More efficient and you could have literally millions in there.
Then you could append to that list of urls whenever you wanted, scrape new ones and dump in there, and you could scrape videos that were specifically related to the niche.
I'd post the code but it blocks me because im new.
mysql has a query in select where you do a "select from db order by rand() limit 1" then the resulting output is a random row, without using random number function or having access to the other rows in memory.