Use case I: How to use TX2 Devkit for a purpose of video communication via web-browser

Terminal N1 //steps 1-10 are based on the post by DaneLLL // It takes to create a videoloopback device and redirect devkit-board sensor output to the loopback

sudo su
cd /usr/src/linux-headers-4.4.38-tegra
make modules_prepare
mkdir v4l2loopback
cd v4l2loopback
git clone https://github.com/umlaeute/v4l2loopback.git
cd v4l2loopback
make
make install
modprobe v4l2loopback devices=1 video_nr=2 exclusive_caps=1
echo options v4l2loopback devices=1 video_nr=2 exclusive_caps=1 > /etc/modprobe.d/v4l2loopback.conf
echo v4l2loopback > /etc/modules
update-initramfs -u

[line 14] gst-launch-1.0 nvcamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=I420, framerate=(fraction)30/1' ! nvtee ! nvvidconv ! 'video/x-raw, format=I420, framerate=30/1' ! tee ! v4l2sink device=/dev/video2

Terminal N2

export DISPLAY=:0
chromium-browser

done, now the browser can be used for video conference since it will work with MIPI CSI as with "usb web camera" tested with [Chromium] + webskype/hangiouts/jitsi etc.

Desktop Icon creation ( to be used instead of the steps above named Terminal N1 [14] and Terminal N2[1,2] )

cd ~/Desktop 
nano video.sh

#!/bin/sh

gst-launch-1.0 nvcamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=I420, framerate=30/1' ! nvtee ! nvvidconv ! 'video/x-raw, format=I420, framerate=30/1' ! tee ! v4l2sink device=/dev/video2 &

export DISPLAY=:0
chromium-browser
chmod +x video.sh
nano chromium.desktop

[Desktop Entry]

Name=Chromium Web Browser

Exec=/home/nvidia/Desktop/video.sh %U

Terminal=false

Type=Application

Icon=chromium-browser

Categories=Application

Use case II: How to extend disk capacity of jetson to the capacity of Host PC for video recording

sudo apt-get install sshfs
mkdir mountfolder
sshfs user@host:/folder /mountfolder
cd mountfolder

[ Use case II-a: How to record movies with devkit ] // special thanks to Honey_Patouceul & DaneLL

apt-get install gstreamer1.0-plugins-bad
gst-launch-1.0 nvcamerasrc num-buffers=300 ! omxh264enc ! queue ! mux. alsasrc num-buffers=1000 device="hw:2,0" ! voaacenc ! queue ! qtmux name=mux ! filesink location=b.mp4

[ Use case II-b-1: noaudio]

gst-launch-1.0 nvcamerasrc fpsRange="30.0 30.0" ! 'video/x-raw(memory:NVMM), width=2592, height=1458, format=I420, framerate=30/1' ! omxh264enc ! qtmux ! filesink location=tx2002.mp4 -e

[ Use case II-b-2: noaudio]

gst-launch-1.0 nvcamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420, framerate=(fraction)30/1' ! omxh264enc ! 'video/x-h264,stream-format=(string)byte-stream' ! filesink location="test.h264" -e

[Use case II-c : display capture] by HooverLv [source]

gst-launch-1.0 -v ximagesrc use-damage=0 ! nvvidconv ! 'video/x-raw(memory:NVMM),alignment=au,format=I420,framerate=25/1,pixel-aspect-ratio=1/1' ! omxh264enc ! 'video/x-h264,stream-format=byte-stream' ! filesink location="test.h264" -e

That can be converted into mp4 with:

ffmpeg -framerate 24 -i test.h264 -c copy output.mp4

NB! Needless to say that to write videos out of /mountfolder in the example will fill the entire Jetson eMMC.

Use case III: How to use Devkit for running Virtualbox, Teamviewer, Tor Browser, or whatever x86_64 application

Devkit board uses Host PC extension and delivers running application from Host PC processor to Jetson screen

HostPC

sudo apt-get install gstreamer1.0-libav
sudo add-apt-repository ppa:x2go/stable 
sudo apt-get update 
sudo apt-get install x2goserver x2goserver-xsession
sudo apt-get install xfce4

Jetson

Presuming ssh public key of Jetson has been added to the Host PC authorized_keys file,

we can now setup delivery of either entire Host Desktop or a separate binary window to the Jetson via x2goxclient

sudo apt-get install x2goclient


Use case IV: How to stream video using the devkit onboard sensor ov5693 and play the stream from Host PC /Network

Jetson

wget https://gstreamer.freedesktop.org/src/gst-rtsp-server/gst-rtsp-server-1.8.3.tar.xz
tar -xvf gst-rtsp-server-1.8.3.tar.xz 
cd gst-rtsp-server-1.8.3
./configure --libdir=/usr/lib/arm-linux-gnueabihf/
make
cd examples/
./test-launch "( nvcamerasrc sensor-id=0 ! video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1, format=I420 ! nvvidconv flip-method=4 ! video/x-raw, width=720, height=480, framerate=30/1, 
format=I420 ! timeoverlay ! omxh265enc ! rtph265pay name=pay0 pt=96 )"
sudo iptables -A INPUT -p tcp --dport 8554 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
sudo iptables -A OUTPUT -p tcp --sport 8554 -m conntrack --ctstate ESTABLISHED -j ACCEPT

Now a local VLC will play the stream or a local/network gst-launch-1.0 client as below:

gst-launch-1.0 rtspsrc location=rtsp://127.0.0.1:8554/test  ! 'application/x-rtp, media=video' ! decodebin ! videoconvert ! ximagesink

HostPC

ssh name@jetson_ip -L 8554:localhost:8554

The above done - Host PC VLC will somewhat likely to play the Jetson camera stream as a local with

rtsp://localhost:8554/test
rtsp://127.0.0.1:8554/test

Otherwise, if it doesn't work, the network address of Jetson needs to be specified.