Last active
July 3, 2018 01:49
-
-
Save astarasikov/b69b3e602631038ca3d5d1b40a9e9502 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Used the rootfs from: | |
https://developer.toradex.com/files/toradex-dev/uploads/media/Colibri/Linux/Images/Apalis-TK1_LXDE-Image_2.8b3.111-20180626.tar.bz2 | |
Use the Aravis binaries from: | |
https://drive.google.com/drive/folders/1ZW8HGW0nQkewQoyJt5r-BXwAsdFAAWdK?usp=sharing | |
############################################################################### | |
# Running TK1 rootfs on X86 host in Chroot for Testing | |
############################################################################### | |
wget https://developer.toradex.com/files/toradex-dev/uploads/media/Colibri/Linux/Images/Apalis-TK1_LXDE-Image_2.8b3.111-20180626.tar.bz2 | |
tar xvpf Apalis-TK1_LXDE-Image_2.8b3.111-20180626.tar.bz2 | |
cd Apalis-TK1_LXDE-Image_2.8.3/rootfs/ | |
mount -t sysfs none sys | |
mount -t devtmpfs none dev/ | |
mount -t devpts none dev/pts/ | |
mount -t proc none proc | |
mount -t tmpfs none tmp/ | |
cp /usr/bin/qemu-arm-static usr/bin/ | |
rm etc/resolv.conf | |
cp /etc/resolv.conf etc/ | |
cp /tmp/aravis.tar.gz tmp/ | |
chroot . | |
## | |
## Outside the Chroot shell. | |
## SSH to the remote Linux Host with port forwarding to test the stream | |
ssh -L 8090:localhost:8090 -L 8000:localhost:8000 192.168.56.101 | |
############################################################################### | |
# Software-only pipeline for testing without access to Tegra Hardware | |
############################################################################### | |
ARAVIS_PIPELINE="\ | |
videotestsrc is-live=true !\ | |
capsfilter caps=\"video/x-raw, format=I420, width=(int)1280, height=(int)720\" !\ | |
timeoverlay !\ | |
gdkpixbufoverlay name=test_overlay offset-x=300 offset-y=500 location=/usr/share/icons/nuoveXT2/128x128/devices/computer.png !\ | |
videoconvert !\ | |
avenc_mjpeg !\ | |
appsink name=pysink max-buffers=5 drop=true \ | |
" | |
############################################################################### | |
# Actual setup guide | |
############################################################################### | |
opkg update | |
cd /tmp/ | |
tar xvf aravis.tar.gz | |
opkg install deploy/ipk/armv7at2hf-neon/aravis*ipk | |
opkg install python3 | |
opkg install python3-pygobject | |
## | |
## At this point, ldconfig breaks and fails to find NVIDIA libraries. | |
## | |
cat >> /etc/ld.so.conf <<EOF | |
/usr/lib/arm-linux-gnueabihf/tegra | |
/usr/lib/arm-linux-gnueabihf/tegra-egl | |
EOF | |
## | |
## regenerate ldconfig cache after re-adding the paths | |
## | |
ldconfig | |
## | |
## NVIDIA plugins for HW-accelerated video processing. | |
## They should have been already installed so this command | |
## should not do anything | |
## | |
opkg install linux-driver-package-gstnvvidconv-1.0 linux-driver-package-nvgstjpeg-1.0 | |
## | |
## the plugin for overlays | |
## | |
opkg install gstreamer1.0-plugins-good-gdkpixbuf | |
## | |
## clear GStreamer cache. | |
## This is necessary if you launched GStreamer after installing Python3 | |
## but before fixing the 'ldconfig' cache because if GStreamer fails | |
## to find the libraries, it adds NVIDIA plugins to the blacklist | |
## | |
rm -r ~/.cache/gstreamer-1.0/ | |
## | |
## For optimal performance, use the script to increase network buffers | |
## and enable two CPU cores in Performance Mode. | |
## https://github.com/astarasikov/meta-aravis/blob/2018_aravis_gst1.0/demos/hls/tegra_tweaks.sh | |
## | |
./tegra_tweaks.sh | |
## | |
## get the MJPEG server code. You can also clone the whole repository | |
## using Git. You might want to customize the pipeline string in code | |
## or supply the pipeline configuration string as a command-line argument. | |
## | |
wget https://raw.githubusercontent.com/astarasikov/meta-aravis/2018_aravis_gst1.0/demos/hls/http_mjpeg.py | |
wget https://raw.githubusercontent.com/astarasikov/meta-aravis/2018_aravis_gst1.0/demos/hls/test_mjpeg.html | |
python3 http_mjpeg.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment