Youplay

by ma08 on April 26, 2017

Oh boy, ma08 is back with some new stuff.

A lot has happened since I last blabbered (read blobbered) on about something obscure I have done to feel good about myself and maybe sometimes to contribute something useful to humanity. This time, hopefully the contribution is something more than creating content in the backwaters of the interwebs. Ideally I would have liked to work on it more before documenting and publishing but the situation demands it so bear with imperfections. The journey towards the perfection should be enjoyed, irrespective of achievment of perfection.

Any self respecting programmer will try to tinker around and automate stuff to his liking. My OCD to do everything using the keyboard and the need to stay away form using the sloggy browser (to do this day I can't figure out how even with all the computational power we have, haven't come to resource efficient browser-webpage system. Maybe webassembly might shake up things for the good) lead to my previous post - play youtube natively in a video player without ever opening the browser. Currently, it plays the first video in the results of the search time you give. I have actually followed through about creating a interface in terminal to navigate the results to select the required video. Here I give a pitch about youplay:

YouPlay, so that you can play youtube videos seamlessly from the comfort of terminal, thus making the world a better place(slicon valley video).

For brevity, it is to search youtube from the terminal or your command launcher (rofi), scroll through the results

  • Starting off with the bad news, what it doesn't have:

    • Option to download video
    • Search history
    • Full details of the video like channel name,
    • Sort search history
    • Option to see beyond the first 25 results
    • Search autocompletion
    • Documentation
    • Manual Page
    • Full Support for multiple terminals (Currently all features work only for urxvt)
  • What it has:

    • Vim-like bindings (search, navigating). (Mic drop)
    • Ability to select video quality and if required stream only audio.
    • Thumbnails of videos if using urxvt.
    • Ability to have a small sticky window playing the video anywhere on the screen
    • so that you can do something like I am writing this blog while watching videos(image)

This is just part of my journey to vimify everything that comes to me. I was too high when coding some parts of this so can't remember where's what. I am too scared to open the source code now to collaborate. So just presenting how it works and also releasing the source code just in case some weird/wired nerd like me can get some inspiration and do crazy stuff.

  • Keybindings:
    • / to go to search bar
    • CTRL-[ to escape from the search bar
    • "Enter" to enter the search
    • j,k to navigate through the search results
    • i to open the window of video formats
    • q to escape from the window
    • I myself don't know the rest of the bindings as of now. Just watch and see.

This is the power of linux, i3, vim, urxvt, youplay, and something else. Please click on the next image to witness the magic. Youplay I don't expect anyone to get it working for themselves. Will write a better README.md when I find some time.


comments powered by Disqus