Categories
3D modeling open source social

I’m leaving YouTube

Last May I received a new Terms of Service request from YouTube. In this request I had to grant YouTube the right to monetize my videos. In other words when I agree, YouTube can insert ads in the videos. This is the final straw for me with YouTube and Google.

Click here if the the video doesn’t run in your browser: https://peertube.linuxrocks.online/w/egFYuCEYwTCGNLiA58v7F7

I’ve created this YouTube channel with tutorials about open source 3D CAD programs and never had any intention to monetize the channel. So I definitely don’t want YT to monetize it for me.

My goal has been to inspire people to use open source software instead of proprietary software and judging by the number of views and reactions I’ve been mildly successful with that. I had over 200.000 views with my tutorials and more than 1100 subscribers. Not much for YouTube of course but keep in mind that the channel was about open source 3D CAD. Very much a niche market

I’ve put up with all YouTube’s privacy invading policy and data mining because of the popularity of YouTube. YouTube has a near monopoly when it comes to video sharing and has a huge worldwide audience. So to reach my audience with my video tutorials it made sense to use YouTube.

However where does one draw the line. I’ve created the video tutorials believe it or not with a lot a sweat and blood. And it’s important that I keep sovereignty over these videos. So whether ads will be part of the video is up to me and not YouTube. This leaves me no other alternative than to delete all my videos (except this one).

Luckily I’ve already had found an alternative home for my tutorials. It’s called PeerTube. PeerTube is video sharing software but contrary to YouTube, it is open source. In addition it’s also decentralized and federated.

This means that anyone can create a PeerTube server and host videos. These servers can connect to each other and share the videos between them (federation). As a result there is no single owner of the network. If the server that I joined fails or I don’t like the policy on that server I can either upload my videos to another server or even start my own.

I already have some content on PeerTube and I’ll upload new videos to PeerTube. However it’s unlikely that I’ll upload my older videos to it. I figure that they are less relevant anyway. I’ll put a link in the description to the new home of my videos and I hope to see you there.

I hope to see you on PeerTube and keep using open source software.

Here is a link to the new home of my 3D CAD videos: https://peertube.linuxrocks.online/video-channels/homehack/videos

If your interested in the network protocol behind PeerTube and other decentralized services here is link to a post that I wrote about it: https://homehack.nl/activitypub-the-secret-weapon-of-the-fediverse/

Lastly a link to a post that I wrote about the other problems that I had with YouTube: https://homehack.nl/activitypub-the-secret-weapon-of-the-fediverse/

Categories
open source social

The Movim social network

It’s more than two years ago that I started using the social network #Movim after a tip from an acquaintance. I had left G+ and never wanted to use a centralized social media platform again. I tried the Fediverse (Mastodon and Friendica), Diaspora and Movim but eventually I kept using Movim and Mastodon. The secret of Movim is tranquillity. After logging in for the first time the news stream is empty, much like Diaspora, and it only gets filled with post from people that you follow, communities that you subscribe to and rss feeds. This in combination with an easy to use chat option that gives access to whole #XMPP network makes Movim very powerful.

It’s also incredibly easy to create a community in Movim, although I think community isn’t the most appropriate description here. It’s more a blog from one or more persons where other users can subscribe to, like and comment in a linear fashion.

I recently introduced my wife to Movim and the first thing that surprised her is that, contrary to FB, the news stream contained articles worth reading instead of ads and other bs. She also liked the fact that she could use any XMPP-client for chat. Time will tell if she’ll keep using it but her initial enthusiasm was very encouraging.

Although, I’m pretty psyched about Movim I would like to see some features. First, coming back to the tranquillity, when in the news stream on the right side five posts of other Movim users appear. I suppose that this is meant for discovery and that’s great but in some of the posts I’m less interested but I can’t block or hide these posts.

Also there is no way to block or hide a person entirely. This may become a problem since Movim appears to be becoming more and more popular and with that the interaction between people grows exponentially.

Currently I’m lazily using the European server of Movim but I (or anyone else) can deploy a self-hosted instance and I’m tempted to experiment with that. I’ll probably get back to that.

Finally, I want to thank Timothée Jaussoin and other contributors for developing Movim and making it available to all of us. It’s awesome. And if you read this please consider donating to the Movim project.

Link to my initial thoughts about Movim: https://homehack.nl/movim-floss-alternative-for-hangouts/

Categories
open source social

Freedom in the Cloud (eleven years later)

I watched the famous speech ‘Freedom in the Cloud’ of Eben Moglen in 2010 at the ISOC-NY. Again if I might add. That speech had a great influence on me. It was the first time that I realised that client-server infrastructure of the internet is a huge problem. This very infrastructure ensured that all the data were aggregated and used (or abused) by the ones that owned the servers. At the same time the clients were being deprived of power. And that with the accumulation of servers in a data centre and he virtualisation of the servers (cloud) these owners were getting even more powerful.

I wasn’t the only one that was influenced by this speech of Eben. It also marked the beginning of the development of Diaspora social network. As it happens some of the initial developers of Diaspora were present at that Friday night at ISOC-NY and it inspired them to build the Diaspora software.

A lot has changed the last eleven years, and I will get to that, but what hasn’t changed is the client-server infrastructure, the source of evil. If anything the power of ones that own the servers like Facebook, Amazon, Google, Apple and even Twitter has increased greatly in the last 10 years. And as a consequence the ones working on the client side have become even more powerless. Snowden (2013) and Cambridge Analytica (2016) are just a few examples that demonstrate that this abuse of the ‘architecture of the catastrophe’ took directions that we couldn’t have envisioned.

On the plus side since 2010 a lot of developments have started to halt this catastrophe. Some were more successful than other but it’s undeniable that if someone is looking for a free (as in freedom) alternative right now a lot more options are available than 10 years ago. Also these options seem to be sustainable and rather successful. The Fediverse with Mastodon, Pleroma, PeerTube, Funkwhale, Pixelfed, Lemmy and others have made great progress since the introduction of the ActivityPub protocol. XMPP has made great progress with the introduction of advanced clients like Conversations, Movim and Gajim.

The Freedombox hasn’t lived up to it’s expectations though. The development of Freedombox was initiated by Eben and allows to set up a simple private server in your home. The last time I checked even Diaspora was not supported by Freedombox making social networking with it impossible. Luckily other initiatives have taken flight such as Yunohost. They make it easy to self-host a server and install software for blog, chat, social networking, online storage and file sharing. Yunohost and others bring the dream of Eben closer of a peer-to-peer network instead of a client-server network.

Another noteworthy development is Scuttlebutt, a client-based peer-to-peer application for encrypted social network. Just install the app on your PC or phone (Manyverse) and communicate directly with others that installed the app.

Or Briar, a client for messaging that uses Bluetooth, WiFi and the Tor network to communicate. The need to host your own server has been replaced by simply installing an app that doesn’t rely on a central server. Even if the internet is down the information keeps flowing over WiFi and Bluetooth.

Although we still live in the catastrophe that Eben spoke about eleven years ago there are more possibilities to escape and it appears that more and more people are discovering this. With every scandal, every update of the term of service a wave of new users appears on the networks that I mentioned above and that’s something to be grateful about but it should also motivate us to keep fighting for a free (as in freedom) internet.

Categories
open source social

Lemmy, the federated alternative of Reddit

I’ve got a confession to make. Since I left Google+ and Reddit two years ago I always missed the community approach of both social networks. Don’t get me wrong I love XMPP (or Movim, which is based on XMPP, in my case) and Mastodon, the Twitter alternative. I love their ease of use and the possibilities to communicate without a large tech company preying on my data. I love the ease to set up a chatroom or a microblog in Movim. And I love that they are federated. However both on Movim and Mastodon it’s hard for me to have a structured conversation about one single topic (e.g. cycling or 3dprinting). It’s for that reason that lately I’ve spend time on Lemmy.

Lemmy is easiest described as a federated Reddit alternative. This means that with Lemmy members can send text posts, links and images that can be up- or down voted by other members. Lemmy already consists of tens of instances and thousands of communities. Communities (the equivalent of subreddits) are the cornerstones of Lemmy. Popular topics like Linux, open source and privacy already have their own community. If a community doesn’t exist the user can easily create one. Just click Create Community, fill in a form and press Create and you’re done. Every post has to be posted in one of the communities. A huge advantage is that posts don’t get buried by hundreds of other posts in the timeline. As a consequences discussion threads are easy to follow.

The UI of Lemmy is minimalistic but very effective. The user is presented with a list of comments that are ordered by popularity. The comments can easily be filtered e.g to only show the new comments. Via a menu selection all the communities are shown and can be searched. Overall search is very well implemented. I use it a lot to learn about topics of interest to me that were discussed earlier.

Lemmy comes with a built in slur filter which I believe is a very good idea if you want to have civil discussions. Perhaps not everyone does agree with this filter but Lemmy is free and open source software so one can always create his own fork.

I’m currently on lemmy.ml which appears to be the most general purpose and the largest server in terms of subscribers but you can run your own server if you want to. The number of instances of Lemmy is growing (currently 29) and so are the number of users but only time will tell what portion of users remain active.

Besides the slur filter mentioned above the lemmy.ml instance comes with a Code of Conduct that is enforced by a team of moderators. Again a good idea for the above mentioned civil discussion. It’s worth mentioning that the moderators keep a public Modlog where one can keep track of all the actions taken by the moderators. A gesture of transparency that I haven’t seen on any social platform.

Speaking of discussion, although Lemmy is still pretty small in size, the discussions are excellent. Most of the times the comments are to the point, well informed and criticism is constructive. This makes Lemmy a vibrant community even though it’s relatively small.

The beauty is that Movim, Mastodon and Lemmy (and all other federated social networks) serve different purposes so I don’t have to choose. They can co-exist and enable people to optimize their online social needs all with free and open source software and all federated.

EDIT: This post was rewritten on 17th August of 2021 to include my experience with Lemmy over the last half year.

Categories
open source social

The exciting roadmap of PeerTube version 3.

PeerTube, which is free and open source software, is a much needed decentralized alternative to the behemoth YouTube. In fact thanks to the ActivityPub (AP) protocol PeerTube federates with other AP social networks such as Mastodon.

Sepia, Peertube’s mascot

Framasoft the non-profit organisation behind PeerTube (and other free software) has started a fundraiser for version 3 of PeerTube. They published a roadmap accompanied by a progressive fundraiser over a period of 6 month. The current roadmap looks very promising and is divided into four main steps. Each of these steps can be fulfilled if a specific financial target has been reached. New features and improvements are among others: global search through the Fediverse, moderation improvements and features, playlists and finally live streaming.

Global search within PeerTube is a much needed feature to enable the user to find videos that are outside the instance-bubble. The PeerTube instance that I’m using (linuxrocks) only federates with a couple of other instances making it difficult for my videos to be found while I can’t find much when searching for content.

Moderation. An online video sharing platform isn’t without problems like copyright violations or not safe for work material. PeerTube already has some moderation tools like a report tool but more tools certainly won’t hurt and the roadmap show a long list of new moderation tools.

Playlists. e.g allow clips of the same video in a playlist thus making this a remix tool.

Live streaming is already big and according to market research it will grow rapidly in the coming years. For PeerTube to keep up this is therefore a necessary feature.

At the moment of this writing over half of the required amount of funds and two of the four main steps in the roadmap has been reached but Framasoft will surely appreciate more donations to be able to fulfil the complete roadmap. So either contribute financially or at least share the news!

Categories
open source PC social

DeGoogle my life

It’s been 1.5 years since Google+ closed and I started dipping my toes into the Fediverse and other distributed social networks. It also kicked off my search to get rid of everything Google. To DeGoogle is easier said than done because Google is everywhere from search to fonts, from the video platform YouTube to the file storage and synchronisation service Google Drive, and from blog publishing service Blogger to the Google mobile operating system Android. And the list goes on. So chances are you’re using a lot of these services and most of them require a Google account, a devious move from Google. It’s for this reason that it’s very hard to get rid of this o so convenient account.

Shattered Google logo illustrates that we need to break the power of Google on the web.
The shattered Google logo (that I made in Inkscape) illustrates that we need to break the power of Google on the web.

To get a more comprehensive view take a look at this article. Below I’ve compiled a list of the most important Google services and products that I replaced with something else.

Google Search

Search was perhaps the easiest to replace (or is it). While Google search is by far the largest search engine in the world DuckDuckGo (DDG) is becoming increasingly popular. I’ve used DDG to great satisfaction and only had to use Google search a couple of times. The only gripe that I have is that DDG isn’t free and open source software (FLOSS) let alone distributed. In that respect I’ve read some good things about Searx and I may give that a try in the future.

Chrome

The Chrome browser of Google has become very popular with an estimated market share of approximately 70%. A large portion of the Chrome’s source code is based on Chromium, the open source browser project from Google, however Chrome is proprietary freeware because it contains large blobs of proprietary code. The Spyware Watchdog considers Chrome’s Spyware level extremely high this due to multiple spyware features that are built-in such as Google Account and Navigation Assistance. Another threat comes from the earlier mentioned market share. This gets even worse when we include the other browsers that are based on Chromium such as Microsoft Edge, Opera and Vivaldi. I currently use Firefox. It’s perhaps not the most privacy minded browser around but it’s FLOSS, it has a reasonable market share which is important for support of web developers and development of Firefox is very active.

YouTube

Next is YouTube which BTW is becoming more and more annoying with all these ads and the recommendations with the sole purpose to keep the user as long as possible on YouTube (and serve even more ads). I invested a lot in YouTube in the past with over 70 video made about 3D CAD, 3D printing and electronics so replacing it is not easy. The solution that I found is two-fold. I remastered (part) of my existing videos and uploaded them to both PeerTube. If I want to watch YouTube videos I use Invidious in the browser of NewPipe on my Smartphone (still Android sadly).

Google Drive

Over the years I got dependant on Google Drive e.g to store the CAD files that I wanted to share after I published a project either in blog or a video. I want readers and viewers to be able to reproduce the project. Since I didn’t want to self-host a solution such as Nextcloud wasn’t for me (see edit below). I started looking for a paid service. I currently have a contract with Strato, a German hosting company that also hosts my websites. Strato offers HiDrive, it’s not FLOSS unfortunately but it offers 100% storage in the EU and (paid) end-to-end encryption is possible although only in the HiDrive desktop program for Windows (which is a bummer but I don’t need encryption for this purpose anyway).

Google Maps

Instead of Google maps I started using OpenStreetMap and products based on OpenStreetMap such as OsmAnd (on Android) and Komoot both on Android and the web browser. Komoot is excellent for hiking and cycling but unfortunately it isn’t FLOSS. These alternatives have proven to be good enough for me since I haven’t used Google Maps any more.

Gmail

I somehow started using Gmail. I don’t know exactly why because I already had very good email services. I also fail to understand why it’s so popular because every other email service does about the same. My own ISP comes with a very good email service and so is the web hosting company that I’m using. To stop using Gmail takes some preparation most importantly to list and notify all the people and organisations that send you email to your Gmail address. Also list all online services that use your Gmail address. Now replace this Gmail address with another email address.

You may want to delete your Gmail completely but it’s possible that it’s linked to your Google account. If this is the case you can either use a different email address for this account or more radical delete your Google account completely. In case you choose the latter remember that lots of Google services are couples to your Google account and can’t be accessed any more. Having said that if you start to purge Google from your life the Google account becomes less and less important with every Google service that you delete. So at a certain point deleting the Google account will be painless.

Android

Although Android is Free and Open Source software most Android phones come with proprietary software and services that prevent users from using the phone the way they seem fit. The easy way to free the software on your phone is to install FDroid. For most users the Google Play Store is the only way to install software on their phone. FDroid is an alternative software store that enables the user to easily install and maintain Free and Open Source software on their Android device. BTW installing FDroid and replacing proprietary apps is what I have done thus far and it’s a good start.

Even better is to replace the Google infested Android with a free version of Android like LineageOS. LineageOS is a FLOSS version of Android that can be used without a Google account and that comes without the proprietary Google apps (and perhaps other junk from the phone manufacturer). Make sure to check if your phone is supported before trying to install in on your phone.

Fonts

Yes I know, I have Google fonts in my blog. That came with the choice of the WordPress theme and I didn’t realize that at the time. That’s just another example how Google infested the web and how difficult it is to DeGoogle my life but rest assured fonts will be next.

Conclusion

To get Google out of your digital life is hard, very hard. This tells us how much Google is integrated into our lives and probably for the most part without being aware of it. Luckily we still have choice (other than just say goodbye to the web), choice that gives us freedom to use the web without being used. The freedom to control our data and not being exploited.

Edit: As someone on Mastodon pointed out it’s not necessary to self-host NextCloud. Examples of cloud service providers running Nextcloud are Disroot, OwnCube and Operationtulip.com (currently in beta).

Categories
open source social

ActivityPub, the secret weapon of the Fediverse

The Fediverse is the name for a number of interconnected (federated) social networks running on free and open software on hundreds or even thousands of servers all over the globe. These servers and networks are owned and maintained by a community of people and, contrary to networks like Facebook or Twitter, are not owned by a single corporation or organisation. Therefore all data and control of that data is distributed over individuals and (mostly) small organisations. That all users of these servers are able to socially interact with each other is because of the protocol behind most of the Fediverse, ActivityPub.

The Fediverse logo
Fediverse logo, 5 nodes in pentagon shape with all diagonals, multicoloured Creative Commons CC0 1.0 Universal Public Domain Dedication. Created by Eukombos

Now the boring stuff (which is actually very exciting). ActivityPub is a social networking protocol that enables the user (that’s you) to create, update and delete content over the network. In other words when you type a message, like a video or share a photo, the protocol ensures that these messages are exchanged properly. But that’s not what makes ActivityPub special. Other social networking protocols do the same thing, right? However ActivityPub is both open source software and it’s decentralized. This means that any developer can use the protocol to create an application for social media be it a micro-blog, a photo sharing app or a video sharing platform. Others (in fact anyone) can download the application, install it on a server and join an existing network (federate). Now this server becomes publicly available and you as a user can create an account and automatically join the Fediverse. Popular applications are Mastodon (microblogging), Pleroma (microblogging), PeerTube (video-streaming) and Pixelfed (image sharing)

Silos in Acatlán, Hidalgo, Mexico. (Photo by Diego Delso, License CC BY-SA, Source: Wikimedia Commons)

ActivityPub prevents that a social media platform becomes a silo (see photo) that can’t communicate with other platforms. Not only can a Mastodon user communicate with users on different servers on Mastodon, perhaps more importantly this user can also communicate e.g with a Friendica (macroblogging) user or a Pleroma user. These are totally different networks that all support ActivityPub. But this is even taken a step further where that same Mastodon user can follow his favourite PeerTube channel or someone that shares great photos on Pixelfed. This is like you were able to follow someone with your Twitter account on YouTube or Instagram. This also means that this Mastodon user can comment or like the PeerTube video from his/her Mastodon user interface. This is the true power of ActivityPub!

I already mentioned a few but there are dozens of applications that support ActivityPub. All have their different purposes and one has more ActivityPub integration than the other. One that I would like to highlight is Funkwhale. Funkwhale is a music streaming application. Like all applications mentioned above anyone can create a Funkwhale server and federate with other Funkwhale servers. The user is able to stream music from a different server, but also create favourites, make a playlist etc. Currently Funkwhale isn’t integrated with the rest of the Fediverse. Now recently the Funkwhale head developer, Eliot Berriot, started integration and made it possible to share music on Mastodon (perhaps also in Pleroma and Friendica but I haven’t tried that). This all works seamlessly thanks to ActivityPub.

The Funkwhale example demonstrates the power of ActivityPub. Applications with different purposes can work hand in hand. It avoids that Mastodon, which is by far the largest party in the Fediverse, becomes de-facto a silo. The Fediverse is supposed to be diverse and Funkwhale and other apps are enforcing that. In January 2018, the World Wide Web Consortium (W3C) published the ActivityPub standard as a recommendation. This is an important step for the acceptance of ActivityPub by developers and leads to more applications supporting ActivityPub therefore creating even greater diversity in the Fediverse.

With the support of W3C the future of ActivityPub and the Fediverse looks bright. Chances are that more networks will start supporting ActivityPub and will join the Fediverse. And that both developers and (wannabe) admins adopt ActivityPub either for their app or their own server. I’m convinced that this is the only viable way out of the mess created of Big Tech companies like Facebook or Google.

Further listening about the Federation and ActivityPub:

Categories
social

Welcome to the new decade

During last decade Big Tech with companies like FaceBook and Google increased their stranglehold on the internet. They turned internet-users to mouse-clicking or index-finger pointing consumers that are robbed of their data in order to create detailed profiles that can be sold to the highest bidder.

In this decade we take the internet back and the Fediverse enables us to do that. The Fediverse offers us a place where Big Tech is powerless and the user can take control again. Where we can create, communicate, upload videos and listen to music without the interference of FaceBook and Google. It’s important to understand that the Fediverse is more than the Mastodon micro-blog. Don’t get me wrong, Mastodon is awesome but the Fediverse is so much more than micro-blogging.

The website Fediverse.party shows that their are lots of other Fediverse apps. These apps excel in e.g streaming video (PeerTube) to replace Google’s YouTube, image sharing (PixelFed) to replace FaceBook’s Instagram, streaming music (Funkwhale) to replace Spotify or Google Play Music or a full blown blog (WriteFreely) to replace Blogger or Medium.

To escape from Big Tech and take matters in our own hands all these apps are every bit as important as Mastodon. So let’s use them and with that turn our back to FaceBook and Google.

Categories
open source social

YouTube or PeerTube, which will it be.

What’s wrong with YouTube

If you want to watch a video chances are you’ll end up on YT. Sure there are alternatives such as Vimeo or Dailymotion but they are tiny compared to YT. Therefore YT has a near-monopoly. As you know monopolies are bad. YT can do whatever they want and users will have to accept it no matter what. Frequently I’ve seen YouTubers ranting in on their YT channel about YT because of some wrongdoing from YT but they have no where else to go (or at least that’s what they think).

YouTube collects our data and sells it. You may think that YT is free but it’s not. Users pay by providing YT with data about their behaviour on YT. This data is turned into profiles about the users and sold to third parties. These third parties can then target you for their ads.

YouTube advertisements are getting increasingly annoying. Alphabet, the holding company, wants to make YT as profitable as possible to satisfy the shareholders. This can either by offering paid premium services or (targeted) ads. Lately I noticed a sharp increase in ads and I’m confident that this will only increase further in the future.

YouTube algorithm wants to keep me on YouTube. Why? So that they sell more ads. The secret of YT is the algorithm that recommends new videos. These recommendations are based on my profile, increasing the chances that I lazily click on another video and another one. This often leaves me with a feeling of pointlessly watching videos while I should have done more productive things.

YouTube algorithm encourages controversy. Controversial videos ensures ensure views and interaction such as likes, dislikes and comments. This in turn means again the opportunity to show more ads which means more income for YT.

What are the alternatives

Vimeo is the only sizeable competitor of YT. It’s business model differs because it doesn’t show ads, instead users can pay for more premium services. Vimeo does track the users however in order to show you ads elsewhere on the web. Also with the users consent Vimeo will sell your data to third parties. Lastly Vimeo is neither open source nor is it a distributed service.

Luckily more ethical alternatives are emerging. PeerTube is one of these alternatives. PeerTube is free and open source software and it’s a decentralized video platform that uses peer to peer technology. Instead of one single organization that controls all the PeerTube servers, all servers are controlled by different owners. Nevertheless PeerTube operates as one where videos on one server can be searched for and watched on another, thus creating a network of interconnected nodes.

Everyone can install PeerTube on a server (instance) and join the network (this is called federation). Already hundreds of instances exist. Every owner or administrator of an instance can determine which other instances it follows.

Everyone can watch videos on PeerTube but if you want to comment or like or upload your own content you must join PeerTube. To join PeerTube it’s important to understand that there is no centralized portal to login. Instead you’ll choose an instance that you want to join, you login and enter the PeerTube network from that instance. This means that choosing the right instance is important. Each instance provides useful information about itself but an overall list can be found here.

PeerTube has another great feature. The PeerTube instances do not only federate with other PeerTube instances, they also federate with a larger network that’s called the Fediverse. Mastodon, a social network, is one of these members of the Fediverse and it has a huge number of users. Videos can easily be shared on Mastodon and Mastodon users can comment on videos with their Mastodon account.

Having read this it’s probably not a surprise to you that I’m currently transferring my content from YouTube to PeerTube and remaster the old videos in the process. I also intend to create original content and share it solely on PeerTube. It’s a drop in the ocean and no one at YouTube will loose any sleep over it but that doesn’t matter. PeerTube is still young (2015) and the developer Framasoft is working hard to improve PeerTube. Already some free and open source companies such as Krita, OpenStreetMap and KDE have a channel on PeerTube.

I do hope that people, that love their privacy and want to control their content, will follow me and start uploading great content to PeerTube for this is the only way to get out of the YouTube stranglehold. To get you started I’ve made a list of some useful links. See you on PeerTube.

Categories
open source social

Create animated GIFs from MP4 with FFmpeg

Animated GIFs are after all these years still pretty popular. FFmpeg is a good FLOSS tool to create these animated GIFs. FFmpeg is available for Windows, Linux and OSX. A word of warning FFmpeg is a command line tool that’s very versatile but it’s not for everybody. In fact suppose this post is more for users that like to tinker a lot with their animated GIFs. Below I will explain not only how to create a animated GIF from an mpeg4 movie but I also provide instructions to improve the quality.

The basic command to create an animated GIF from a mpeg4 is:

ffmpeg -i input.mp4 output.gif

where the name of the input file is input.mp4 and output.gif is the name of the output file. Unfortunately gif images are large due to their lossless data compression. So you’ll end up with a file that’s much bigger than the original mpeg4 and probably something that exceeds the upload limit of Diaspora*, Friendica or Mastodon.

In order to reduce the size of the file we can reduce the size of the images or we can reduce the number of frames per second. To achieve this we need the following command:

ffmpeg -i input.mp4 -r 12 -s 320x180 output.gif

This command reduces the framerate to 12 per second and resizes to 320×180 pixels. For the size of the GIF make sure that the aspect ratio remains the same or the resulting GIF will be distorted.

When we look closely at the resulting GIF we clearly notice some shortcomings in the animation. This is due to the default GIF encoding in FFmpeg. Because GIFs only uses 256 colors the number of colors from the mpeg4 needs to be reduced. FFmpeg by default uses a generic palette of 256 colors that covers the widest range of content. This is in general not optimal for the specific video that you want to convert. Luckily FFmpeg allows us to create a custom palette for our specific video. To create this palette type:

ffmpeg -i input.mp4 -filter_complex "[0:v] palettegen" palette.png

When we look in the folder of our mpeg file well noice that a file ‘palette.png’ has been added. This is our newly created 256 color palette for our specific video which is generated by the palettegen filter. To use the new palette with our mpeg video type:

ffmpeg -i input.mp4 -i palette.png -r 12 -s 320x180 -filter_complex "[0:v][1:v] paletteuse" prettyOutput.gif

FFmpeg needs two input files (streams) in this case test.mp4 and our newly created palette.png. The paletteuse filter takes the two streams as input specified by [0:v] and [1:v] where v stands for video and the preceding number for the number of the stream. The output file is renamed to prettyOutput.gif to differentiate it from the earlier output.gif. The resulting video should be much … prettier. If your resulting video is still too large either reduce the frame rate or resize even further (or just reduce the length of the video of course).

Further reading:
http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
https://engineering.giphy.com/how-to-make-gifs-with-ffmpeg/