ffmpeg: more optional dependencies, cherry picked one commit
This commit is contained in:
parent
865880c0f9
commit
0fc21779aa
@ -1,7 +1,8 @@
|
||||
untrusted comment: verify with /etc/ports/opt.pub
|
||||
RWSE3ohX2g5d/edyXjK4qzxgHDDAX0/47+W+/Z+0BMy12buCgiAIwhHzB3RvK/T7UwqO//Dv3oVnQPmA9T6JA5eX2lePU4Q5ggs=
|
||||
SHA256 (Pkgfile) = d769e9698572e0c61aca63a309223c7593525d0f571598e09757a63186d7b838
|
||||
RWSE3ohX2g5d/bbqz8lRH2z5CAUwz//NsL8etm7QEfDFXyRVflQBnVHoi1EN8wVM/OIO8VY4BVERsTrVU4gWtk5Mb0UxWZ4EOAU=
|
||||
SHA256 (Pkgfile) = 0c2b16e03ed0ad6535c1b1cea1b16198b63a478a71a796a0a92aec6b24df592a
|
||||
SHA256 (.footprint) = b1e690d6bd3ac029cdf1c7a618e537405ea5e75ba964249d118f26d9a4d7abca
|
||||
SHA256 (ffmpeg-6.1.1.tar.bz2) = 5e3133939a61ef64ac9b47ffd29a5ea6e337a4023ef0ad972094b4da844e3a20
|
||||
SHA256 (add-av_stream_get_first_dts-for-chromium.patch) = 57e26caced5a1382cb639235f9555fc50e45e7bf8333f7c9ae3d49b3241d3f77
|
||||
SHA256 (250471ea1745fc703eb346a2a662304536a311b1.patch) = 2105240e9280856ba0878d4daa54d9a6bdb891ccf5fbd12ef0976a3bfc14fbc4
|
||||
SHA256 (ffmpeg-x264-10bit.sh) = dde9627c41800235fbcfe0f74d2181be96239a82cd2d0d277715dddb57eb9cb3
|
||||
|
10
ffmpeg/250471ea1745fc703eb346a2a662304536a311b1.patch
Normal file
10
ffmpeg/250471ea1745fc703eb346a2a662304536a311b1.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- a/libavcodec/avfft.c
|
||||
+++ b/libavcodec/avfft.c
|
||||
@@ -130,6 +130,7 @@ av_cold void av_mdct_end(FFTContext *s)
|
||||
{
|
||||
if (s) {
|
||||
AVTXWrapper *w = (AVTXWrapper *)s;
|
||||
+ av_tx_uninit(&w->ctx2);
|
||||
av_tx_uninit(&w->ctx);
|
||||
av_free(w);
|
||||
}
|
153
ffmpeg/Pkgfile
153
ffmpeg/Pkgfile
@ -2,80 +2,109 @@
|
||||
# URL: https://ffmpeg.org/
|
||||
# Maintainer: Tim Biermann, tbier at posteo dot de
|
||||
# Depends on: yasm
|
||||
# Optional: alsa-lib amf-headers cuda dav1d fdk-aac freetype gnutls gsm jack jack-audio-connection-kit lame libass libsdl2 libtheora libva libvdpau libvorbis libvpx libwebp nv-codec-headers opus pulseaudio svt-av1 x264 x265
|
||||
# Optional: alsa-lib amf-headers aom chromaprint cuda dav1d fdk-aac fontconfig freetype gnutls gsm jack jack-audio-connection-kit ladspa lame lcms2 lensfun libass libbs2b libcaca libcdio libdrm libmodplug libplacebo librsvg libsdl2 libsoxr libssh libtheora libva libvdpau libvorbis libvpx libwebp libxml2 lv2 nv-codec-headers openal opencv openh264 openjpeg2 opus pulseaudio rav1e rtmpdump rubberband shaderc snappy speex svt-av1 v4l-utils x264 x265
|
||||
|
||||
name=ffmpeg
|
||||
version=6.1.1
|
||||
release=1
|
||||
release=2
|
||||
source=(https://ffmpeg.org/releases/$name-$version.tar.bz2
|
||||
add-av_stream_get_first_dts-for-chromium.patch
|
||||
ffmpeg-x264-10bit.sh)
|
||||
add-av_stream_get_first_dts-for-chromium.patch
|
||||
250471ea1745fc703eb346a2a662304536a311b1.patch
|
||||
ffmpeg-x264-10bit.sh)
|
||||
|
||||
build() {
|
||||
cd $name-$version
|
||||
cd $name-$version
|
||||
|
||||
prt-get isinst clang cuda nv-codec-headers && \
|
||||
PKGMK_FFMPEG+=' --enable-cuda-llvm --enable-nonfree --enable-cuda-nvcc --enable-libnpp' && \
|
||||
PKGMK_FFMPEG+=' --extra-cflags=-I/opt/cuda/include --extra-ldflags=-L/opt/cuda/lib64' && \
|
||||
PATH="$PATH:/opt/cuda/bin"
|
||||
prt-get isinst clang cuda nv-codec-headers && \
|
||||
PKGMK_FFMPEG+=' --enable-cuda-llvm --enable-nonfree --enable-cuda-nvcc --enable-libnpp' && \
|
||||
PKGMK_FFMPEG+=' --extra-cflags=-I/opt/cuda/include --extra-ldflags=-L/opt/cuda/lib64' && \
|
||||
PATH="$PATH:/opt/cuda/bin"
|
||||
|
||||
prt-get isinst amf-headers && PKGMK_FFMPEG+=' --enable-amf'
|
||||
prt-get isinst dav1d && PKGMK_FFMPEG+=' --enable-libdav1d'
|
||||
prt-get isinst fdk-aac && PKGMK_FFMPEG+=' --enable-libfdk-aac --enable-nonfree'
|
||||
prt-get isinst freetype && PKGMK_FFMPEG+=' --enable-libfreetype'
|
||||
prt-get isinst gnutls && PKGMK_FFMPEG+=' --enable-gnutls' || PKGMK_FFMPEG+=' --enable-openssl --enable-nonfree'
|
||||
prt-get isinst gsm && PKGMK_FFMPEG+=' --enable-libgsm'
|
||||
prt-get isinst jack && PKGMK_FFMPEG+=' --enable-libjack'
|
||||
prt-get isinst lame && PKGMK_FFMPEG+=' --enable-libmp3lame'
|
||||
prt-get isinst libass && PKGMK_FFMPEG+=' --enable-libass'
|
||||
prt-get isinst libtheora && PKGMK_FFMPEG+=' --enable-libtheora'
|
||||
prt-get isinst libvdpau && PKGMK_FFMPEG+=' --enable-vdpau'
|
||||
prt-get isinst libvorbis && PKGMK_FFMPEG+=' --enable-libvorbis'
|
||||
prt-get isinst libvpx && PKGMK_FFMPEG+=' --enable-libvpx'
|
||||
prt-get isinst libwebp && PKGMK_FFMPEG+=' --enable-libwebp'
|
||||
prt-get isinst nv-codec-headers && PKGMK_FFMPEG+=' --enable-nvdec --enable-nvenc'
|
||||
prt-get isinst opus && PKGMK_FFMPEG+=' --enable-libopus'
|
||||
prt-get isinst pulseaudio && PKGMK_FFMPEG+=' --enable-libpulse'
|
||||
prt-get isinst svt-av1 && PKGMK_FFMPEG+=' --enable-libsvtav1'
|
||||
prt-get isinst x264 && PKGMK_FFMPEG+=' --enable-libx264'
|
||||
prt-get isinst x265 && PKGMK_FFMPEG+=' --enable-libx265'
|
||||
prt-get isinst amf-headers && PKGMK_FFMPEG+=' --enable-amf'
|
||||
prt-get isinst aom && PKGMK_FFMPEG+=' --enable-libaom'
|
||||
prt-get isinst chromaprint && PKGMK_FFMPEG+=' --enable-chromaprint'
|
||||
prt-get isinst dav1d && PKGMK_FFMPEG+=' --enable-libdav1d'
|
||||
prt-get isinst fdk-aac && PKGMK_FFMPEG+=' --enable-libfdk-aac --enable-nonfree'
|
||||
prt-get isinst fontconfig && PKGMK_FFMPEG+=' --enable-fontconfig'
|
||||
prt-get isinst freetype && PKGMK_FFMPEG+=' --enable-libfreetype'
|
||||
prt-get isinst gnutls && PKGMK_FFMPEG+=' --enable-gnutls' || PKGMK_FFMPEG+=' --enable-openssl --enable-nonfree'
|
||||
prt-get isinst gsm && PKGMK_FFMPEG+=' --enable-libgsm'
|
||||
prt-get isinst jack && PKGMK_FFMPEG+=' --enable-libjack'
|
||||
prt-get isinst ladspa && PKGMK_FFMPEG+=' --enable-ladspa'
|
||||
prt-get isinst lame && PKGMK_FFMPEG+=' --enable-libmp3lame'
|
||||
prt-get isinst lcms2 && PKGMK_FFMPEG+=' --enable-lcms2'
|
||||
prt-get isinst lensfun && PKGMK_FFMPEG+=' --enable-liblensfun'
|
||||
prt-get isinst libass && PKGMK_FFMPEG+=' --enable-libass'
|
||||
prt-get isinst libbs2b && PKGMK_FFMPEG+=' --enable-libbs2b'
|
||||
prt-get isinst libcaca && PKGMK_FFMPEG+=' --enable-libcaca'
|
||||
prt-get isinst libcdio && PKGMK_FFMPEG+=' --enable-libcdio'
|
||||
prt-get isinst libdrm && PKGMK_FFMPEG+=' --enable-libdrm'
|
||||
prt-get isinst libmodplug && PKGMK_FFMPEG+=' --enable-libmodplug'
|
||||
prt-get isinst libplacebo && PKGMK_FFMPEG+=' --enable-libplacebo'
|
||||
prt-get isinst librsvg && PKGMK_FFMPEG+=' --enable-librsvg'
|
||||
prt-get isinst libsoxr && PKGMK_FFMPEG+=' --enable-libsoxr'
|
||||
prt-get isinst libssh && PKGMK_FFMPEG+=' --enable-libssh'
|
||||
prt-get isinst libtheora && PKGMK_FFMPEG+=' --enable-libtheora'
|
||||
prt-get isinst libvdpau && PKGMK_FFMPEG+=' --enable-vdpau'
|
||||
prt-get isinst libvorbis && PKGMK_FFMPEG+=' --enable-libvorbis'
|
||||
prt-get isinst libvpx && PKGMK_FFMPEG+=' --enable-libvpx'
|
||||
prt-get isinst libwebp && PKGMK_FFMPEG+=' --enable-libwebp'
|
||||
prt-get isinst libxml2 && PKGMK_FFMPEG+=' --enable-libxml2'
|
||||
prt-get isinst lv2 && PKGMK_FFMPEG+=' --enable-lv2'
|
||||
prt-get isinst nv-codec-headers && PKGMK_FFMPEG+=' --enable-nvdec --enable-nvenc'
|
||||
prt-get isinst opus && PKGMK_FFMPEG+=' --enable-libopus'
|
||||
prt-get isinst openh264 && PKGMK_FFMPEG+=' --enable-libopenh264'
|
||||
prt-get isinst openjpeg2 && PKGMK_FFMPEG+=' --enable-libopenjpeg'
|
||||
prt-get isinst openal && PKGMK_FFMPEG+=' --enable-openal'
|
||||
prt-get isinst opencv && PKGMK_FFMPEG+=' --enable-libopencv'
|
||||
prt-get isinst pulseaudio && PKGMK_FFMPEG+=' --enable-libpulse'
|
||||
prt-get isinst rtmpdump && PKGMK_FFMPEG+=' --enable-librtmp'
|
||||
prt-get isinst rav1e && PKGMK_FFMPEG+=' --enable-librav1e'
|
||||
prt-get isinst rubberband && PKGMK_FFMPEG+=' --enable-librubberband'
|
||||
prt-get isinst shaderc && PKGMK_FFMPEG+=' --enable-libshaderc'
|
||||
prt-get isinst snappy && PKGMK_FFMPEG+=' --enable-libsnappy'
|
||||
prt-get isinst speex && PKGMK_FFMPEG+=' --enable-libspeex'
|
||||
prt-get isinst svt-av1 && PKGMK_FFMPEG+=' --enable-libsvtav1'
|
||||
prt-get isinst v4l-utils && PKGMK_FFMPEG+=' --enable-libv4l2'
|
||||
prt-get isinst x264 && PKGMK_FFMPEG+=' --enable-libx264'
|
||||
prt-get isinst x265 && PKGMK_FFMPEG+=' --enable-libx265'
|
||||
|
||||
patch -Np1 -i $SRC/add-av_stream_get_first_dts-for-chromium.patch
|
||||
patch -Np1 -i $SRC/250471ea1745fc703eb346a2a662304536a311b1.patch
|
||||
patch -Np1 -i $SRC/add-av_stream_get_first_dts-for-chromium.patch
|
||||
|
||||
sed -i -e '/check_cflags -fdiagnostics-color=auto/d' configure
|
||||
sed -i -e '/check_cflags -fdiagnostics-color=auto/d' configure
|
||||
|
||||
./configure ${PKGMK_FFMPEG} \
|
||||
--prefix=/usr \
|
||||
--optflags="$CFLAGS" \
|
||||
--cc=/usr/bin/gcc \
|
||||
--cxx=/usr/bin/g++ \
|
||||
--ar=/usr/bin/gcc-ar \
|
||||
--nm=/usr/bin/gcc-nm \
|
||||
--ranlib=/usr/bin/gcc-ranlib \
|
||||
--strip=/usr/bin/strip \
|
||||
--enable-gpl \
|
||||
--enable-version3 \
|
||||
--enable-shared \
|
||||
--enable-pic \
|
||||
--enable-lto \
|
||||
--enable-ffplay \
|
||||
--enable-avfilter \
|
||||
--enable-postproc \
|
||||
--enable-pthreads \
|
||||
--enable-swresample \
|
||||
--disable-debug \
|
||||
--disable-doc \
|
||||
--disable-libcelt \
|
||||
--disable-optimizations \
|
||||
--disable-stripping
|
||||
./configure ${PKGMK_FFMPEG} \
|
||||
--prefix=/usr \
|
||||
--optflags="$CFLAGS" \
|
||||
--cc=/usr/bin/gcc \
|
||||
--cxx=/usr/bin/g++ \
|
||||
--ar=/usr/bin/gcc-ar \
|
||||
--nm=/usr/bin/gcc-nm \
|
||||
--ranlib=/usr/bin/gcc-ranlib \
|
||||
--strip=/usr/bin/strip \
|
||||
--enable-gpl \
|
||||
--enable-version3 \
|
||||
--enable-shared \
|
||||
--enable-pic \
|
||||
--enable-lto \
|
||||
--enable-ffplay \
|
||||
--enable-avfilter \
|
||||
--enable-postproc \
|
||||
--enable-pthreads \
|
||||
--enable-swresample \
|
||||
--disable-debug \
|
||||
--disable-doc \
|
||||
--disable-libcelt \
|
||||
--disable-stripping
|
||||
|
||||
make
|
||||
make DESTDIR=$PKG install install-man
|
||||
make
|
||||
make DESTDIR=$PKG install install-man
|
||||
|
||||
rm -r $PKG/usr/share/ffmpeg/examples
|
||||
rm -r $PKG/usr/share/ffmpeg/examples
|
||||
|
||||
if [ -e '/usr/lib/pkgconfig/x264.pc' ]; then
|
||||
install -m 0755 -D $SRC/ffmpeg-x264-10bit.sh \
|
||||
$PKG/usr/bin/ffmpeg-x264-10bit
|
||||
fi
|
||||
if [ -e '/usr/lib/pkgconfig/x264.pc' ]; then
|
||||
install -m 0755 -D $SRC/ffmpeg-x264-10bit.sh \
|
||||
$PKG/usr/bin/ffmpeg-x264-10bit
|
||||
fi
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user