Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added swscale to FFMPEG build job #219

Merged
merged 3 commits into from
Sep 23, 2024
Merged
Changes from all 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
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