jellyfin-ffmpeg icon indicating copy to clipboard operation
jellyfin-ffmpeg copied to clipboard

Building on Fedora

Open rishubn opened this issue 2 years ago • 6 comments

Hi,

Can this repo be built without any changes for different platforms I.e., fedora or RHEL? If not, what debian/ubuntu specific changes have been made?

Thanks,

rishubn avatar Aug 11 '22 23:08 rishubn

All you need is to clone this repo and apply all patches under debian/patches folder and configure ffmpeg with following options to satisfy jellyfin’s minimal requirements: https://github.com/jellyfin/jellyfin-ffmpeg/blob/jellyfin/debian/rules

Here’s the PKGBUILD file for Arch linux: https://aur.archlinux.org/packages/jellyfin-ffmpeg5

nyanmisaka avatar Aug 11 '22 23:08 nyanmisaka

Thanks for the guidance! I managed to compile 5.1-2 with the following options (Fedora 36):

ffmpeg version 5.1-Jellyfin Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 12 (GCC)
configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-libs=-lfftw3f --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-shared --disable-libxcb --disable-sdl2 --disable-xlib --enable-gpl --enable-version3 --enable-static --enable-gmp --enable-gnutls --enable-chromaprint --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-opencl --enable-vaapi --enable-amf --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
libavutil      57. 28.100 / 57. 28.100
libavcodec     59. 37.100 / 59. 37.100
libavformat    59. 27.100 / 59. 27.100
libavdevice    59.  7.100 / 59.  7.100
libavfilter     8. 44.100 /  8. 44.100
libswscale      6.  7.100 /  6.  7.100
libswresample   4.  7.100 /  4.  7.100
libpostproc    56.  6.100 / 56.  6.100

I had to remove --enable-lto is this flag necessary? Not sure if it affects the binary or just compilation time

rishubn avatar Aug 17 '22 13:08 rishubn

No. It's LTO(link time optimization), which affects the output binary and slow down the compiling speed.

Did you use Fedora build script to build the package? Any chance you can share it?

nyanmisaka avatar Aug 17 '22 14:08 nyanmisaka

@nyanmisaka Ah ok, so LTO will make ffmpeg runtime slower as well?

I did not build an RPM as I am not familiar with the packaging; however I can write a short summary of what I did on the jellyfin forums once I get everything stable.

rishubn avatar Aug 17 '22 19:08 rishubn

It should make ffmpeg faster a little bit at runtime.

nyanmisaka avatar Aug 17 '22 19:08 nyanmisaka

Note: I discovered this:

https://github.com/chenxiaolong/jellyfin-ffmpeg-fedora

It mostly worked for me to make an rpm. I had to add rpmfusion setups to my box, and I had a problem with nvenc. But it is a great place to start. The author notes that this could be included in Jellyfin itself.

JASKevinWhite avatar Nov 01 '23 21:11 JASKevinWhite