You are browsing as a guest. Sign up (or log in) to start making projects!

7h 5m 31s logged

YouTube Metadata changes

Getting the metadata for each youtube video has proven hard. yt-dlp + youtube_transcript_api used to be fine but as i starting embedding many videos i got rate limited and ip banned from transcript (hopefully lifted within 2 days, i watch yt w/ captions on)
So i switched to meta_yt and that worked so much better but eventually i got rate limited again. I have now finally swapped to the official google API so i can get a bunch of metadata from videos quickly, but no captions from it since it costs 200 quota credits (I have a max of 10,000 a day)

Actual Algorithm

I have currently saved 501 video embeddings to my database and have generated a user embedding for me. 12 out of the ~378 values for that embedding is in the image below.
For each video you watch your embedding changes like so. The video’s embedding gets multiplied by 0.05 and by the percentage of the video you watched (0-1). Then that gets added to your user embedding that was multiplied by 0.95.
The formula looks like this:
userEmbedding = (userEmbedding * 0.95) + (videoEmbedding * 0.05 * watchPercentage)

Up Next:

Next I want to implement FAISS, and the cosine function to compare similarity of vectors. Then using that I want to try selecting some videos I am, and am not intrested in and see how well it knows me.
After it works well enough I want to either make myself a browser extention or website to serve me videos.
I also gotta make some way to find new videos (popularity, trending, what else?) and then embed them and store it

0
4

Comments 0

No comments yet. Be the first!