Categories
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.
Categories
FLOSS PC

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)
original16.8
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: http://trac.ffmpeg.org/wiki/Encode/H.264

CRF Guide: https://slhck.info/video/2017/02/24/crf-guide.html

Categories
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: https://www.printables.com/model/293702-lithophane-creator.

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: https://homehack.nl/a-curved-3d-printed-lithophane-in-openscad/

Categories
open source social

To improve Funkwhale

I’ve been following Funkwhale for a while now and have written earlier about the project. Before I start I want to make clear that I love Funkwhale and I’m thankful to the developers and other contributors that have made it awesome. Lately however it has become obvious to me that the project could get more traction if the social interaction between users would be improved. Currently a user can do little to interact with an artist or other users. Also the interface can be confusing for people that are new to Funkwhale. It’s therefore that I’ve come up with some tips for the developers to tweak Funkwhale to provide the user a better experience.

But first what is Funkwhale. If you already know you can skip this paragraph and the next. Funkwhale lets you listen and share music and audio within a decentralized, open network. So you can upload your music library and share it with friends and family. Music from the public domain or with a Creative Commons license can be shared with all Funkwhale users. Funkwhale currently consists of 53 known servers (called pods in Funkwhale) which can communicate together using standard, free and open source technology. Funkwhale uses the ActivityPub protocol that is often used in the Fediverse, an ensemble of federated servers.

Funkwhale is both for people that create music or podcast and people that just like to listen to it. You can join an existing pod or create your own pod. The last option provides the most control over your music or podcasts. Other than Soundcloud or Bandcamp, Funkwhale is not owned by a central organization. Instead it’s a federation of pods from different owners that share music and podcasts.

Currently the user can explore and listen to music that is uploaded by others. Basic functions like adding to favourites, adding to a playlist or downloading are in place but discoverability and social functions are either non-existing or poorly implemented.

Discoverability. I would love to see a Trending tab in the Explore section. This Trending tab could contain a list of songs that are favoured the most e.g in the last month and a list of songs that are listened to the most in that same period.

Social interaction. Furthermore it would be nice to be able to see number of ‘streams’ per song or the number of times a song is favoured. Maybe further down the line could be the ability to comment on a song although I’m aware of the moderation problems that may cause.

Interface. The interface of Funkwhale is confusing at first. It took me a while to make sense of it with terms like channels, libraries, playlists and radios. Sure they all sound familiar but the intricacies were lost to me in the beginning. I wish I had read the user manual of Funkwhale sooner but I suppose many users just don’t read manuals. Anyway channels are a collection of audio files published directly on Funkwhale. While libraries are used to store collections of music such as your personal music collection or a collection of publicly available music. So a channel would be more for an artist to publish his or her own creations while libraries is for uploading work from others. Playlist have more or less the same function that they have on other music services. A user can create one, add or delete selected songs etc to a queue. Radios on the other hand enable the user to create a queue of music by a range of user defined parameters called filters (a pretty cool feature if you ask me). In addition the interface of Funkwhale has a great number of inconsistencies. To name just one when I open the queue I’m unable to favourite or get more information about any queued song. To conclude this part, the interface of Funkwhale offers a lot of great options but needs to be made more consistent and simplified for the user.

Funkwhale has so much potential and it’s, as far as I know, the only software out there that allows musicians and music listeners to share music and socially interact at the same time in a network without the burden of a centralized network where one organization tells you what you can and cannot do. The Funkwhale project is young and in its infancy so I’m convinced that it will improve over time and that the issues that I mentioned will be addressed. In the mean time I’ll enjoy using Funkwhale when listening to my own library of music, explore what music other have uploaded or just listen to my favourite podcast.

Some useful links for Funkwhale:

Categories
Linux open source PC

Peeling the onion

About five years ago I got interested in free and open source software (FLOSS) and online privacy in general. The problem was that almost all software that I used at that time was proprietary. I had an iMac with OSX and besides that I worked a lot with Google apps (Gmail, Blogger and Google Docs most notably). From that point it felt as pretty daunting task to switch completely to FLOSS. Where to start? Just installing Linux on my iMac seemed far to large a step. How to migrate all my documents and learn to work with a OS and all these apps that were new to me. Instead I decided a to gradually replace my apps with FLOSS alternatives until I finally reached a point where I could easily replace the OSX operating system with Linux.

I started with the low hanging fruit and the lowest hanging of them all is the web browser. So Chrome was replaced by Firefox. Next was the mail client so I replaced Mail with Thunderbird. At that time I started to work with graphical applications so I chose Inkscape, GIMP and for my 3D CAD work Solvespace, FreeCAD and OpenSCAD. I installed these apps on my iMac still running OSX and took my time to get familiar with them.

For my simple video editing tasks I kept lazily working with iMovie for a long time. I tried OpenShot but it kept crashing but after I while I discovered Shotcut which I found a better replacement. More recently I discovered Avidemux which is simple and works on lightweight systems. Next was Darktable instead of Photos to organize the thousands of photos that I have.

To replace Google proved to be even more difficult. Google is everywhere. The easiest one is Google Search. I first replaced it with DuckDuckGo. DDG is not FLOSS but at least it’s not Google. Currently I’m experimenting with MetaGer which is free and open source software. Google Maps was replaced by Openstreetmap and to upload my content I exchanged YouTube for PeerTube. This was all pretty simple. Next was Google Drive and this proved to be more difficult. I figured the best was to replace Google Drive with NextCloud. But instead of having someone else running NextCloud for me I found it appealing to have my own server. But I don’t know anything about installing and maintaining a server. Then someone mentioned Yunohost to me. Yunohost is an operating system that allows an idiot like me to setup and manage a server in a very simple way. Installing it went flawless and installing NextCloud on top of Yunohost encompassed little more than a few mouse clicks. After this I could say bye bye to Google Docs.

In the mean time I felt confident enough to replace OSX with Linux. With all the preparation that I had done it was an almost painless transition. I downloaded a Linux distro, put on a USB drive and installed it on a PC (not the iMac). Next I could install all the FLOSS apps that I was already familiar with and I was up and running in no time.

I’d like to call this method Peeling the Onion. Where the onion is the problem. Remove the outer most peel first and working my way to the inside. I work pretty much exclusively with FLOSS now and I couldn’t be happier with the result. I feel more in control of the software and and my data which is a very satisfying experience. Yes, some of the software is little bit rough around the edges and not as smooth as some of the proprietary software I was used to but I feel that I’m at the helm of my PC without a giant cooperation driving me into a direction that I don’t want.

Categories
open source

Your music library and MusicBrainz Picard

With all the steaming services available why have your own digital music library? The reason for this is two-fold. First streaming services like Spotify or Deezer have a constant changing library of music as a consequence of the agreements that they make with rights holders. This means that music in your playlist can suddenly disappear (or being greyed out) or, what happened to me, explicit songs are being replaced by clean ones. The latter can cripple them to a point that they aren’t listenable any more. What the examples demonstrate is that eventually you have limited control over the music of these services. Secondly the service itself can change e.g the app that you’re relying on disappears as happens with the Spotify app on my Squeezebox network music player.

Alternatively you can build your own digital music library e.g from your CD collection. This is called ripping and is done with software such as the free and open source Asunder. Asunder creates nice digital music files in the audio coding format that you desire. It can even add metadata to the file by checking an external music database. The process of adding or changing metadata is called tagging. The result of this process is often incomplete and results to gaps in the music collection. This is where MusicBrainz Picard comes in. It’s a tag editor that can fill all these gaps and it’s pretty good at it.

To work with MusicBrainz Picard open a music file, a folder with music files or even multiple folders with music files. MusicBrainz either gets the missing metadata by comparing it with it’s own. If that fails MusicBrainz Picard can get the correct metadata with acoustic fingerprinting. This compares part of a song with their huge online database of MusicBrainz to find the right song and add the correct metadata. After everything is done just save the info to the music files and your done.

Another powerful option of Picard is to organize your all your digital music file. To do this just select all the music and drag it into Picard. This video https://yewtu.be/watch?v=02fWYIur42g demonstrates just how powerful this option is (alternatively you can also watch the video here: https://www.youtube.com/watch?v=02fWYIur42g).

MusicBrainz Picard and the MusicBrainz database are projects of the MetaBrainz Foundation. MetaBrainz Foundation has a philosophy of free, open access of data. It has been set up to build community maintained databases and make them available in the public domain or under Creative Commons licenses. Most contributions come from volunteers so users are encouraged either to donate or contribute to the data gathering process.

Categories
3D modeling 3d printing open source programming

OpenSCAD parametric hook

Writing a script for a simple hook in OpenSCAD is easy but I wanted to do something more and make a parametric hook. With parametric I mean that a user can easily adjust the script by changing some variables to make your own hook.

To make it even easier the script makes use of the Customizer of OpenSCAD. This means that users don’t have to tinker with the code but can adjust the values of the variables with a easy to use panel on the right side of the GUI of OpenSCAD called the Customizer. (If you don’t see the Customizer in OpenSCAD go to the menu bar and click on Windows and then Customizer).

Screenshot of the script with the Customizer on the right side.
Smaller hook with chamfer
Larger hook with fillet

Aside from changing the dimensions I also added the possibility to add a fillet or a chamfer to the hook. And I added the option to change the radius of the hook and the diameter of the screw holes.

If you’re interested here is an explanation of some parts of the code. The fillet of the cube shaped parts of the hook is created with the fillet module. Within this module I simply intersect a cylinder with radius r1 and a cube of the desired length l.

module fillet(l,r1) {
    intersection() {
        cube([l,l,l]);
        cylinder(h=l, r=r1, $fn=50);
    }
}

In the module roundedCube the thus created fillet pieces are positioned in a such a way that the hull command shapes them to the desired filleted cube.

module roundedCube(l,w,h,r1) {
    d = 2 * r1;
    translate([r1,r1,0])
    hull() {
        rotate([0,0,180]) fillet(l,r1);
        translate([0,w-d,0]) rotate([0,0,90]) fillet(l,r1);
        translate([h-d,0,0]) rotate([0,0,270]) fillet(l,r1);
        translate([h-d,w-d,0]) rotate([0,0,0]) fillet(l,r1);
    }
}

I published the OpenSCAD script (.scad) and some example hooks (.stl) on Prusaprinters. You can download it here:

https://www.printables.com/model/91734-parametric-hook-with-source-file

EDIT: V1.1 of the OpenSCAD file (.scad) has the option to add a countersunk to the screw holes.

Categories
3D modeling 3d printing open source

Solvespace: involute gear

We first need to create a involute of a circle in Solvespace to get a better understanding of an involute gear. This video will be followed by another where we create an involute gear and a third where we adjust the gear in Solvespace.

I’ve used version 2.3 in this video but v3.0 should work fine too for this tutorial. This is a series in progress. I will at least make one more video to demonstrate how one gear drives another in Solvespace.

First video tutorial: Involute of a Circle in Solvespace. Before creating an involute gear we first need to understand how to create an involute of a circle.

Second video tutorial: To create an involute gear we only need three parameters, the module which determines the length of the teeth, the number of teeth and the pressure angle. With these parameters we can determine the Pitch Circle, Addendum Circle or Top Circle, Dedendum Circle or Root Circle and the Base Circle. With these circles and the pressure angle the shape of the teeth can easily be created in Solvespace.

Third video tutorial: This is the third video in a series about creating an involute gear in Solvespace. If we want to adjust the module, number of teeth or pressure angle of an existing gear in Solvespace we don’t have to start from scratch. We can take an existing gear and change one of the three parameters. This will save us a lot of time. However this change must be done following a procedure that I’ll demonstrate. Other wise Solvespace will give us the error message ‘unsolved constraint’.

Solvespace is an open source, parametric, 3D CAD program that is lightweight and easy to use. It is available for GNU/Linux, OSX and Windows. In Solvespace the user applies geometrical constraints to a sketch and the program’s solver calculates the result (comparable to the FreeCAD part design workbench).

Solvespace is open source (GPLv3 license) and is available for Window, OSX and Linux. Originally developed by Jonathan Westhues and currently maintained by Paul Kahler and others. It can be downloaded here: http://solvespace.com/download.pl

The idea for this video comes from the JustThinkering channel on YT who made a video Involute Gears in Solvespace (https://www.youtube.com/watch?v=i6tDWJsNsok).

Categories
Linux open source PC

Linux on a 17 year old laptop

My laptop is a Thinkpad T40 from 2003 with 1GB of RAM and a 30GB HDD (Yes, you can laugh now). I bought it second hand many years ago, it had Windows installed and it was slow as molasses. It was also a time that I got interested in FLOSS. So I looked for a suitable Linux distro and I found Puppy Linux (Slacko and later the TahrPup release). It turned my unusable laptop into a fast and very capable computer. I’ll never forget the amazement when I booted Puppy for the first time and saw how fast it was.

I’m not much of a distro hopper but last year I switched to AntiX because I felt that development of Puppy had slowed down. AntiX does more or less the same as Puppy in that it brings life to an old computer. Both are very lightweight but at this moment I find AntiX definitely more polished with JWM, FluxBox and IceWM as window managers to choose from.

Both Puppy and AntiX contain, as do most of the other Linux Distros, proprietary bits and pieces (e.g drivers and it’s possible to install proprietary programs from the Snap store or PPM) but are mostly FLOSS and are available thanks to many volunteers that dedicate so much of their time to these operating systems. So I think it’s fair to contribute back e.g by donating to the developers that make this possible.

Link to the Antix website.

Link to the Puppy Linux website.

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/