Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchiTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
To make a compact, good-looking GIF on a Mac, use FFmpeg’s palettegen and paletteuse filters: trim the video to the action you need, choose a frame rate and width, generate a palette from those frames, and encode the GIF with that palette. The examples below use a three-second excerpt beginning at five seconds; adjust those values and the output dimensions for your clip and destination.
Install FFmpeg on macOS
If FFmpeg is not already installed, Homebrew documents this installation command:
brew install ffmpeg
ffmpeg -version
The first command installs FFmpeg; the second confirms that the command is available and prints its version. Homebrew’s formula and supported macOS bottles can change, so check the FFmpeg formula if compatibility or package details matter.
Convert a video excerpt with a two-pass palette workflow
In Terminal, move to the folder containing your video or use its full file path. These commands start at five seconds, process three seconds, output at 12 frames per second, and scale the image to 480 pixels wide:
#1 Best Overall
- SUPERCHARGED BY M5 — The 14-inch MacBook Pro with M5 brings next-generation speed and powerful on-device AI to personal, professional, and creative tasks. Featuring all-day battery life and a breathtaking Liquid Retina XDR display with up to 1600 nits peak brightness, it’s pro in every way.*
- HAPPILY EVER FASTER — Along with its faster CPU and unified memory, M5 features a more powerful GPU with a Neural Accelerator built into each core, delivering faster AI performance. So you can blaze through demanding workloads at mind-bending speeds.
- BUILT FOR APPLE INTELLIGENCE — Apple Intelligence is the personal intelligence system that helps you write, express yourself, and get things done effortlessly. With groundbreaking privacy protections, it gives you peace of mind that no one else can access your data — not even Apple.*
- ALL-DAY BATTERY LIFE — MacBook Pro delivers the same exceptional performance whether it’s running on battery or plugged in.
- APPS FLY WITH APPLE SILICON — All your favorites, including Microsoft 365 and Adobe Creative Cloud, run lightning fast in macOS.*
ffmpeg -ss 5 -t 3 -i input.mp4
-vf "fps=12,scale=480:-1:flags=lanczos,palettegen"
palette.png
ffmpeg -ss 5 -t 3 -i input.mp4 -i palette.png
-lavfi "fps=12,scale=480:-1:flags=lanczos[x];[x][1:v]paletteuse"
-loop 0 output.gif
- Replace
input.mp4. Use your video’s filename or a path to it. Changeoutput.gifif you want a different output name. - Generate the palette. The first command selects the excerpt, applies the chosen frame rate and scale, then writes a video-specific palette to
palette.png. - Encode the GIF with that palette. The second command selects and scales the same excerpt in the same way, then applies the palette and writes the GIF.
- Inspect the result. Open
output.gifand check its size, motion, dimensions, and color appearance. There is no single setting that optimizes all of these for every clip.
Keep the excerpt, frame rate, and scale consistent in both commands. Otherwise, the generated palette may not represent the frames used in the final GIF. FFmpeg documents palettegen and paletteuse in its filter reference.
Adjust the GIF’s size and appearance
Duration, frame rate, and dimensions are the main practical controls for output size. Change one or more, then inspect the result rather than assuming a particular size or quality improvement.
Rank #2
- FAST RUNS IN THE FAMILY — The 16-inch MacBook Pro with the M5 Pro or M5 Max chip brings next-generation speed and powerful on-device AI to personal, professional, and creative tasks. With all-day battery life, double the starting storage,* and a breathtaking Liquid Retina XDR display, it’s pro in every way.*
- BUCKLE UP — Along with a next-generation CPU, faster unified memory, and up to 2x faster SSD storage,* M5 Pro and M5 Max feature a more powerful GPU with a Neural Accelerator built into each core, delivering faster AI performance and on-device training capabilities. So you can blaze through demanding workloads at mind-bending speeds.
- BUILT FOR AI — Apple silicon, and every major component that powers it, is designed to run demanding on-device AI workloads like LLM inference and training. And Apple Intelligence helps you write, express yourself, and get things done effortlessly with groundbreaking privacy protections at every step.*
- ALL-DAY BATTERY LIFE — MacBook Pro delivers the same exceptional performance whether it’s running on battery or plugged in.*
- MACOS RUNS APPS FAST — All your go-to apps run lightning fast in macOS, including built-in apps like FaceTime and Messages. Plus, built-in virus protection and free software updates help keep your Mac running smoothly and securely.
- Trim duration: Keep only the action the GIF needs to show. A shorter clip has fewer frames to encode and generally produces a smaller file.
- Lower the frame rate: Fewer frames can reduce file size, but motion may look choppier. Choose the lowest rate that still communicates the action.
- Reduce the width: In
scale=480:-1,480sets the output width in pixels and-1asks FFmpeg to calculate a proportional height. Smaller dimensions usually mean less image data, but can make details harder to see.
For example, to try a lower frame rate and smaller width, use fps=8,scale=320:-1:flags=lanczos in both commands’ filter expressions. This is an adjustable example, not a universal recommendation; compare the resulting GIF’s file size and appearance with your original settings.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Palette generation and dithering
A GIF uses a limited color palette. palettegen builds one from the video frames rather than relying on a generic fixed palette, which can improve how those frames map to GIF colors. FFmpeg’s documented max_colors option can limit color detail. The palette image is 256 pixels; entries not used are black.
Rank #3
- FAST RUNS IN THE FAMILY — The 16-inch MacBook Pro with the M5 Pro or M5 Max chip brings next-generation speed and powerful on-device AI to personal, professional, and creative tasks. With all-day battery life, double the starting storage,* and a breathtaking Liquid Retina XDR display, it’s pro in every way.*
- BUCKLE UP — Along with a next-generation CPU, faster unified memory, and up to 2x faster SSD storage,* M5 Pro and M5 Max feature a more powerful GPU with a Neural Accelerator built into each core, delivering faster AI performance and on-device training capabilities. So you can blaze through demanding workloads at mind-bending speeds.
- BUILT FOR AI — Apple silicon, and every major component that powers it, is designed to run demanding on-device AI workloads like LLM inference and training. And Apple Intelligence helps you write, express yourself, and get things done effortlessly with groundbreaking privacy protections at every step.*
- ALL-DAY BATTERY LIFE — MacBook Pro delivers the same exceptional performance whether it’s running on battery or plugged in.*
- MACOS RUNS APPS FAST — All your go-to apps run lightning fast in macOS, including built-in apps like FaceTime and Messages. Plus, built-in virus protection and free software updates help keep your Mac running smoothly and securely.
paletteuse supports several dithering methods, including Bayer, Floyd–Steinberg, Sierra, Atkinson, Burkes, and no dithering. Dithering can change the appearance of gradients and add visible texture. FFmpeg documents sierra2_4a as the default; try alternatives on your actual clip if the result looks noisy or shows color banding.
Clips with changing areas
For a clip where only part of the image changes, you can try palettegen=stats_mode=diff to give more weight to frame-to-frame differences, and paletteuse=diff_mode=rectangle to limit processing to the changing rectangle. FFmpeg notes that this can help speed and compression in relevant clips, particularly with error-diffusion dithering. It is not guaranteed to improve every GIF, so compare the output against the standard workflow.
Rank #4
- SUPERCHARGED BY M5 — The 14-inch MacBook Pro with M5 brings next-generation speed and powerful on-device AI to personal, professional, and creative tasks. Featuring all-day battery life and a breathtaking Liquid Retina XDR display with up to 1600 nits peak brightness, it’s pro in every way.*
- HAPPILY EVER FASTER — Along with its faster CPU and unified memory, M5 features a more powerful GPU with a Neural Accelerator built into each core, delivering faster AI performance. So you can blaze through demanding workloads at mind-bending speeds.
- BUILT FOR APPLE INTELLIGENCE — Apple Intelligence is the personal intelligence system that helps you write, express yourself, and get things done effortlessly. With groundbreaking privacy protections, it gives you peace of mind that no one else can access your data — not even Apple.*
- ALL-DAY BATTERY LIFE — MacBook Pro delivers the same exceptional performance whether it’s running on battery or plugged in.
- APPS FLY WITH APPLE SILICON — All your favorites, including Microsoft 365 and Adobe Creative Cloud, run lightning fast in macOS.*
Use a one-command filter graph instead
FFmpeg can generate and apply a palette within a single filter graph:
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →ffmpeg -ss 5 -t 3 -i input.mp4
-filter_complex "[0:v]fps=12,scale=480:-1:flags=lanczos,split[a][b];[a]palettegen[p];[b][p]paletteuse"
-loop 0 output.gif
This uses the same example excerpt and output settings as the two-pass commands. Use the two-pass version first if you prefer to inspect the palette image or find a single filter graph difficult to debug.
Best Value
- SUPERCHARGED BY M5 — The 14-inch MacBook Pro with M5 brings next-generation speed and powerful on-device AI to personal, professional, and creative tasks. Featuring all-day battery life and a breathtaking Liquid Retina XDR display with up to 1600 nits peak brightness, it’s pro in every way.*
- HAPPILY EVER FASTER — Along with its faster CPU and unified memory, M5 features a more powerful GPU with a Neural Accelerator built into each core, delivering faster AI performance. So you can blaze through demanding workloads at mind-bending speeds.
- BUILT FOR APPLE INTELLIGENCE — Apple Intelligence is the personal intelligence system that helps you write, express yourself, and get things done effortlessly. With groundbreaking privacy protections, it gives you peace of mind that no one else can access your data — not even Apple.*
- ALL-DAY BATTERY LIFE — MacBook Pro delivers the same exceptional performance whether it’s running on battery or plugged in.
- APPS FLY WITH APPLE SILICON — All your favorites, including Microsoft 365 and Adobe Creative Cloud, run lightning fast in macOS.*
Account for GIF transparency limits
FFmpeg’s palette workflow supports up to 256 colors. When palettegen reserves a palette entry for transparency—a setting enabled by default—it reserves the last entry and limits generated colors to 255. The paletteuse filter’s alpha_threshold setting determines which alpha values become transparent or opaque.
GIF transparency does not preserve a continuous range of partial transparency. If your source has soft, semi-transparent edges, they may not remain smooth in the GIF; inspect the output against its intended background.
Choose settings by comparing the output
When deciding between versions, compare the same clip at the intended display size. Check:
Quick Recap
- File size and pixel dimensions
- Whether motion is smooth enough at the selected frame rate
- Visible color banding or dithering texture
- Whether transparency is needed and whether its edges look acceptable
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

