-
Notifications
You must be signed in to change notification settings - Fork 39
Add libswresample to FFmpeg source build #560
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,8 @@ tar -xf ffmpeg.tar.gz --strip-components 1 | |
--enable-avfilter \ | ||
--enable-avformat \ | ||
--enable-avutil \ | ||
--enable-swscale | ||
--enable-swscale \ | ||
--enable-swresample | ||
|
||
make -j install | ||
ls ${prefix}/* | ||
|
@@ -78,27 +79,31 @@ if [[ "$(uname)" == Darwin ]]; then | |
avdevice=libavdevice.58 | ||
avfilter=libavfilter.7 | ||
swscale=libswscale.5 | ||
swresample=libswresample.3 | ||
elif [[ ${major_ver} == 5 ]]; then | ||
avutil=libavutil.57 | ||
avcodec=libavcodec.59 | ||
avformat=libavformat.59 | ||
avdevice=libavdevice.59 | ||
avfilter=libavfilter.8 | ||
swscale=libswscale.6 | ||
swresample=libswresample.4 | ||
elif [[ ${major_ver} == 6 ]]; then | ||
avutil=libavutil.58 | ||
avcodec=libavcodec.60 | ||
avformat=libavformat.60 | ||
avdevice=libavdevice.60 | ||
avfilter=libavfilter.9 | ||
swscale=libswscale.7 | ||
swresample=libswresample.4 | ||
elif [[ ${major_ver} == 7 ]]; then | ||
avutil=libavutil.59 | ||
avcodec=libavcodec.61 | ||
avformat=libavformat.61 | ||
avdevice=libavdevice.61 | ||
avfilter=libavfilter.10 | ||
swscale=libswscale.8 | ||
swresample=libswresample.5 | ||
else | ||
printf "Error: unexpected FFmpeg major version: %s\n" ${major_ver} | ||
exit 1; | ||
|
@@ -120,7 +125,7 @@ if [[ "$(uname)" == Darwin ]]; then | |
fi | ||
|
||
# list up the paths to fix | ||
for lib in ${avcodec} ${avdevice} ${avfilter} ${avformat} ${avutil} ${swscale}; do | ||
for lib in ${avcodec} ${avdevice} ${avfilter} ${avformat} ${avutil} ${swscale} ${swresample}; do | ||
${otool} -l ${prefix}/lib/${lib}.dylib | grep -B2 ${prefix} | ||
done | ||
|
||
|
@@ -155,6 +160,13 @@ if [[ "$(uname)" == Darwin ]]; then | |
${prefix}/lib/${swscale}.dylib | ||
${otool} -l ${prefix}/lib/${swscale}.dylib | grep -B2 ${prefix} | ||
|
||
${install_name_tool} \ | ||
-change ${prefix}/lib/${avutil}.dylib @rpath/${avutil}.dylib \ | ||
-delete_rpath ${prefix}/lib \ | ||
-id @rpath/${swresample}.dylib \ | ||
${prefix}/lib/${swresample}.dylib | ||
${otool} -l ${prefix}/lib/${swresample}.dylib | grep -B2 ${prefix} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is only a dependency on avutil:
I don't have access to a mac so I cannot provide the output of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If Mac wheel builds work on CI, we should be good. |
||
${install_name_tool} \ | ||
-change ${prefix}/lib/${avcodec}.dylib @rpath/${avcodec}.dylib \ | ||
-change ${prefix}/lib/${avutil}.dylib @rpath/${avutil}.dylib \ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, it's version 4 twice in a row, this isn't a typo (logs were previously failing)!