-
Notifications
You must be signed in to change notification settings - Fork 420
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
Build ffmpeg for linux-arm, linux-arm64, linux-x86 #6288
base: master
Are you sure you want to change the base?
Changes from all commits
26f578b
3c27bf7
939b2c1
5c8ce4f
f067a17
7821765
f260648
f226655
240a955
3e1a3e4
991b0d9
ffaf5dd
2cdec6a
0972bd3
8793a3a
bf113a8
64d129a
6452d45
e998242
44d68e5
5b9ae47
a2a0102
7824a71
2c82111
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 |
---|---|---|
|
@@ -6,18 +6,31 @@ SCRIPT_PATH=$(pwd) | |
popd > /dev/null | ||
source "$SCRIPT_PATH/common.sh" | ||
|
||
if [ "$(dpkg --print-architecture)" = "amd64" ]; then | ||
arch="x64" | ||
elif [ "$(dpkg --print-architecture)" = "i386" ]; then | ||
arch="x86" | ||
elif [ "$(dpkg --print-architecture)" = "arm64" ]; then | ||
arch="arm64" | ||
elif [ "$(dpkg --print-architecture)" = "armhf" ]; then | ||
arch="arm" | ||
else | ||
echo "Unsupported architecture: $(dpkg --print-architecture)" | ||
exit 1 | ||
fi | ||
Comment on lines
+9
to
+20
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. Please don't use 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. to add to this, you can use |
||
|
||
FFMPEG_FLAGS+=( | ||
--target-os=linux | ||
) | ||
|
||
pushd . > /dev/null | ||
prep_ffmpeg linux-x64 | ||
prep_ffmpeg linux-$arch | ||
build_ffmpeg | ||
popd > /dev/null | ||
|
||
# gcc creates multiple symlinks per .so file for versioning. | ||
# We delete the symlinks and rename the real files to include the major library version | ||
rm linux-x64/*.so | ||
for f in linux-x64/*.so.*.*.*; do | ||
rm linux-$arch/*.so | ||
for f in linux-$arch/*.so.*.*.*; do | ||
mv -vf "$f" "${f%.*.*}" | ||
done |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,6 +56,12 @@ function prep_ffmpeg() { | |
|
||
function build_ffmpeg() { | ||
echo "-> Configuring..." | ||
if [ "$arch" = "x86" ] && [ "$(uname -s)" = "Linux" ]; then | ||
FFMPEG_FLAGS+=( | ||
--disable-asm | ||
) | ||
fi | ||
Comment on lines
+59
to
+63
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. Could be moved to |
||
|
||
./configure "${FFMPEG_FLAGS[@]}" | ||
|
||
echo "-> Building using $CORES threads..." | ||
|
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.
--disable-asm
on x86 Linux should mean that this is not needed