Can I Run Youtube Entirely From My Terminal? (No Browser)

211,326
0
2024-05-11に共有
All of us have probably experienced the horrors beyond human comprehension that come with a classic Youtube session, so what do you say if, by taking this nigh infinite potential of the platform, while getting rid of all the fluff, we use it in the way it’s always been intended – running the entire thing from your terminal, no fancy useless UI, no fancy useless features and even no fancy useless graphics.

Watch as, by combining the powers of the official Youtube API, the ever-dependable Python and the ingenuity (ahem) of yours truly, I try to get the entirety of the Youtube experience running in a terminal, in such a way that no matter the environment, you'll get to experience the platform in its most adequate form.

Link to the repo: github.com/icitry/YoutubeCLI

コメント (21)
  • @icitry
    Hi everyone! First off, I want to thank you all so much for the insane amounts of support / feedback and all around great discussions and suggestions. It's always a pleasure to read so many different opinions and ideas, especially as I try to tackle projects with many unknown factors to me, so thanks for teaching me stuff as well! Now, I noticed a lot of you suggested adding a couple of things, and I'll go in order: 1. A requirements.txt file - I mean yeah, duhh, idk how I forgot about that one, consider it done. 2. Add support for subtitles - Also, great suggestion so I went and did just that. You can now specify if you want to use subtitles and in which language using some new flags: --subtitles, -s | --subtitles-lang, -l. If none are found, it'll try to get autogenerated ones. I hope this is a pretty satisfying solution, and maybe an alleviator for point 4. 3. Add support for RGB - Again, awesome idea (I mean they all are tbf), but for this one I had to sneak some trade-offs in, as for some reason, to this day and age, there are enough terminals that don't even support colors by default, nevermind a large palette of them. So I decided to use the basic ANSI-8 color palette (let's just embrace the vintage style ig) when rendering them, and also made it so it's disabled by default, in case your terminal doesn't support it. Also I should mention that, due to the fact that the project is based around an on-the-fly way of running, with everything rendered in real time, adding colors is quite the intensive task, so if you're set on using them, consider playing around with the frame size. You can enable this using the --colors, -c flag. Ah, also if the basic palette is too narrow for your tastes, I made it so you can expand the ANSIConstants.COLORS dictionary - just make sure to follow the established structure, and also beware that the more colors there are to choose from, the slower the conversion. 4. And now for the final and most debated point - audio. As you might surmise from that nod in point 2, I decided against adding support for audio. I fiddled with the idea and tried some implementations, but I realized the added complexity would slow down the app, and raise a lot (and I mean a lot) of syncing problems, because, compared to other video-to-ASCII converters, this one does everything in real time, so merging the audio and video at the end into a file is out of the question. * Also I expanded the README file so there is more info about how to use the damn thing. ** Also also fixed the color scheme (it was inverted if the background of the terminal was darker than the characters, which is pretty much the base case, so... thanks for pointing it out), allowing to specify if the color scheme should be inverted or not and also (the 3rd one) now it's possible to render using Unicode characters instead of the default ASCII ones - just make sure your terminal fonts support Unicode. All of these are commited to the same repo: github.com/icitry/YoutubeCLI
  • @Seedx
    Linux users removing bloat:
  • @LichtMarv
    just watched this video again using the tool. text was a bit hard to read, which is funny, because its a literal terminal made for text lmao
  • @mchlotg
    Literally this is a good option for dopamine detoxers
  • Reminds me of a decade ago when I was a kid and my only computer was a raspberry pi. It couldn't run youtube in a browser, so I installed a CLI interface for it that would let you search videos with the keyboard and then write the video directly to the framebuffer device.
  • @lucaswa5taken
    Now i can finally watch youtube from my Ubuntu Server
  • @kamaeff
    Dude's been rickrolling us for 15 minutes. And we're enjoying it.
  • @davestorm6718
    Dude! This is far out stuff! This reminds me of, back in 1990 when we were making "video" with ANSI characters (in color), frame by frame. I wish I had a tape drive to read these old tapes - lot's of crazy ass code we did back then (and had 2 BBSes running continually). Great times!
  • @lightningx10
    At first i thought this was just going to be some youtube-dl frontend for selecting videos to open in mpv... Holy shit this is even better :D
  • 3:41, this guy is fully dedicated, he even bothered fixing the responsive issues, lmao. I totally lost it.
  • @stef2499
    I never thought I‘d get rickrolled by a terminal. Geez
  • linux users would rather make a custom JS engine than just using a web browser
  • No, the actual usable youtube in text based environment is tty + framebuffer (fbdev) + mpv with framebuffer support + mps-youtube
  • @SaloCh
    I feel like a simple fix that would've made the videos look so much better would've been to simply... invert the character list. Since the characters are white and the background is blue, it makes sense to use the densest character with the lighter pixels, not the darker ones.
  • @Pr0toPoTaT0
    Awesome video! Dude you put in effort and the best part is, its not like it was extreme effort but it was so much more then i would've for a youtube CLI! You totally made one better!!! Im gunna subscribe for more fun coding with different clis and apis ❤️
  • Does this support ads? If not, you better expect them coming for you over their TOS /s This is the final boss for YouTube in their war against ad-block lmao Really great work btw. I'm blown away how well you got it to work.
  • @S0L4RE
    You are an excellent software engineer. Great video.