Use nvv4l2 decoder instead of nvmpi for L4T
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -16,3 +16,6 @@
|
||||
[submodule "rpi-userland"]
|
||||
path = rpi-userland
|
||||
url = https://github.com/cgutman/userland.git
|
||||
[submodule "FFmpeg-l4t"]
|
||||
path = FFmpeg-l4t
|
||||
url = https://gitlab.com/switchroot/switch-l4t-multimedia/FFmpeg.git
|
||||
|
||||
@@ -4,18 +4,17 @@ ENV TARGET=l4t
|
||||
|
||||
COPY scripts/install-base-deps.sh /opt/scripts/
|
||||
RUN /bin/bash -c /opt/scripts/install-base-deps.sh && \
|
||||
curl -1sLf 'https://dl.cloudsmith.io/public/moonlight-game-streaming/moonlight-l4t/setup.deb.sh' | bash && \
|
||||
echo "deb https://repo.download.nvidia.com/jetson/common r32 main" >> /etc/apt/sources.list && \
|
||||
echo "deb https://repo.download.nvidia.com/jetson/t210 r32 main" >> /etc/apt/sources.list && \
|
||||
apt-key adv --fetch-key https://repo.download.nvidia.com/jetson/jetson-ota-public.asc && \
|
||||
mkdir -p /opt/nvidia/l4t-packages/ && \
|
||||
echo >> /opt/nvidia/l4t-packages/.nv-l4t-disable-boot-fw-update-in-preinstall && \
|
||||
apt-get update && \
|
||||
apt-get install -y -o Dpkg::Options::="--force-confold" libnvmpi1.0.0 nvidia-l4t-multimedia-utils && \
|
||||
apt-get install -y -o Dpkg::Options::="--force-confold" libv4l-dev nvidia-l4t-multimedia-utils && \
|
||||
apt-get clean -y && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY FFmpeg /opt/FFmpeg
|
||||
COPY FFmpeg-l4t /opt/FFmpeg
|
||||
COPY SDL2 /opt/SDL2
|
||||
COPY SDL_ttf /opt/SDL_ttf
|
||||
|
||||
|
||||
1
FFmpeg-l4t
Submodule
1
FFmpeg-l4t
Submodule
Submodule FFmpeg-l4t added at 1d0dbfb724
4
debian/rules
vendored
4
debian/rules
vendored
@@ -3,6 +3,10 @@ export QT_SELECT := qt5
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_shlibdeps:
|
||||
# Override package dependency error for /usr/lib/aarch64-linux-gnu/tegra/libnvbuf_utils.so
|
||||
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
|
||||
|
||||
override_dh_install:
|
||||
dh_install
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@ if [ "$TARGET" == "rpi" ] || [ "$TARGET" == "rpi64" ]; then
|
||||
# Enable MMAL and VL42 stateless decoders
|
||||
EXTRA_FFMPEG_ARGS="--enable-mmal --enable-decoder=h264_mmal --disable-rpi --enable-sand --enable-libudev --enable-v4l2-request --enable-hwaccel=h264_v4l2request --enable-hwaccel=hevc_v4l2request"
|
||||
elif [ "$TARGET" == "l4t" ]; then
|
||||
# Enable NVMPI decoders
|
||||
EXTRA_FFMPEG_ARGS="--enable-nvmpi --enable-decoder=h264_nvmpi --enable-decoder=hevc_nvmpi"
|
||||
# Enable NVV4L2 decoders
|
||||
EXTRA_FFMPEG_ARGS="--enable-nvv4l2 --enable-decoder=h264_nvv4l2 --enable-decoder=hevc_nvv4l2"
|
||||
elif [ "$TARGET" == "desktop" ]; then
|
||||
# We need to install the NVDEC headers
|
||||
cd /opt/nv-codec-headers
|
||||
@@ -59,3 +59,9 @@ cd /opt/FFmpeg
|
||||
./configure $BASE_FFMPEG_ARGS $EXTRA_FFMPEG_ARGS
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
if [ "$TARGET" == "l4t" ]; then
|
||||
# Patch libavcodec.pc to provide the proper library path for libnvbuf_utils.so
|
||||
sed -i 's|-lnvbuf_utils|-L/usr/lib/aarch64-linux-gnu/tegra/ -lnvbuf_utils|g' /usr/local/lib/pkgconfig/libavcodec.pc
|
||||
cat /usr/local/lib/pkgconfig/libavcodec.pc
|
||||
fi
|
||||
|
||||
@@ -20,7 +20,7 @@ elif [ "$TARGET" == "rpi64" ]; then
|
||||
EXTRA_BUILD_DEPS=""
|
||||
EXTRA_DEPS=""
|
||||
elif [ "$TARGET" == "l4t" ]; then
|
||||
EXTRA_BUILD_DEPS="libnvmpi1.0.0"
|
||||
EXTRA_BUILD_DEPS=""
|
||||
elif [ "$TARGET" == "desktop" ]; then
|
||||
EXTRA_BUILD_DEPS="libwayland-dev, wayland-protocols, libva-dev, libvdpau-dev"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user