<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="rss-style.xsl"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Corions Musings</title>
        <link>https://corion.net/blog/tag/debian/</link>
        <atom:link href="https://corion.net/blog/tag/debian.rss" rel="self" type="application/rss+xml" />
        <description>Blog feed of Corions Musings</description>
        <generator>Statocles 0.098</generator>
        <item>
            <title>Recompile ffmpeg with Cuda support on Debian</title>
            <link>https://corion.net/blog/2026/08/21/recompile-ffmpeg-with-cuda-support-on-debian/</link>
            <guid>https://corion.net/blog/2026/08/21/recompile-ffmpeg-with-cuda-support-on-debian/</guid>
            <description><![CDATA[
                <p>Whenever I prepare the videos of the <a href="https://perlworkshop.de">German Perl Workshop</a> for release, I dread that my custom build of <code>ffmpeg</code> broke due to a Debian upgrade. Neither does happen often, the German Perl Workshop happens once every year, and a Debian upgrade maybe every two years. But still.</p>

<p>I&#39;m in the process of preparing the videos of the 2026 German Perl Workshop, and it occurred to me that I can simply patch the Debian distribution and recompile it instead of cloning the <code>ffmpeg</code> repository and then hunting down the prerequisites etc. .</p>

<p>So, without further ado here is the process which the good folks at Debian <a href="https://wiki.debian.org/BuildingTutorialSimplified">already documented</a> quite well:</p>

<h2>Get the <code>ffmpeg</code> source</h2>

<pre><code>   apt source ffmpeg
</code></pre>

<h2>Patch <code>debian/rules</code></h2>

<p>To append our new instructions, we need to edit the <code>CONFIG</code> command in <code>debian/rules</code> and append at the end of the stanza:</p>

<pre><code>    --enable-nonfree         --enable-cuda-nvcc         --enable-libnpp         --extra-cflags=-I/usr/include/cuda         --extra-ldflags=-L/usr/lib/cuda         --cpu=native
</code></pre>

<h2>Rebuild the package</h2>

<pre><code>debuild -b -uc -us
</code></pre>

<h2>Install the patched version</h2>

<pre><code>sudo apt install ../ffmpeg_7.1.5-0+deb13u1_amd64.deb
</code></pre>

<h2>Check that it works</h2>

<pre><code>/usr/bin/ffmpeg 2&gt;&amp;1 |grep -i cuda --color
</code></pre>

<p>This should list <code>--enable-cuda-nvcc</code> somewhere.</p>


                    <p>Tags:
                        <a href="https://corion.net/blog/tag/debian/">Debian</a>
                    </p>

            ]]></description>
            <pubDate>
                Fri, 21 Aug 2026 00:00:00 +0000
            </pubDate>
        </item>
    </channel>
</rss>

