use

seen from Malaysia
seen from China
seen from France
seen from Argentina
seen from France
seen from United States

seen from Singapore

seen from Germany

seen from United States
seen from France
seen from United States
seen from South Africa

seen from Brazil
seen from Colombia
seen from United States

seen from Australia
seen from China

seen from United States
seen from Germany

seen from United States
use
TOOL TUTORIAL 4
Screencapping Frames with FFmpeg
FRAME BY FRAME SCREENCAPPING METHODS
Tool type: Command Line tool
Operating systems: Mac, Windows, and Linux
Difficulty: Even if it's your first ever time opening your command line and trying to type anything, I think you can do this! I believe in you! :D
Input: Video files (any video file format).
This tutorial is largely based on instructions provided by u/ChemicalOle as part of their GIMP GIFS 101 tutorial for r/HighQualityGifs.
____________________________________
WINDOWS USERS: CHANGE ALL FORWARD SLASHES IN THIS SCRIPT TO BACK SLASHES!!!
____________________________________
Tutorials I've made so far have covered gif-making methods where video footage is transformed straight to .gif and there is no need to screencap frames. When making gifs in Photoshop (and if you want to make gifs using GIMP) rather than input video straight into the program, you often load a stack of screencaps into the program—one screencap representing every frame. After all, gifs are nothing more than a series of images all stacked together playing one by one in a loop. So lets learn a super faster automated way of screencapping every frame in a video clip automatically. Even if you've never opened your OS's command line interface in your life, I think you can do this!
1. Install FFmpeg
I recommend you install FFmpeg via Homebrew if you're on Mac or Linux by pasting this into your terminal (if/once Homebrew is installed):
brew install ffmpeg
Windows users or other users who don't want Homebrew can follow install instructions on the FFmpeg website.
2. Make a Folder
Make a folder on your desktop called FRAMES and place your video source file in that folder.
I’m going to rename my source video video.mp4 for this tutorial, but you can also just change “video.mp4” to the name of the file in the script below—this includes changing the video file extension in the script below as needed. I don’t think there’s a video file type FFmpeg cannot work with.
3. Determine when the moment you want to gif begins and ends
I’m going to gif a short moment from Season 1 Episode 7 of Supernatural as an example.
According to my video player (I'm using IINA) the exchange I want to gif starts at 8:02.565 and ends at 08:10.156. While you can trim precisely by the millisecond, I’m going to assume your video player doesn’t show milliseconds since many don't.
I'm going to keep the start of my clip at 08:02 but round up the end timestamp 1 second to make sure I get all the milliseconds in that second I want to include. In my case: I need to start capturing at precisely 8.02 and end capturing at 08.11, which is 9 seconds later.
4. Use this script template
You want to use the following template script u/ChemicalOle provided (replacing each # with a number you need):
cd YourFilePathGoesHere ffmpeg -i video.mp4 -r ## -t # -ss ##:## -f image2 frame_%4d.png
video.mp4 is where your video file name goes (including changing the video extension if you need to to .mkv, .mpg, .mov, etc).
-ss ##:## specifies when to start capturing. (I need to put 08:02 here)
-t # specifies how many seconds to spend capturing. (I need to put 9 here)
-r ## tells FFmpeg how many times to capture a .png every second (i.e. the frames per second or FPS). u/ChemicalOle recommends you set this at 30 for a 30 FPS capture.
-f image2 frame_%4d.png tells FFmpeg to output .png images with the name frame_0001.png, frame_0002.png, frame_0003.png, etc.
In my case, my script will look like this:
cd ~/Desktop/FRAMES ffmpeg -i video.mp4 -r 30 -t 9 -ss 08:02 -f image2 frame_%4d.png
The top line starting with cd just tells my terminal to change directories to where my video file is located, and where to dump the frames to be generated (in the FRAMES folder with my video file). (Windows users: change forward slashes to back slashes and that cd command will move you to your FRAMES folder too).
When you input this command into your system shell (Terminal on Mac, Powershell on Windows) and press enter, you you might feel like it’s stalling at first or not working because
"Press [q] to stop, [?] for help"
Will be printed on the screen. It is working though! Just leave it alone for minute and it'll start working. When the cursor prompt reappears, there will be a bunch of PNGs in your FRAMES folder, organized in sequence by number.
TOOL TUTORIAL 2
Gifski
GIF GENERATION AND OPTIMIZATION
Tool Type: GUI or Command line tool (there are two versions)
Difficulty: Easy (GUI); Moderate (CLI)
Operating systems: Mac, Windows, and Linux (CLI only—no GUI)
Input(s): Video files (MP4)
How much of a difference can you tell between these two gifs?
Both seem to give good results, but to me, in the top row, the one on the left looks better, but in the bottom, row, the one on the right looks better.
Gifs in the left hand column are converted and compressed to 500 px using the ffmpeg command from Tutorial 1; in the right column, using Gifski.
Gifski GUI Version (Mac and Windows)
NOTE: Gifski is solely for converting MP4 clips to optimized gifs. If you need to caption or color, you have to do that externally.
Installation
The GUI version of Gifski is available in the Apple App store, but links to it and the Windows downloader can be found through the official site.
Using the GUI
After opening your MP4 file, in the bottom left corner, you can see the estimated size of your resulting gif. This estimate will auto-update as you adjust your compression settings. Remember: To upload your gif on Tumblr, it needs to be about 10MB or less. If it's already 10MB, just go ahead and click convert! If not (which is more than likely):
Adjust FPS to 18. I find this frame rate to be a good balance of compression and retained quality.
Decrease the dimensions of your gif as needed. Whether you use the drop down box or the dialogue boxes, Gifski will automatically scale to retain your gif's screen ratio rather than stretch it to fit, so you don't need to worry about keeping your gif proportional.
You can finely adjust the settings until your gif is exactly 10 MB if you want to keep the best quality, or just aim for a ballpark.
Cick "Covert" then save the resulting gif. Do this for all your .mp4 clips and then boom. You're done.
Gifski Command Line Version (Linux, Mac, Windows)
There is a command line version of Gifski just like there's a command line version of ffmpeg. While the GUI version isn't available for Linux, the command line version is also available for Linux.
Installation
This must be installed separately from the GUI version, via your system shell (Powershell on Windows, Terminal on MacOS). I recommend you install via Homebrew if you're on Mac or Linux by pasting this into your terminal (if/once Homebrew is installed):
brew install gifski
Windows users or other users who don't want Homebrew can follow directions on the Gifski website.
Converting one video file to GIF
This simple command will convert one .mp4 file to .gif (parts in red can be adjusted, parts in blue should be changed):
cd FilePathToYourMP4 gifski --fps 18 --width 500 --quality 100 -o output.gif input.mp4
Where input.mp4 is the name of the MP4 clip you want to make into an optimized gif and output.gif is the desired name of your gif on output.
How to adjust the options in the script:
Change the number frames per second (fps). Go to fps=18 and change “18” up or down.
Scale the gif up or down. Go to width 500 and change “500” up or down to scale the gif up and down by its pixel width.
Change the quality. Go to quality 100 and change “100” to any value between 0 and 100, where 100 is the highest quality.
Converting a folder of video files to GIF
Place all of your video clips into a folder called gifset1. Put an empty subfolder inside the gifset1 folder called gifs. Go to your system shell and copy and paste the following indented text:
Linux and Mac:
cd ~/Desktop/gifset1 for i in .mp4; do gifski --fps 18 --width 500 --quality 100 -o gifs/${i%.}.gif "$i"; done
Windows:
cd ~\Desktop\gifset1 for i in .mp4; do gifski --fps 18 --width 500 --quality 100 -o gifs\${i%.}.gif "$i"; done
Once the process is finished running (your shell prompt will reappear allowing you to type in commands again) if you go to to the gifs subfolder in your gifset1 folder, you will find an optimized gif of every video file has been rendered.
TOOL TUTORIAL 7
The Best of Both Worlds: FFmpeg Sharpening + Gifski Compression
I don't think I've shared the script I am now consistently using to turn my DaVinci Resolve clips into GIFs.
I am now using FFmpeg and Gifski scripts in combination. For the best balance of sharpness and compression.
After pointing my terminal/shell (Terminal on Mac and Linux, Powershell on Windows) to the folder where all my clips are, I paste these two commands into the shell/terminal,
for i in .mp4; do ffmpeg -y -i "$i" -filter_complex "smartblur=1.5:-1,unsharp=la=1.5" sharp_${i%.mp4}.mp4; done for i in sharp_; do gifski --fps 22 --width 540 --quality 100 -o ${i%.*}.gif "$i"; done
You can past them in at the same time or paste in one then the other.
The first script makes new copies of your clips and sharpens them, giving them the prefix "sharp_". The second script compresses those sharpened clips into GIFs.
In the second script, the numbers to the right of the fps, width, and quality flags can be adjusted to compress GIFs further or scale them down. (540 is the appropriate width for a single column set).
TOOL TUTORIAL 3
FFmpeg | Script 2
GIF GENERATION AND OPTIMIZATION
Tool type: Command Line tool
Operating systems: Mac, Windows, and Linux
Difficulty: Moderate to Advanced
Input: Video files (any video file format).
Installation
I recommend you install via Homebrew if you're on Mac or Linux by pasting this into your terminal (if/once Homebrew is installed):
brew install ffmpeg
Windows users or other users who don't want Homebrew can follow directions on the FFMPEG website.
Converting one video file to GIF
In your system shell (Powershell on Windows, Terminal on Mac) change directories to the location containing your MP4 file (or whatever video file type you have—just replace .mp4 in the script with .mkv or whatever extension you have). Use this command:
cd FilePathToYourMP4 fmpeg -y -i input.mp4 -filter_complex "fps=18,smartblur=ls=-0.25,scale=540:-1:flags=lanczos,split[s0][s1];[s0]palettegen=max_colors=256[p];[s1][p]paletteuse=dither=bayer:bayer_scale=2" output.gif
Explaining and altering the script
The script does the following to your the clip you want to turn into a GIF, input.mp4:
Generate a gif with 18 frames per second (fps=18 controls frames per second. Change the number to changes the FPS).
Sharpen each frame (smartblur=ls=-0.25 controls sharpening. Negative values between -1 and 0 sharpen the image).
Scale every frame in the gif down to a 500 pixels using the lanczos technique. (scale=540 controls scale. Change 540 to different numbers to scale up and down)
Generate dither called bayer to overlay on your gif as a filter (split[s0][s1];[s0]palettegen=max_colors=256[p];[s1][p]paletteuse=dither=bayer:bayer_scale=2) Change 256 to a lower number to reduce the maximum number of colors for further compression. Increase bayer scale from 2 to 3 for a finer dither, or lower to 1 for a bigger dither.
Generates and saves the resulting gif under the name output.gif.
NOTE: Video files inputs don't have to be .mp4. You can use .mkv, .mov, or any other video type.
Converting a folder of video files to GIF
Place all of your video clips into a folder called gifset1. Put an empty subfolder inside the gifset1 folder called gifs. Go to your system shell and copy and paste the following indented text:
Mac and Linux users:
cd ~/Desktop/gifset1 for i in .mp4; do ffmpeg -y -i "$i" -filter_complex "fps=18,smartblur=ls=-0.25,scale=540:-1:flags=lanczos,split[s0][s1];[s0]palettegen=max_colors=256[p];[s1][p]paletteuse=dither=bayer:bayer_scale=2" gifs/${i%.}.gif; done
Windows users:
cd ~\Desktop\gifset1 for i in .mp4; do ffmpeg -y -i "$i" -filter_complex "fps=18,smartblur=ls=-0.25,scale=540:-1:flags=lanczos,split[s0][s1];[s0]palettegen=max_colors=256[p];[s1][p]paletteuse=dither=bayer:bayer_scale=2" gifs\${i%.}.gif; done
Once the process is finished running (your shell prompt will reappear allowing you to type in commands again) if you go to to the gifs subfolder in your gifset1 folder, you will find an optimized gif of every video file has been rendered.
TOOL TUTORIAL #1
FFmpeg | Script 1
GIF GENERATION AND OPTIMIZATION
Tool type: Command Line tool
Operating systems: Mac, Windows, and Linux
Difficulty: Moderate to Advanced
Input: Video files (any video file format).
Installation
I recommend you install via Homebrew if you're on Mac or Linux by pasting this into your terminal (if/once Homebrew is installed):
brew install ffmpeg
Windows users or other users who don't want Homebrew can follow directions on the FFMPEG website.
Converting one video file to GIF
In your system shell (Powershell on Windows, Terminal on Mac) change directories to the location containing your MP4 file (or whatever video file type you have—just replace .mp4 in the script with .mkv or whatever extension you have). Use this command:
cd FilePathToYourMP4 ffmpeg -y -i input.mp4 -filter_complex "fps=18,smartblur=ls=-0.25,scale=540:-1:flags=lanczos,split [a][b];[a] palettegen=stats_mode=single [p];[b][p] paletteuse=new=1" output.gif
Explaining and altering the script
The script does the following to your the clip you want to turn into a GIF, input.mp4:
Generate a gif with 20 frames per second (fps=18 controls frames per second. Change the number to changes the FPS).
Sharpen each frame (smartblur=ls=-0.25 controls sharpening. Negative values between -1 and 0 sharpen the image).
Scale every frame in the gif down to a 500 pixels using the lanczos technique. (scale=540 controls scale. Change 500 to different numbers to scale up and down)
Generate a custom color pallet for every frame and overlay it on your gif as a filter (split [a][b];[a] palettegen=stats_mode=single [p];[b][p] paletteuse=new=1)
Generates and saves the resulting gif under the name output.gif.
NOTE: Video files inputs don't have to be .mp4. You can use .mkv, .mov, or any other video type.
Converting a folder of video files to GIF
Place all of your video clips into a folder called gifset1. Put an empty subfolder inside the gifset1 folder called gifs. Go to your system shell and copy and paste the following indented text:
Mac and Linux users:
cd ~/desktop/gifset1 for i in *.mp4; do ffmpeg -y -i "$i" -filter_complex "fps=18,smartblur=ls=-0.25,scale=540:-1:flags=lanczos,split [a][b];[a] palettegen=stats_mode=single [p];[b][p] paletteuse=new=1" gifs/${i%.*}.gif; done
Windows users:
cd ~desktop\gifset1 for i in *.mp4; do ffmpeg -y -i "$i" -filter_complex "fps=18,smartblur=ls=-0.25,scale=540:-1:flags=lanczos,split [a][b];[a] palettegen=stats_mode=single [p];[b][p] paletteuse=new=1" gifs\${i%.*}.gif; done
Once the process is finished running (your shell prompt will reappear allowing you to type in commands again) if you go to to the gifs subfolder in your gifset1 folder, you will find an optimized gif of every video file has been rendered.
Does this script run slowly for you?
The Palletegen function of this script may take a long time to run on certain computers. There is a faster script here you can try for very similar results.