<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="atom-style.xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
    <id>https://corion.net/blog/tag/debian/</id>
    <title>Corions Musings</title>
    <updated>2026-08-21T00:00:00Z</updated>
    <link href="https://corion.net/blog/tag/debian.atom" rel="self" />
    <link href="https://corion.net/blog/tag/debian/" rel="alternate" />
    <generator version="0.098">Statocles</generator>

    <entry>
        <id>https://corion.net/blog/2026/08/21/recompile-ffmpeg-with-cuda-support-on-debian/</id>
        <title>Recompile ffmpeg with Cuda support on Debian</title>
        <author><name>Corion</name></author>
        <link href="https://corion.net/blog/2026/08/21/recompile-ffmpeg-with-cuda-support-on-debian/" rel="alternate" />
        <content type="html"><![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>

        ]]></content>
        <updated>2026-08-21T00:00:00Z</updated>
        <category term="Debian" />
    </entry>
</feed>

