<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ffmpeg &#8211; My Shitty Code</title>
	<atom:link href="https://myshittycode.com/tag/ffmpeg/feed/" rel="self" type="application/rss+xml" />
	<link>https://myshittycode.com</link>
	<description>Embracing the Messiness in Search of Epic Solutions</description>
	<lastBuildDate>Tue, 17 Feb 2026 13:56:55 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://myshittycode.com/wp-content/uploads/2022/04/cropped-icon-32x32.png</url>
	<title>ffmpeg &#8211; My Shitty Code</title>
	<link>https://myshittycode.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">205304208</site>	<item>
		<title>FFmpeg: High-Quality MP4 to GIF</title>
		<link>https://myshittycode.com/2026/02/17/ffmpeg-high-quality-mp4-to-gif/</link>
					<comments>https://myshittycode.com/2026/02/17/ffmpeg-high-quality-mp4-to-gif/#respond</comments>
		
		<dc:creator><![CDATA[Shitty Author]]></dc:creator>
		<pubDate>Tue, 17 Feb 2026 13:56:53 +0000</pubDate>
				<category><![CDATA[Development Tools]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<guid isPermaLink="false">https://myshittycode.com/?p=2710</guid>

					<description><![CDATA[<p>PROBLEM You want to generate high-quality GIFs from MP4 files without using extra software or online services. SOLUTION Install FFmpeg. Default FFmpeg conversions often look low quality because GIFs are limited to 256 colors and use a generic color map. So, a two-pass conversion will be used. Parameters:</p>
<p>The post <a rel="nofollow" href="https://myshittycode.com/2026/02/17/ffmpeg-high-quality-mp4-to-gif/">FFmpeg: High-Quality MP4 to GIF</a> appeared first on <a rel="nofollow" href="https://myshittycode.com">My Shitty Code</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"></p>



<h2 class="wp-block-heading">PROBLEM</h2>



<p class="wp-block-paragraph">You want to generate high-quality GIFs from MP4 files without using extra software or online services.</p>



<h2 class="wp-block-heading">SOLUTION</h2>



<p class="wp-block-paragraph">Install <a href="https://formulae.brew.sh/formula/ffmpeg" target="_blank" rel="noopener">FFmpeg</a>.</p>



<p class="wp-block-paragraph">Default FFmpeg conversions often look low quality because GIFs are limited to 256 colors and use a generic color map. So, a two-pass conversion will be used.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
# Pass 1: Analyze the video to generate a palette
ffmpeg -i input.mp4 \
  -vf &quot;fps=10,scale=850:-1:flags=lanczos,palettegen&quot; \
  palette.png

# Pass 2: Apply the palette to create the GIF
ffmpeg -i input.mp4 \
  -i palette.png \
  -filter_complex &quot;fps=10,scale=850:-1:flags=lanczos&#x5B;x];&#x5B;x]&#x5B;1:v]paletteuse&quot; \
  output.gif
</pre></div>


<p class="wp-block-paragraph">Parameters:</p>



<ul class="wp-block-list">
<li><strong>fps=10</strong>: Reduces frame rate and file size.</li>



<li><strong>scale=850:-1</strong>: Sets width to 850px, -1 will keep aspect ratio.</li>



<li><strong>flags=lanczos</strong>: Sharper scaling algorithm.</li>



<li><strong>palettegen</strong>: Generates optimal 256-color palette.</li>



<li><strong>paletteuse</strong>: Applies the generated palette.</li>
</ul>



<p class="wp-block-paragraph"></p>
<p>The post <a rel="nofollow" href="https://myshittycode.com/2026/02/17/ffmpeg-high-quality-mp4-to-gif/">FFmpeg: High-Quality MP4 to GIF</a> appeared first on <a rel="nofollow" href="https://myshittycode.com">My Shitty Code</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://myshittycode.com/2026/02/17/ffmpeg-high-quality-mp4-to-gif/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2710</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Lazy Loading (feed)
Database Caching 54/69 queries in 0.039 seconds using Disk

Served from: myshittycode.com @ 2026-07-08 01:40:18 by W3 Total Cache
-->