9

I've noticed that that it is often useful to gain upvotes to enhance the clarity of an answer/question by including an animated gifs of a relevant film scene. Instead of posting multiple screenshots or YouTube videos, one gif will do the trick nicely, while also saving bandwidth.

However, not all films have been cut into gifs by respective communities; this is especially valid for less popular scenes and films, which are the ones we usually feel the need to ask questions about.

So, given the previous example of asking our titans for guidance, my questions are the following:

  1. Where do you find gifs? Except for Imgur, Giphy, Google search, are there other venues with high quality film scenes?

  2. How do you make gifs? This is even more important, given my second paragraph. So far I've tried cropping films using Kdenlive, extracting images and putting them into a gif (bad idea, takes forever on my machine), or blatantly taking a lot of screenshots and converting them to gif (same technique, but couldn't make it work). Additional gratitude will go to people who post answers that work on Ubuntu :P

9
  • 4
    Motion to only allow answers to this question if they tell us how they pronounce "gif"!
    – user31178
    Feb 25, 2017 at 19:53
  • 3
    Answer to question 2.
    – Rand al'Thor Mod
    Feb 25, 2017 at 19:55
  • @Rand smartarse :P Thanks for edit! Feb 25, 2017 at 19:56
  • @Gallifreyan I'm going to let Valorum answer this one, since I only know about that gif-making software thanks to him.
    – Rand al'Thor Mod
    Feb 25, 2017 at 19:58
  • 1
    Why TF would anyone want to do that?
    – user14111
    Feb 25, 2017 at 20:20
  • Can't you save bandwidth by posting urls?
    – user14111
    Feb 25, 2017 at 20:21
  • @user14111 - true, but there are instances where this is absolutely necessary Feb 25, 2017 at 20:26
  • 1
    Oh hell, please don't encourage that. You can't stop a friggin' GIF.
    – TARS
    Feb 25, 2017 at 20:43
  • 1
    @Paulie_D - the second link looks great (though they appear to have moved to screentogif.com)! You should post it as an answer, or ping Valorum to add it to his. Feb 26, 2017 at 12:26

3 Answers 3

9

I tend to use LICEcap for gif creation. It's freely available and I like the fact that you can easily resize the pane (to fit the video sources) and that it gives you a 3-second "lead-in counter" before starting, which allows you to move your cursor out of the way.

I normally then use Adobe Photoshop to edit the clips down into a manageable size, to crop off any unneeded parts of the frame and to edit out any accidental cursor intrusion. One of the nicer features is that you can simply tell the software to save the gif as 'no more than 2MB', which is the max size you can upload to SE. It'll work out the resolution, etc for you.


I've also not used it personally, but if you're looking to convert a video clip on youtube into a gif, imgur offers a web-based facility to do this.

Since you've mentioned Ubuntu, you might also want to check out "Record screen to animated GIF on Linux (alternative to LICEcap)" on Software-Recommendations:SE

4
  • 2
    Of course, I would never suggest that anyone gets a dodgy copy of Photoshop from Piratebay. Because it's wrong.
    – Valorum
    Feb 26, 2017 at 2:01
  • Thanks! It's good that LICEcap outputs directly to .gif - too bad it doesn't work on Ubuntu. It seems that Photoshop can be replaced with GIMP for this purpose. Feb 26, 2017 at 10:20
  • @Gallifreyan - See edit.
    – Valorum
    Feb 26, 2017 at 10:26
  • Thanks! I found a couple too - writing an answer now. Feb 26, 2017 at 10:32
4

On Windows

For video capture I use ScreenToGif which allows for recording and minor editing before rendering.


For GIF optimisation, I use an online free site EXGif.com which has a variety of optimisation options (size, ratio, quality etc) to bring the file size down to 2MB required for SE.

It also offers other transfer options Video to GIF, Effects etc.


For Browser Capture I use a Chrome Extension, Chrome Capture which can capture both for GIF or single screenshot.

3

For Ubuntu

  1. The command line way

Byzanz is the way to go. Install it using

sudo apt install byzanz

This is supposed to be in Universe repositories on 14.04 and higher - I tested it on 16.04, works fine.

Byzanz is a CLI tool that supports output to gif, flv, ogg/ogv, webm, or a special format called byzanz debug (see below). The downside - you have to specify the area to be recorded yourself - yes, manually enter the coordinates in command line. If you don't specify coordinates, it will simply record the whole screen.

And example command:

byzanz-record -d 35 -x 1005 -y 410 -h 470 -w 700 meta_answer.gif

This breaks down as follows:

-d - the duration of the recording

-x - the left horizontal coordinate (in pixels) of the recorded rectangle

-x - the upper vertical coordinate (in pixels) of the recorded rectangle

-w - width of the recording

-h - height of the recording

As with most software, the man page for Byzanz contains all the commands.

But how do we know the coordinates? I was able to find no ther way than to use another program: xdotool getmouselocation. It is installed by

sudo apt install xdotool

Running xdotool getmouselocation will only get the location at the moment of execution. To get a live location you need to run

watch -n 0.1 xdotool getmouselocation

This will output the current location of the mouse to terminal, refreshed every 0.1 seconds.

  1. The graphical interface way

The recommended tool is gtk-RecordMyDesktop.

sudo apt install gtk-recordmydesktop

Notice that unlike Byzanz, this produces video output, so you will have an intermediate step to convert video to GIF (which is a drag).

But, on the bright side - there is a graphical interface, which lets you choose which portion of the screen you want to record.

The downside is that you get a video file (.ogv, to be specific). To convert it to GIF, you either need to do some command line magik (bad idea, output is 100x times bigger than input), or use online tools, which defeats the purpose of my question.


To edit GIF files, one could use GIMP. I haven't tried it myself, so no comments yet.

2
  • 2
    Wow. This seems wildly and unecessarily complicated. Precisely how Linux users like things.
    – Valorum
    Feb 26, 2017 at 15:59
  • @Valorum actually, most mundane tasks are easier here. E.g., to update 99% of my programs, I only need to run sudo apt update && sudo apt upgrade and enter my password. Nothing else. Installing stuff is easy too, just one simple command. the only thing I find inferior to MS, is the word processors here, but I intend to solve that with LaTeX. But yes, a certain innate degree of masochism is needed to make the initial step towards Light (I mean Linux). Feb 26, 2017 at 16:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .