Behind the Scenes: Rewrite Preview and Experimental Builds

So, it's been very silent over the past couple of months. The world is very different now compared to when I last made a proper blog post. Despite that, I haven't let that stop me. In today's behind the scenes, I will be showing off some of the progress that's been made towards the rewrite of FreeTube. I also have a nice surprise at the end for those who are eager for the eventual release.

New Website Design

Before we get into the FreeTube changes, I'd like to quickly talk about the FreeTube website. We have recently had a much needed design update for the website and it is looking much better. A big thanks to cjfloss on GitHub for the contribution. Come and check it out here!

The New Settings Page

I'd like to start off by showing the settings page.

Okay, so the settings page itself isn't all that exciting, it's the new options within the settings page that is exciting.

No More Manual Saving

While the settings page has been made easier to navigate as the app progresses, it has become clear to me that it still needs to be a little more user friendly. Sometimes it isn't very clear that your settings need to be saved in order for the changes to take affect. In the new settings, changes to your settings are saved as soon as the change is made. So no more wondering why nothing has changed. This should be a very nice quality of life upgrade.


Invidious is an amazing project. I'm very thankful to have a project like Invidious that's doing amazing things and has a great developer who manages it all (shout outs to Omar Roth and the rest of the Invidious community). It's Invidious (and it's very great API) that has helped make FreeTube where it is today and FreeTube might not even exist any more if it wasn't for it.

As Invidious and similar projects gain in popularity, it becomes harder to keep the instances up and running. This was just recently an issue where most if not all of the public instances have had some issues with being blocked by YouTube. The biggest reason of this is because of the increase in popularity. Since a central server is handling the data requests of multiple users, it is making a lot of requests to YouTube to handle the needs of everyone. At the time of writing, the main Invidious instance has almost 30,000 users. With that many users, it's no surprise that YouTube might notice a lot of requests coming from one place and try to put a limit on this.

YouTube (At least for now) doesn't technically “block” the instance. YouTube will instead present Invidious with a captcha to solve in order for it to continue it's normal use. Invidious will normally solve these captchas automatically, though if Google ever changes how they work (Which is why there has been issues recently) then that could disrupt the service of everyone using the instance (And also FreeTube users since we're also dependent on that server).

So what's the solution to this? Normally, using a different Invidious instance is the quickest and easiest way to bypass this. Other Invidious instances have far less users and are much less likely to be blocked because of it. Despite that, even the fewer amount of users can still cause these public instances from being blocked. In order for us to have virtually zero possibilities of this happening, we need to limit this to as few people as possible. This explanation has been long winded, but this leads into the first new feature of the rewrite.

I have decided to implement a new API into FreeTube. This API is really a collection of smaller projects that when combined provide near feature parity with the Invidious API. This new API runs 100% locally and doesn't depend on any outside server to work. This API does not use any part of the YouTube API and obtains it's data entirely on crawling through the YouTube website (Which is how Invidious and NewPipe works).

This new local API will provide a viable option to allow FreeTube to continue being used even when an Invidious server isn't working. This doesn't mean that I'm getting rid of the Invidious API though. Some might consider the Invidious API as an extra layer of privacy. It is also nice to use in the fact that the Invidious API can be updated without having to update FreeTube as well. It's for these reasons (and a few others) that the Invidious API will still be an option if you would rather use it.

There are also a couple of differences between what each API provides. For subscriptions, the local API will grab subscriptions from the channel's RSS feed, which doesn't provide the full information that you would typically see from a video (Video duration, is it a live video) where Invidious does provide that information. On the reverse of that, the videos provided by the Invidious API might not play as often as the ones provided by the local API (Which you'll know today as the “Grab Videos Locally” option in the current FreeTube release). This issue is more because of the way YouTube handles grabbing a video when the video was originally grabbed from a source in a different country.

As of now, the local API supports everything that the Invidious API is currently used for except for Channel Info and storyboards (The thumbnail previews that you see when you hover over the timeline of a video). The storyboards is something that can maybe be supported quickly however the channel info functionality is a different story. If you are interested in helping create a module for obtaining channel info, please reach out to me. I will likely have to make a suitable package for this myself. The local API also does not support the dash formats which means that it would be limited to 720p video options. The dash player can still be used but please be aware that you will be using Invidious for that functionality regardless of your settings.

The last related option (seriously, I didn't expect to talk so much about this) is that regardless of your preference for API, you can choose to use the other API as a fallback if you'd like. This should help guarantee that you won't have your experience hindered as you use FreeTube.

I really hope your excited with this feature. I'm really proud of how it has turned out so far.

Thumbnail Preference

This one seems to be a hidden feature, but I promise it's a good one.

Over the past view years, content creators have had to change their designs on the video thumbnails in order to attract more clicks. People refer to this as “Click-bait” and like it or not, it's here to stay.

At least before this new feature. The new “Thumbnail Preference” setting will allow you to replace the thumbnail of a video to a still image of the video. You can choose to use an image from the beginning, middle, or end of a video. This should present a better browsing experience to those of you who don't like the change in thumbnails within YouTube.



Theme Customization Options

Having a dark theme is pretty cool, but what if we could go a step further with that?

With the new structure from the rewrite, FreeTube now supports a wider variety of customization options for your theme. You start off with choosing your base theme (Currently light or dark. I'm hoping to make a gray option soon), then you choose your primary and secondary colors. Your primary color will change major parts of the UI to that color while the secondary color will change the minor parts of the UI. You also have the option to have the top bar match your primary color.

The possibilities are endless!

Playlist Functionality

I won't go over this too much, since the feature already exists in the current release of FreeTube. The rewrite now supports being able to view and watch playlists. Playlists will play automatically from one video to the other. The option to shuffle and loop videos are available as well.

Live Video Chat

This is a new feature thanks to the local API, as it isn't currently supported within Invidious. When you watch a live video, you can now view the live chat and follow along the discussion. You obviously won't be able to join in on the discussion, but being able to read it should be a big help.

So What's Next?

This all sounds great and all, but I know what you're thinking. What's left and when will this be ready?

Right now, all of the user specific features (Subscriptions, History, User playlists, profiles, etc.) still have to be created. Not including these features, the rewrite is fully functional and can be used for searching, watching videos, playlists and general usage. There will also be other small features and UI changes that I'm sure will be made as progress continues. I am actively working on adding these features so that this rewrite can get out as soon as possible. Thank you very much for your patience on this while I try to get this out.

Now for a Surprise

Obviously at this point, the rewrite is not finished and there likely won't be released any time soon. Having said that, I'd like to announce the availability of the new GitHub Actions page.

Here, you will see every change that is made to the rewrite. Whenever a change is made to the rewrite. Actions will automatically create binaries with those new changes. These will be considered experimental builds moving forward. This should make it more accessible for more users to try out the rewrite. I encourage anyone who is interested to download these builds and provide feedback.

These builds will not replace your current installation of FreeTube and will not affect your settings and configuration. When viewing the Actions page, the first build from that top that has a green check mark will be the most latest build of FreeTube. Clicking on that text will show the download links to that build. Unfortunately, in order for you to access these download links, you will need to be signed into GitHub. There won't be much that I can do to fix this due to GitHub limitations. I'm hoping to maybe have these uploaded to GitHub releases maybe once a week so that they can be downloaded without needing to sign in to GitHub. I'll make a quick announcement on Mastodon when these builds are ready so be sure to check over there for when that's available.

Wrapping Up

That seems to conclude all of the recent updates. I hope this makes up for the recent silence. I'm really excited with how this rewrite is turning out and I hope you are too. I'll see you next time for the next update.

Take care!