Project page: https://github.com/jellyfin/jellyfin-ffmpeg
Patches: https://github.com/jellyfin/jellyfin-ffmpeg/tree/jellyfin/debian/patches

Extract jellyfin-ffmpeg git repository
$ git clone https://github.com/jellyfin/jellyfin-ffmpeg.git
$ cd jellyfin-ffmpeg

Checkout the tag associated with current ffmpeg version
$ git tag --list | grep 8.1.1
$ git checkout v8.1.1-3

If there were deleted files from earlier manipulations
$ git restore .
$ git status
HEAD detached at v8.1.1-3
nothing to commit, working tree clean

Check that current ffmpeg matches jellyfin version
$ cat VERSION 
8.1.1

Modify patches to be in -p0 mode:
$ cd debian/patches
$ sed -i -e 's?--- jellyfin-ffmpeg.orig/?--- ?1' \
         -e 's?+++ jellyfin-ffmpeg/?+++ ?1' \
         -e 's?--- a/?--- ?1' \
         -e 's?+++ b/?+++ ?1' \
         -e 's?--- FFmpeg.orig/?--- ?1' \
         -e 's?+++ FFmpeg/?+++ ?1' \
         *.patch

Rename the patches:
$ i=1001 && ls -1 *.patch | while read LINE; do echo $(printf "%04d" $i)-jellyfin-$LINE; mv $LINE $(printf "%04d" $i)-jellyfin-$LINE; let i++; done

Test the patches on a clean ffmpeg tree:
$ tar -jxvf ffmpeg-8.1.1.tar.bz2 
$ cd ffmpeg-8.1.1/
$ ls -1d ~/jellyfin-ffmpeg/debian/patches/*.patch | while read LINE; do patch -p0 < $LINE; done
