FLOSS open source social

When to use Friendica over Mastodon

There are many software options to choose from if you want to enter the Fediverse. To name a few, there is of course Mastodon where most people are likely to land on nowadays but there is also Epicyon, Friendica and Pleroma to name just a few. Every option has it’s own unique style, features, pros and cons but in the end they all provide access to the same Fediverse.

I’m a long time user of Mastodon because I like how the web interface enables me to communicate with the Fediverse. The lay-out of the columns with home, notification, local timeline etc always had a certain appeal to me. The last week however, during the first large Twitter migration, I’ve got a bit overwhelmed with too many toots on my home stream not to mention the local timeline. Then my instance Fosstodon had some down time. In these exciting times I was kind of anxious to follow the situation from within the Fediverse. Without access to Mastodon I took refuge to my old Friendica account. I wrote about Friendica in the past but I stopped using it mainly because of the cluttered UI that often confused me.

Entering the Fediverse with Friendica again made me appreciate the Friendica software. First there is just one column or stream instead of three or more in Mastodons web interface. This provides a certain calmness that I was looking for at this moment. Also Friendica provides the option to change the UI by customizing the theme of even by choosing another theme. The combination of these two provides an experience that is currently easier for my eyes and mind.

The Frio theme of Friendica with a dark color scheme which I find easier to the eyes.

Another important difference is that I’m easily able to create groups. When I connect with someone I can add that person to a group that I created e.g friend, acquaintance. I even created groups for companies and bots. Now with just a single mouse click I can change my stream to e.g friends to see what they have to tell today. I use this feature often. I know that Mastodon has a list feature where I can do more or less the same but I somehow never really use it. To take it even further I can create a group with RSS feeds and WordPress blogs. This turns Friendica into a news reader.

Getting back to the cluttered user interface I was talking about. Friendica allows the user to make changes to the user interface. There are a couple of themes to choose from and the themes can be customized in color. Also the layout and the content of the stream can be adjusted. This way I was able to create a style that is easier to digest making Friendica a much better experience than it was for me in the past.

And the list of features in Friendica goes on:

  • Friendica wants you to be able to communicate with every one so besides ActivityPub it supports other protocols such as Diaspora*.
  • It’s easy to access older posts because of the archive option.
  • An event calendar.
  • And a very advanced text editor to create a post that BTW isn’t limited in length. This doesn’t mean that your stream is filled with long ramblings. Just the first few lines of a post will be shown.
  • The ability to create or join a forum. The forum allows people to join a special interest group for discussion etc.
  • A feature to ‘quote share’ a post from someone else. It’s my understanding that this is a much requested feature from Twitter migrants.
  • As an advantage of Friendica I wanted to mention you can have posts with hashtags in your stream and that you can edit a post that has already been published but with version 4.0 this is also possible in Mastodon.

There are also features lacking in Friendica (or I couldn’t find them) that are available in Mastodon. Notably:

  • No option for a content warning in a post you’re creating. This option is heavily used in Mastodon e.g to warn people for a post about a sensitive topic e.g politics. Friendica does respect content warnings from Mastodon though.
  • No option to add a text to an image. Mastodon has this option to include visually impaired people.
  • No option to blur an image. In Mastodon this is a feature similar to a content warning for a text.

It appears to me that Mastodon has more options for inclusion than Friendica like the features mentioned above and deliberate not having the feature of ‘quote sharing’.

I realize that I haven’t even scratched the surface of all the features of Friendica. But I can safely conclude that Friendica is more for power users and for people that want even more control over their stream and don’t want to get overwhelmed with a flood of information such as the local timeline in Mastodon. It lets you fine tune the information even better with easy one click selections of groups. It’s also for people that want to stay in contact with people over different parts of the Fediverse (e.g Mastodon and Diaspora*) and want to be able to keep these contacts manageable in one single stream together with hashtags and RSS feeds.

Friendica local news stream fills the time line with news (in my case mostly German)
A forum on Friendica which allows for special topics to be discussed.

Compress videos with FFmpeg

Reducing the file size of a video (compress) has several advantages. Obviously it reduces the amount of storage needed and although storage seems limitless nowadays a lot of services only allow a limited amount of storage per file or in total. Furthermore for streaming certainly with limited bandwidth a compressed video provides a better experience for the user.

My go to tool for compressing a video is FFmpeg. FFmpeg is the Swiss army knife for video and audio conversion (and much more). I won’t even attempt to describe the possibilities but just take a look at the FFmpeg wiki page to appreciate the possibilities. It’s also worth noting that FFmpeg is free and open source software and that it is available for Linux, OSX and Windows and can be downloaded here. Before I forget, FFmpeg is a command line tool so perhaps it’s not for everyone.

How to use FFmpeg for compression

Getting back to the task of compressing a video. This can be achieved in several ways in FFmpeg. The way that works best for my videos is to use the CRF option. CRF stands for constant rate factor and can be used to compress a video while maintaining a good quality. It is used in combination with the x264 or x265 encoder. A typical command to compress a video looks like this:

ffmpeg -i input.mp4 -vcodec libx264 -crf 24 output.mp4

This command takes the file input.mp4, uses the x264 codec to produce a file output.mp4. The -crf 24 determines the amount of compression where the number 24 can vary from 0-51 where 0 is lossless and 51 is the worst quality possible. I used numbers between 18 and 28 to achieve good quality videos at strongly reduced file size.

To reduce the file size even further we can use the -preset option. A slower preset provides an even better compression. The default value is medium, I also tried slow and veryslow. For the latter the command looks like this:

ffmpeg -i input.mp4 -preset veryslow -vcodec libx264 -crf 24 output.mp4

To conclude this blog post I’ve inserted a table below where I compare the file size of a sample file that I compressed with the methods described above.

methodfilesize (Mb)
crf 2412.4
crf 24, slow11.8
crf 24, very slow11.1

Now remember this is just one video and one may get very different results with a different video (for this also read the link to the CRF guide below) but the trend is clear. To demonstrate the quality of the resulting videos I’ll provide here the original and the most compressed one so that you can compare the difference.

The original sample video
The most compressed video from the table above (-crf 24, veryslow)

Making a clip can save time

Now someone on Mastodon tipped me that instead of compressing the full video one can create a small clip first. This can safe valuable time assessing whether the chosen compression options do achieve the desired result. To do this the options -ss and -t should be used where -ss is the starting time (hh:mm:ss) of the clip and -t the duration of the clip in seconds. Here are two example.

ffmpeg -i input.mp4 -vcodec libx264 -crf 24 -t 10 output.mp4
ffmpeg -i input.mp4 -vcodec libx264 -crf 24 -ss 00:02:30 -t 10 output.mp4

In the first example a ten second clip is created starting from the beginning of the video. In the second example a ten second clip is created starting from 2 minutes and 30 seconds.

Here are useful links for reference and further reading:

H.264 Video Encoding Guide:

CRF Guide:

3D modeling 3d printing FLOSS

Lithophane creator for 3d printing

I wrote an OpenSCAD script to make it easier to create a lithophane for the 3d printer. There are a lot of lithophane models of photos to be found on Printables, a community hub for 3d printing, but none that I could find offered the possibility to easily add your own photo to the model. Luckily OpenSCAD has a Customizer. The Customizer provides an easy to use graphical user interface (GUI) to change an existing model in OpenSCAD. It is therefore not necessary for the user to change the code.

Example of a lithophane created in OpenSCAD

The small OpenSCAD script revolves around the Surface() command. This command reads heightmap information from text or image files. Alpha channel information of the image is ignored and the height for the pixel is determined by converting the color value to grayscale. The invert boolean parameter inverts the color value of the image if set to true. Below is the module that handles the Surface() command and determines the thickness of the model.

module place_image(img,th,inv) {
        //import the image and scale it to the desired height and width and adjust the thickness.
        scale([1, 1, th])
        surface(file = img, invert = inv, convexity=3, center=true);

The script, example photos and an example stl file can be found on Printables here:

The lithophane model can be created in five steps described below.

  1. Download OpenSCAD. For this your need the free and open source program OpenSCAD which is available for OSX, Windows and Linux. Start OpenSCAD and load the .scad file available here together with the sample negatives photos below. Easiest is to have the .scad file and the negatives in the same folder or map. Now use the Customizer to create you .stl file. 
  2. Make a negative of your photo. If you start with a jpg file you need to convert it to a png file first. Before loading your png file into OpenSCAD you need to make a negative of the photo first. There are many ways to do this but I use Imagemagick, a command line tool for Linux, Windows, Mac OSX, and others. To create a negative file type: convert -negate foo.png inverted_foo.png on the command line.  To create a negative png file and reduce it 20 percent type: convert -negate -resize 20% foo.jpeg inverted_foo.png. (If you rather use a GUI instead of the command line you can also use GIMP, yet another free and open source program. Download GIMP for OSX, Windows or Linux. Open the original photo. Next select Colors and then Invert in the menu.)
  3. Use the Customizer. The Customizer has the option to change the background. This is important to select. If the background of your original photo is mostly white or lightly coloured choose ‘light’. If it’s mostly dark choose ‘dark’. In addition enter the height and width in pixels of your photo.
  4. Render and save the .stl file. To create an .stl press F6 or select Design/Render in the menu. It’s important to know that rendering takes longer when the image is larger. I found that a a 200×200 pixels photo takes a few minutes to render. Since the resolution of the 3d printer is limited it’s probably needless to go beyond 40.000 pixels.
  5. Slice and print. Make sure that the photo is placed in the upright position as shown in one of my photos on Printables (see link above).

The script in this blog post provides a flat model of a photo. If you want to have a curved model take a look at this blog post of mine: