FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

[Feature request] "Random videos from subscriptions" page

Open ThatIsAPseudo opened this issue 5 years ago • 20 comments

Is your feature request related to a usage problem (not a bug)? Please describe. On youtube we have the "Home" tab that shows videos that may please you, but since it's based on Google tracking the user's preferences I guess it can't easily be done in Freetube and/or is simply not desirable. Maybe there could be a page with a showcase of channels similar to those you're already subscribed to, but it requires a database with (relevant) keywords about every channels of youtube.

Describe the solution you'd like to see implemented Instead, there could be a kind of "random" tab, in which you'll find random videos from your own subscribed channels, so that when no new video is available, you'll still be able to find "unknown" videos linked to your preferences. There could also be an option to hide particular channels, and restrict the maximum age of videos.

Describe alternatives you've considered For now I juste use Youtube home tab then when I find an interesting video I open it with Freetube.

Additional context I just realized I may not be such a simple idea, since I don't know if there's a way to scrap random videos from a channel.

ThatIsAPseudo avatar Oct 16 '20 08:10 ThatIsAPseudo

For this you could use the popular tab, which basically is an aggregation of popular channels on Invidious. Just showing you random old videos from subscriptions is not something I would consider useful. Additionally this will cost you a lot of requests, leading to a rate limit much faster

GilgusMaximus avatar Oct 16 '20 15:10 GilgusMaximus

There's only one real way this could be done while still being private.

You would start each session with an empty recommendations list. As you watch videos, FreeTube could take the recommendations that are shown and combine them as you watch more videos. We would then take this list and shuffle the videos every time you view your "Recommendations" feed. We wouldn't save this list between sessions so every time you load up FreeTube you'd start over on the "Recommendations" you see.

This is the only way I can see this happening without interfering with the privacy aspects of FreeTube. This wouldn't be too difficult to do but it would definitely be a lower priority to put together.

PrestonN avatar Oct 16 '20 15:10 PrestonN

@GilgusMaximus indeed I do use the Popular tab, however videos do not refresh often enough (imo). I understand the concern of rate limit though.

@PrestonN That sounds great, if you think that's a good first issue I could possibly try to give it a shot.

ThatIsAPseudo avatar Oct 16 '20 17:10 ThatIsAPseudo

This might not be the best first issue if you haven't contributed to the project before, but if you have an intermediate level of knowledge with Vue then it could be good task to work on. I'd imagine something like this would cover a few different parts of the app in order to work properly.

Here's the requirements that I'd expect in order for something like this to be accepted through a PR. If you or someone else feels comfortable with the tasks here then by all means feel free to work on it. I'm more than happy to answer any questions you may have along the way as well.

  1. A new tab would be added to side-nav for recommendations.
    • The router would have to be updated for this new route
    • Use an appropriate icon for this as well, user-check seems to work though I'm open to suggestions
    • Update the en-US locale for the Recommendations text
    • It should be possible to hide this tab via the distraction free settings
  2. Create a VueX store to store the recommendations gathered throughout the session
  3. When a video is watched, grab the recommended videos from that video and add it to the array of recommended videos inside the new store.
    • These may need to be organized based on the current profile the user is in. I'm not picky on if this is included or not but I know it'll be requested in the future if it isn't available.
    • This needs to work with both the local API as well as the Invidious API
  4. When you go to the newly created recommendations page, grab the array from the recommendations store, shuffle the items in the list, and display them to the user. Use the subscriptions / history pages to know how to properly display these.
    • Again, the items displayed here may depend on the current active profile. If the profile logic isn't included in the PR, then this can be ignored.
    • This page should display a message if the recommendations are empty. It should be similar to the one shown in history / subscriptions.

This isn't something that I'll be working on any time soon, so if you or anyone else wants to pick this up, feel free to do so. I'll review your PR once it's ready.

PrestonN avatar Oct 16 '20 19:10 PrestonN

I strongly support an idea like this, the only reason i use Youtube these days is that it's Home page gives me recommendations. I know how that works is Google's shady algorithms, but it's far more useful to me than whatever latest new video has been published. As for the "Trending" tab to me it's practically always useless corporate-recommended tripe, there's nothing interesting there for me and if it were removed altogether i wouldn't notice.

Just showing you random old videos from subscriptions is not something I would consider useful.

For you perhaps, but not me. Random old videos are exactly what i want because the vast majority of my subscriptions are "non-perishable" (for example: a documentary or informative video as opposed to a e-celebrity gaming stream or a "latest and greatest" tech review video). What i want most is to see a collection of what my subscribed channels have to offer, especially videos that aren't necessarily new but that i haven't seen yet.

How i would implement it is like this:

  • The full* videos list of every channel is gathered (up to a certain limit for those channels with a huge amount of videos)
  • Only the URL (and maybe tags) is pulled, the rest of the info and thumbnail is gathered when the video is actually picked for recommendations
  • This database is saved over sessions, obviously. This is only required the first time freetube is started or on subscribing
  • In the "random"/"Recommended" page, 5-10 random subbed channels are picked and from their videos 40 videos total are pulled and displayed.
  • When subscriptions are updated, the new videos from last pull are added to the database
  • You could exclude channels from your recommendations, also exclude already watched videos if your watch history is on

A recommendation algorithm could be also be implemented and even customized to make it non-random and more relevant, especially if tags are collected.

xznhj8129 avatar Jan 20 '21 02:01 xznhj8129

Hello. I agree with @xznhj8129. I have found myself, too, using this feature more and more in YouTube as my many subscriptions don't always upload frequently, so my subscriptions feed is stale most of the day :(

I am not into trendy or popular videos, so those sections (tabs?) aren't really my cup of tea and I hide them. This only leaves my subscription feed and my history.

I also think it would make the application more capable if the recommendations (or similar videos) could be saved between runs as starting each day with ~5 videos in my subs feed (of which probably only 1 or 2 will grab my interest immediately) there's not much else for the application to do :-/

Just to spit-ball a bit more... As for optimising the recommended feed, maybe pull the recommended links from a video and randomly insert them into the array so that shuffling isn't necessary initially, maybe whilst removing/hiding videos in 'history' (an optional setting?)

I'd love to see a category-based recommendation system, but without a synchronised metadata database, I don't see how that's possible, unless you use keyword matching from the video titles or hashtag links (https://www.youtube.com/hashtag/ambientmusic)? Maybe mash these together to search for hashtags based on keywords in video titles?? idk

(Daft idea: A 'Devil's Advocate' tab which lists videos with opposing sentiments, ideas or terms lol jk)

This will likely involve huge or numerous page scrapes. :/

(I wonder what kind of data access you can get from the YouTube pages?)

Just tell me if I'm sounding crazy :)

ghost avatar Jul 07 '21 01:07 ghost

well recommendations are on our list of end game features. But that is far far away

GilgusMaximus avatar Jul 23 '21 16:07 GilgusMaximus

I would like this feature too. When is this going to be implemented?

tusharhero avatar Jun 07 '22 01:06 tusharhero

You could get away with not needing to log every video ever produced by randomly picking several channels and then taking a random set of videos from each channel. If the invidious API allows you to search for videos in a certain time frame (I don't mean filters like just within the last month but options like mar-apr/2015) and randomizing that time frame for each channel. Or pick another filter that allows for randomization, in order to reduce the amount of videos that need to be loaded.

arctic-00 avatar Mar 08 '23 09:03 arctic-00

To follow up on the idea for recommendations, you could use a heap to sort keywords. The heap would probably be struct including an integer for its popularity rating and a string(i.e. the word). With hashtags having a larger impact on the popularity for each word than words in the description and words in the title having an even higher impact than that. A video could then get assigned a value by comparing its keywords with the heap and adding a sum for all the popularity ratings of the words that occur in the heap. However this would have to be run in the background while watching other videos or before the application's GUI is started.

arctic-00 avatar Mar 08 '23 09:03 arctic-00

So, is this about "Random videos from subscriptions" or "Recommendations from watch page sidebars"?

aleksejrs avatar Aug 10 '23 22:08 aleksejrs

It seems there is no easy way to fetch random videos from subscriptions while still showing relevant results, especially for old channels with several hundreds/thousands videos.

Therefore I'd rather advocate for a recommendation page. We could start from the user history, that looks like the most privacy-friendly since it uses already stored data. E.g. :

  • fetch and shuffle all sidebar recommendations from the N last videos in history
  • fetch the tags of the N last videos in history, then return the search results of one (or more) random tags
  • whatever the way of selecting videos, display videos from subscribed channels first

ThatIsAPseudo avatar Aug 11 '23 23:08 ThatIsAPseudo

Another approach could customizable, keyword based feed: basically searches running in the background that search for popular or recently posted videos that match keywords that are customizable. For example, my keywords could be "linux, programming, video games", and the feed would periodically search and pseudorandomly select recent and popular videos that come up in search that match those keywords that you customize in settings.

chap126 avatar Jan 15 '24 15:01 chap126

There's this site that can pick random videos off a channel using this API without any API key. image

I think a lightweight daemon that fetches around three videos every thirty minutes or something could work too, maybe? IDRK.

eeriemyxi avatar Mar 06 '24 11:03 eeriemyxi