Hello this pipeline is working fine on my jetson nano:
gst-launch-1.0 -vvv v4l2src device=/dev/video0 ! 'image/jpeg, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)60/1' ! jpegdec ! nvvidconv ! nvoverlaysink sync=False qos=True
However when I run the same pipeline inside a docker container that is built using:
docker build -t switch -f dockerfiles/Dockerfile.main .
where my Dockerfile.main
is:
ARG BASE_IMAGE=nvcr.io/nvidia/l4t-base:r32.4.2
FROM ${BASE_IMAGE}
ENV DEBIAN_FRONTEND=noninteractive
# needed for accessing jetpack. This is for 4.4
COPY ./dockerfiles/nvidia-l4t-apt-source.list /etc/apt/sources.list.d/nvidia-l4t-apt-source.list
COPY ./dockerfiles/jetson-ota-public.asc /etc/apt/trusted.gpg.d/jetson-ota-public.asc
#
# install prerequisites (many of these are for numpy)
#
RUN apt-get update && \
apt-get install -y libopencv-python && \
apt-get install -y --no-install-recommends \
python3-pip \
python3-dev \
libopenblas-dev \
libopenmpi2 \
openmpi-bin \
openmpi-common \
gfortran \
libjpeg-dev \
libopenmpi-dev \
libomp-dev \
zlib1g-dev \
libpython3-dev \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
python3-scipy \
python3-matplotlib \
python3-tk \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git \
build-essential \
libjpeg-dev \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
#
# ffmpeg
#
RUN echo "deb https://repo.download.nvidia.com/jetson/ffmpeg main main" | sudo tee -a /etc/apt/sources.list && \
echo "deb-src https://repo.download.nvidia.com/jetson/ffmpeg main main" | sudo tee -a /etc/apt/sources.list && \
sudo apt update && \
sudo apt install ffmpeg
RUN sudo apt-get install -y v4l-utils
#
# gstreamer
#
RUN apt-get install -y \
gstreamer-1.0 \
gstreamer1.0-dev \
libgirepository1.0-dev \
libcairo2-dev \
gir1.2-gstreamer-1.0 \
libgstreamer1.0-0 \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-libav \
gstreamer1.0-doc \
gstreamer1.0-tools \
gstreamer1.0-x \
gstreamer1.0-alsa \
gstreamer1.0-gl \
gstreamer1.0-gtk3 \
gstreamer1.0-qt5 \
gstreamer1.0-pulseaudio \
pulseaudio \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
libgstreamer-plugins-good1.0-dev \
libgstreamer-plugins-bad1.0-dev \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly
RUN pip3 install --upgrade setuptools
RUN pip3 install Jetson.GPIO
# # Run main python file
CMD ["/bin/bash", "./run.sh"]
and run:
docker run --name ${DOCKER_NAME} --privileged=True -it --rm ${DOCKER_NAME} bash
Then run the same gstreamer command as above, I get:
WARNING: erroneous pipeline: no element "nvvidconv"
And it doesn’t work. Any idea why this happens inside docker ?