YouTube Design Changes and my peaceful life

Around a week ago YouTube switched my homepage to their new design with very big video previews which is suitable for tablets or smartphones but totally unusable on desktop with reasonable huge screen.

So I searched a way how to disable it, but as almost always there was none. In the end I used “Feedback” function and described how unusable it is on desktop and now (at the time of writing this post) I have older homepage design.

Meanwhile

While YouTube was playing tricks on me I decided to play tricks on YouTube. My first idea was to change the user interface with some UserScript but that failed. The second idea was to simply discard web browser and use YouTube Viewer, to be exact its GTK version to browse and watch videos.

The other big hurdle of YouTube is that videos often do missing or are simply blocked, audio muted, cut and so on. Due to this I decided to create a little video cache. This cache also helps me to get better video quality out of youtube-dl and YouTube-viewer.

Another things is that my machine does not like modern software which supports playing YouTube videos such as MPV (restarts? GPU) or VLC (does not work at all whatever I set in settings) I went for simpler Mplayer which works fine to my surprise.

The goal was to get videos with 1080p or lower with fps 30 or lower. I was unable to set this special condition directly in YouTube Viewer. I decided to create little “proxy” script which will be called from YouTube Viewer with video URL and video title (I am truly lazy here).

Little script

Since youtube-dl is written in Python I also decided to use Python and use youtube-dl python API to call it instead of cli. In this way the script has full control over youtube-dl configuration and I could play.

The biggest hurdle is that youtube-dl does not provide final filename for downloaded video. The only way to get the final filename which is used the script has to parse (with regular expression to have some fun) the debug output of youtube-dl to snatch the real filename in which the file exists or will exist in file system.

In the end I just called mplayer with video filename and title which was provided in argument.

The script is still not up to the standard and only works thanks to luck, use with a caution. You can download it here

Conclusion

I have to thank YouTube for providing me with this oportunity, without I am afraid I would be still mostly locked in YouTube interface, not wanting to go out.

Really big Thanks goes to youtube-dl and youtube-viewer projects. Thank you.

Articles from blogs I follow:

Calamares towards 3.3.11

I’m going to change up the Calamares release process a little. It’s been slow going as a community-maintained project – which isn’t to say that that is a bad thing. Just slow. I’ve decided to make releases marginally more predictable than “when [ade] has …

via [bobulate] October 24, 2024

There is only one reason why Microsoft Windows is the dominating operating system on the PC desktop

The Internet is filled with blog posts, articles on tech media, and videos on YouTube about why Linux is not the main operating system on the PC desktop. "5 reasons why", "10 reasons why", bla, bla, bla. But they are all wrong.

via unixdigest.com August 24, 2024

Signing Android Apps Using a YubiKey (on NixOS)

In my spare time, I currently develop two Android apps using Flutter: AniTrack, a simple anime and manga tracker based on my own needs, and Moxxy, a modern XMPP client. While I don't provide release builds for AniTrack, I do for Moxxy. Those are signed u…

via PapaTutuWawa's Blog July 24, 2023

Generated by openring