My text-based media center
It’s been more than 4 years since I wrote about my text-based media center over at my Swedish weblog. I was thinking it’s time to make a post about it here in English and perhaps make some sort of follow up on it.
Like most other people I have my TV connected to a computer so I can play my local media on the TV. I used to have a dedicated computer for it with the ever so popular software Kodi and the ridiculously tiny wireless keyboard Logitech DiNovo Mini. It was a solution that worked fine for about a decade or so before I decided it was time for a change.
My issues with Kodi
While the setup was good enough, I had two issues with it. One was the Bluetooth keyboard, it was regularly—several times per week—dropping the connection and the only way to get it to connect was to remove the battery for a few seconds. I eventually got tired of it and started looking for a new Bluetooth keyboard, but I couldn’t find anything that I liked. This is when I was starting to considering the option to just get a proper wired mechanical keyboard for a lot less money.
The second issue was the YouTube workflow with Kodi. I have never had any TV-channels (by choice), I instead ended up watching various content makers on YouTube, which is kind of ironic considering that I’m generally the last person to adopt anything remotely new or modern.
Back then I was following a crazy amount of channels. The YouTube-client for Kodi was perfectly fine for my needs at the time, at first at least. It had all the basic features one would expect of an Kodi-addon back then. You where able to login to your Google-account, view and subscribe to channels and all that. And it was all fine until one day when my list of subscriptions started queueing up and I ran into an unpleasant issue.
It turned out that the client had a pretty low cap on how many videos it would show in the subscription list with all new videos. It meant that if I wasn’t obsessively bench watching videos I would miss out on them. Well. Unless if I visited all the channels manually, one by one.. At this time I was following around 100 channels.
While I was looking for a solution to my issue I happened to read about YouTube secretly supporting web feeds. As a long time user and an advocate of web feeds I got exited and I instantly knew that this was something I wanted to explore! I tried to find a solution that would involve web feeds and while I was doing it I had this fun idea of setting up an UNIX-like media center. I was already using Newsboat and I thought it would be cool to use it in some workflow on my media computer as well.
I ended up with a text-based media center based on my back then number one Linux based operating system; Arch Linux, which was later replaced with Gentoo.
I didn’t have to think this through for very long. I instantly knew what I wanted and how I wanted it. I installed my favourite window manager i3, the terminal emulator URxvt, the file manager Ranger, the media player mpv (with youtube-dl), livestreamer-curses and a few other things. I didn’t really have to make any major changes to anything other than changing a few keybindings to better fit a workflow that would not require me to use both my hands. I know how lazy I can be when I’m laying down in the sofa and I also use blank keycaps, so I need to be able to use my muscle memory.
With Newsboat as my new ‘YouTube-client’ I was in full control of the content. I didn’t have to worry about missing videos and I could easily filter out content that I didn’t want to see. I could also easily mark any videos as seen, a process that was utterly complicated in Kodi. To mark a video as seen in Kodi I had to either watch the whole video or fast forward to the end for it to mark it as seen.
And then it was the quality! With Kodi I was stuck at low resolution videos at 720p with 30 FPS. With mpv (and with the help of youtube-dl) I could watch videos in any quality I wanted. Almost.. My media computer was over a decade old and it turned out that I was limited to 1440p at 60 FPS if I wanted a smooth video without audio sync issues. This turned out to be just fine as well. I could not see any differences in the qulity with a slightly higher bitrate from my sofa a few meters away from the TV.
My new setup also improved my workflow by a lot. With Kodi I had to close the application I was using and then browse to the next thing, which always required far too many steps and a lot of time. In i3 I can just leave it in the background and instantly switch to anything else on another workspace with the keys
The only downside with my text-based setup is the movie part. I don’t have access to fancy covers, metadata and things like that, but that’s okay since I don’t have a huge movie collection or anything.
Some changes happened to my setup back in 2019
Exactly one year ago I moved to the big city into a new and smaller apartment. I brought both my full-size desktop computer with me, but after a few months I decided that they took up way too much space and that I had to do something about it.
I also liked the idea of having just one computer, so I decided I wanted to try using my desktop computer as my media computer as well.
Here’s what I did:
- I kept both keyboards so I don’t have to run around with a keyboard whenever I want to either sit at my computer or watch anything on my TV.
- I’m only using one workspace on my TV. I find my workflow fast enough that if I want to switch from say Newsboat to Ranger I can just press
qto exit Newsboat and then run the command
jo moviesto open Ranger in the movies directory on my storage.
I have bound the keys
<Super>+<Enter>to focus workspace 10 on my TV and then spawn URxvt with alternative settings.
Here’s the config for i3:
bindsym $super+Return workspace 10; $exec "tvterm"
tvtermlooks like this:
#!/bin/bash urxvt -name URxvt-tv -hold -e sh -c 'printf "\33]2;%s\007" "tvterm"; zsh'
The “TV settings” for URxvt looks like this:
URxvt-tv.font: xft:Monospace:pixelsize=40 URxvt-tv.boldFont:xft:Monospace:pixelsize=40 URxvt-tv.background: #000000 URxvt-tv.foreground: #FFFFFF ! black dark/light URxvt-tv.color0: #2e3436 URxvt-tv.color8: #6e706b ! red dark/light URxvt-tv.color1: #cc0000 URxvt-tv.color9: #ef2929 ! green dark/light URxvt-tv.color2: #4e9a06 URxvt-tv.color10: #8ae234 ! yellow dark/light URxvt-tv.color3: #edd400 URxvt-tv.color11: #fce94f ! blue dark/light URxvt-tv.color4: #3465a4 URxvt-tv.color12: #729fcf ! magenta dark/light URxvt-tv.color5: #92659a URxvt-tv.color13: #c19fbe ! cyan dark/light URxvt-tv.color6: #07c7ca URxvt-tv.color14: #63e9e9 ! white dark/light URxvt-tv.color7: #d3d7cf URxvt-tv.color15: #eeeeec
I wrote about using URxvt with alternative settings before if you want to read more about it.
Even more changes are expected
It looks like I’m moving again very soon and this time I’m not going to have my computer near my TV anymore. I know for sure that I don’t want a full-size computer as my media center anymore. I might end up getting a Raspberry Pi or something similar. I would highly appreciate any ideas or recommendations for a cheap, tiny and low consumption setup!
And that’s it I guess. My setup is not crazy in any way, but I like it!