Skip to content

Commit

Permalink
On arm, just install vlc from the repository
Browse files Browse the repository at this point in the history
  • Loading branch information
dkulp committed Jan 29, 2025
1 parent 7ef71d3 commit 31d9449
Showing 1 changed file with 48 additions and 34 deletions.
82 changes: 48 additions & 34 deletions SD/buildVLC.sh
Original file line number Diff line number Diff line change
@@ -1,41 +1,55 @@
#!/bin/bash

cd /opt
git clone https://code.videolan.org/videolan/vlc.git
cd vlc
# this is latest master as of 01/28/2025
git checkout 94f273566e2d12987f37bd9e0a601b49be86ad17

# make sure symlink to libGL exists. On Beagles and docker, it won't unless
# a BUNCH of dev packages are installed which we'd like to avoid
LIBDIR=$(pkg-config --variable=libdir zlib)
if [ -f ${LIBDIR}/libGL.so.1 ]; then
if [ ! -f ${LIBDIR}/libGL.so ]; then
ln -s ${LIBDIR}/libGL.so.1 ${LIBDIR}/libGL.so
fi
ARMV=$(uname -m)
if [ "$ARMV" = "aarch64" ]; then
fi
case "${ARMV}" in
"aarch64" | "arm64" | "arm" | "armv7l" )
# On Arm, we'll install the vlc from the repository so we'll get whatever acceleration
# is provided by the arm platform. Most is not pushed upstream.
apt-get install -y vlc libvlc-dev
apt-get clean
;;
* )
cd /opt
git clone https://code.videolan.org/videolan/vlc.git
cd vlc
# this is latest master as of 01/28/2025
git checkout 94f273566e2d12987f37bd9e0a601b49be86ad17

DISABLES=""
if [ -f /etc/fpp/desktop ]; then
apt-get install -y libxcb-composite0-dev libxcb-xkb-dev libxcb-randr0-dev libxcb-shm0-dev
DISABLES=""
else
DISABLES="--disable-xcb"
fi
# make sure symlink to libGL exists. On Beagles and docker, it won't unless
# a BUNCH of dev packages are installed which we'd like to avoid
LIBDIR=$(pkg-config --variable=libdir zlib)
if [ -f ${LIBDIR}/libGL.so.1 ]; then
if [ ! -f ${LIBDIR}/libGL.so ]; then
ln -s ${LIBDIR}/libGL.so.1 ${LIBDIR}/libGL.so
fi
fi

CPUS=$(grep "^processor" /proc/cpuinfo | wc -l)
MEMORY=$(grep MemTot /proc/meminfo | awk '{print $2}')
if [[ ${MEMORY} -lt 512000 ]]; then
CPUS=1
fi
DISABLES=""
if [ -f /etc/fpp/desktop ]; then
apt-get install -y libxcb-composite0-dev libxcb-xkb-dev libxcb-randr0-dev libxcb-shm0-dev
DISABLES=""
else
DISABLES="--disable-xcb"
fi

CPUS=$(grep "^processor" /proc/cpuinfo | wc -l)
MEMORY=$(grep MemTot /proc/meminfo | awk '{print $2}')
if [[ ${MEMORY} -lt 512000 ]]; then
CPUS=1
fi

export LDFLAGS="-latomic"
./bootstrap
export LDFLAGS="-latomic"
./configure --disable-gles2 --disable-lua --disable-a52 --disable-chromecast --disable-chromaprint --disable-pulse --disable-jack --disable-dbus --disable-avahi --disable-qt $DISABLES --enable-run-as-root --enable-libdrm
make -j ${CPUS}
make install
ldconfig
cd /opt
rm -rf vlc
;;
esac

export LDFLAGS="-latomic"
./bootstrap
export LDFLAGS="-latomic"
./configure --disable-gles2 --disable-lua --disable-a52 --disable-chromecast --disable-chromaprint --disable-pulse --disable-jack --disable-dbus --disable-avahi --disable-qt $DISABLES --enable-run-as-root --enable-libdrm
make -j ${CPUS}
make install
ldconfig
cd /opt
rm -rf vlc

0 comments on commit 31d9449

Please sign in to comment.