Created
February 10, 2022 16:24
-
-
Save remi-dupre/3572cf061f9575424c80ca7817115f67 to your computer and use it in GitHub Desktop.
Plex RPI4 with hardware transcoding
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM lscr.io/linuxserver/plex AS ffmpeg-builder | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN apt-get update | |
RUN apt-get install -y \ | |
libass-dev libaom-dev libxvidcore-dev libvorbis-dev libv4l-dev libx265-dev \ | |
libx264-dev libwebp-dev libspeex-dev librtmp-dev libopus-dev \ | |
libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev \ | |
libsnappy-dev libsoxr-dev libssh-dev libxml2-dev gcc ffmpeg libvpx-dev | |
RUN wget \ | |
$(cat /usr/lib/plexmediaserver/Resources/LICENSE | grep "code from ffmpeg" | sed "s/^.* code from ffmpeg: \(.*\)$/\\1/g" | head -n 1) \ | |
-O ffmpeg-gpl.tar.gz | |
RUN tar -xvf ffmpeg-gpl.tar.gz | |
RUN mv plex-media-server-ffmpeg-gpl-* ffmpeg | |
RUN cd ffmpeg && \ | |
./configure \ | |
--extra-cflags="-I/usr/local/include" \ | |
--extra-ldflags="-L/usr/local/lib" \ | |
--extra-libs="-lpthread -lm -latomic" \ | |
--enable-gmp --enable-gpl --enable-libaom --enable-libass \ | |
--enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb \ | |
--enable-libopencore-amrwb --enable-libopus --enable-librtmp \ | |
--enable-libsoxr --enable-libssh --enable-libvorbis \ | |
--enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 \ | |
--enable-libxml2 --enable-mmal --enable-eae --enable-nonfree \ | |
--enable-version3 --target-os=linux --enable-pthreads --enable-openssl \ | |
--enable-hardcoded-tables && \ | |
make -j5 | |
FROM lscr.io/linuxserver/plex | |
# Copy custom script here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment