Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/build_ffmpeg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@
name: Build non-GPL FFmpeg from source

on:
pull_request:
push:
branches:
- nightly
- main
- release/*
tags:
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
workflow_dispatch:
schedule:
- cron: '0 0 * * 0' # on sunday

defaults:
run:
Expand Down
16 changes: 14 additions & 2 deletions packaging/build_ffmpeg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ tar -xf ffmpeg.tar.gz --strip-components 1
--enable-avdevice \
--enable-avfilter \
--enable-avformat \
--enable-avutil
--enable-avutil \
--enable-swscale

make -j install
ls ${prefix}/*
Expand All @@ -76,24 +77,28 @@ if [[ "$(uname)" == Darwin ]]; then
avformat=libavformat.58
avdevice=libavdevice.58
avfilter=libavfilter.7
swscale=libswscale.5
elif [[ ${major_ver} == 5 ]]; then
avutil=libavutil.57
avcodec=libavcodec.59
avformat=libavformat.59
avdevice=libavdevice.59
avfilter=libavfilter.8
swscale=libswscale.6
elif [[ ${major_ver} == 6 ]]; then
avutil=libavutil.58
avcodec=libavcodec.60
avformat=libavformat.60
avdevice=libavdevice.60
avfilter=libavfilter.9
swscale=libswscale.7
elif [[ ${major_ver} == 7 ]]; then
avutil=libavutil.59
avcodec=libavcodec.61
avformat=libavformat.61
avdevice=libavdevice.61
avfilter=libavfilter.10
swscale=libswscale.8
else
printf "Error: unexpected FFmpeg major version: %s\n" ${major_ver}
exit 1;
Expand All @@ -115,7 +120,7 @@ if [[ "$(uname)" == Darwin ]]; then
fi

# list up the paths to fix
for lib in ${avcodec} ${avdevice} ${avfilter} ${avformat} ${avutil}; do
for lib in ${avcodec} ${avdevice} ${avfilter} ${avformat} ${avutil} ${swscale}; do
${otool} -l ${prefix}/lib/${lib}.dylib | grep -B2 ${prefix}
done

Expand Down Expand Up @@ -143,6 +148,13 @@ if [[ "$(uname)" == Darwin ]]; then
${prefix}/lib/${avfilter}.dylib
${otool} -l ${prefix}/lib/${avfilter}.dylib | grep -B2 ${prefix}

${install_name_tool} \
-change ${prefix}/lib/${avutil}.dylib @rpath/${avutil}.dylib \
-delete_rpath ${prefix}/lib \
-id @rpath/${swscale}.dylib \
${prefix}/lib/${swscale}.dylib
${otool} -l ${prefix}/lib/${swscale}.dylib | grep -B2 ${prefix}

${install_name_tool} \
-change ${prefix}/lib/${avcodec}.dylib @rpath/${avcodec}.dylib \
-change ${prefix}/lib/${avutil}.dylib @rpath/${avutil}.dylib \
Expand Down
Loading