I’d like to start discussion here regarding Unity’s remote video search feature.
In the past Unity had controversial feature called SmartScopes Search which used Canonical’s servers to perform search in various web resources (mostly Amazon if I remember correctly). If I am not wrong most people disliked this feature due to privacy reasons and tended to disable it.
During my work on Ubuntu Unity 26.04 one of my tasks is to migrate Unity components from deprecated libsoup2 library (used for creating requests to remote servers, mostly HTTP(S)). One of the packages which require migration is responsible for performing video search in the dash. This package currently uses (already disabled long time ago) Ubuntu/Canonical’s servers to request video search in remote resources which of course is (or rather was, bcause it no longer works for years already) a privacy threat. And here is my question what would you like to have:
Drop remote search capability completely and search only local videos,
Integrate dash video search with yt-dlp but keep local video search as default what user wants.
With option 2 if yt-dlp is installed and when user types in dash ytsearch: SOME VIDEO the dash will call yt-dlp to fetch matching YouTube videos, their descriptions and thumbnails and show them in the dash (in some pretty form). Once one of the videos gets selected in the dash, it can be watched in VLC (or maybe some other video player?) with selected quality (can be selected before playback) or downloaded with specified quality.
Personally I’d like to go for option 2 but I want to see what you think of this feature.
I like Option 2 as well as long as there is an option to disable it for users who want to. I would use this feature, personally (I am running UU 26.04).
This isn’t a matter of “want” I fear, there are countries where it is completely illegal to download content from youtube and there is also content that is illegal to be downloaded in all countries due to copyright law, to prevent your users from accidentally and unknowingly doing illegal stuff you will at least have to present them a disclaimer to not get them into trouble (like we had to do for more than a decade for the mp3 codecs that have been illegal in the US for a long time due to patents)
Is it possible to let default be local files only and have a toggle button to enable (opt-in) remote search with a disclaimer that user will be responsible for the content they search/watch? Or you mean to say having yt-dlp in the default install is troublesome?
Having it in the default install is surely fine since the issue is the actual usage of the tool. But you need/should notify the user that they might be doing something potentially illegal based on the law of their country or the rules of YouTube for a particular piece of content…
Use the output of that command and present a search result simply pointing to webpage_url, which is just the Youtube link, in case of ytsearch. webpage_url should always be the link to the *tube URL, no matter the search provider/extractor.
There’s also mpv’s ytdl_hook and Celluloid (also available as Snap) with which one can play any video from all of the supported tubes, the number of which is mind-boggling:
$ yt-dlp --list-extractors|wc -l
1752
But I am not sure what the legal implications are for that type of usage. Essentially that’s also just downloading the video and piping it to mpv; the only difference being that there is no local copy.
Then again, my own recent(ish) experience shows that there will be times when yt-dlpwon’t work. Apparently YT has upped the game considerably in terms of defense against it. Plus, it’s not exactly snappy; takes several seconds to extract metadata for every single video (not straight forward to parallelize); might as well just do an online search: site:youtube.com entertain me.
So maybe just go with option 1 on those grounds. The user experience of option 2 will not be up to Ubuntu standards, even when only doing the glorified online search.
Thank you all for you feedback. What I proposed is just a suggestion of possible feature. In my mind this is supposed to be as configurable as possible (defaulting to local-only search). The user would be able to switch on/off remote search utilising yt-dlp, extracting information about that video (once it was selected by user to get more details), downloading (with disclaimer about legal consequences) and streaming directly from YT’s to preferred remote content player (mpv, vlc, whatever else supporting HTTPS playback).
Given currently lack of enough free time this feature most likely (if people wanted it at all) would land in later Ubuntu Unity releases (maybe in 26.10 might be possible but I can’t promise)