How to view CSI sensor stream. Source: https://elinux.org/Jetson_TX1/TX2_OV5693
How to view CSI sensor stream. Source: https://elinux.org/Jetson_TX1/TX2_OV5693
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM),width=1280, height=720, framerate=120/1, format=NV12' ! nvvidconv flip-method=0 ! nvegltransform ! nveglglessink -eTerminal N1
ssh -X name@hostip export DISPLAY=:0chromium-browserTerminal N2
ssh -X name@hostip 'x2x -east -to :0'Stop the filesystem and force it to read only access:
echo u > /proc/sysrq-triggerCASE I: Transferring the image over ssh to host PC:
dd if=/dev/mmcblk0p1 | ssh user@hostpc dd of=/data/image.raw Transferring the image over ssh from host PC to Jetson:
ssh user@server dd if=/data/image.raw | dd of=/dev/mmcblk0p1 status=progressCASE II: Transferring the image over netcat to host PC: Host PC
netcat -l -p <port> > your_image_fileJetson:
sudo dd if=/dev/mmcblk0p1 | netcat <ip_address> <port>CASE III: preparation of distribution image
cd /home/nvidia/Downloads/Xavier/Linux_for_Tegra/bootloader/ && sudo ./mksparse -v --fillpattern=0 /data/image.raw system.imgand deployment of an image to another device via usb cable
cd /home/nvidia/Downloads/Xavier/Linux_for_Tegra/ && sudo ./flash.sh -r jetson-xavier mmcblk0p1sudo sucd /usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64/kernel-4.9## dropped in latter release##make modules_preparemkdir v4l2loopbackgit clone https://github.com/umlaeute/v4l2loopback.git v4l2loopbackcd v4l2loopback && git checkout -b v0.10.0make## if the sequence above fails - adopt the line: make -C /lib/modules/4.9.140-tegra/build M=`$pwd` modules## make -C /lib/modules/`uname -r`-tegra/build M=/usr/src/v4l2loopback modules_installmake installapt-get install -y v4l2loopback-dkms v4l2loopback-utilsmodprobe v4l2loopback devices=1 video_nr=2 exclusive_caps=1echo options v4l2loopback devices=1 video_nr=2 exclusive_caps=1 > /etc/modprobe.d/v4l2loopback.confecho v4l2loopback > /etc/modulesupdate-initramfs -uTERMINAL 1:
gst-launch-1.0 -v nvarguscamerasrc ! 'video/x-raw(memory:NVMM), format=NV12, width=1920, height=1080, framerate=30/1' ! nvvidconv ! 'video/x-raw, width=640, height=480, format=I420, framerate=30/1' ! videoconvert ! identity drop-allocation=1 ! 'video/x-raw, width=640, height=480, format=RGB, framerate=30/1' ! v4l2sink device=/dev/video2TERMINAL 2:
export DISPLAY=:0chromium-browserOtherwise, you may check that the output is played either with A:
vlc v4l2:///dev/video2or B:
gst-launch-1.0 v4l2src device=/dev/video2 ! 'video/x-raw, format=RGB, width=640, height=480, framerate=30/1' ! queue ! videoconvert ! xvimagesinkCSI camera streaming:
sudo apt-get install libgstrtspserver-1.0 libgstreamer1.0-devwget https://gstreamer.freedesktop.org/src/gst-rtsp/gst-rtsp-server-1.14.1.tar.xztar -xvf gst-rtsp-server-1.14.1.tar.xzcd gst-rtsp-server-1.14.1cd examplesgcc test-launch.c -o test-launch $(pkg-config --cflags --libs gstreamer-1.0 gstreamer-rtsp-server-1.0)#./test-launch "nvarguscamerasrc ! video/x-raw(memory:NVMM), format=NV12, width=1920, height=1080, framerate=30/1 ! nvvidconv #! video/x-raw, width=640, height=480, format=NV12, framerate=30/1 ! omxh265enc ! rtph265pay name=pay0 pt=96 config-#interval=1"./test-launch "nvarguscamerasrc ! video/x-raw(memory:NVMM), format=NV12, width=1280, height=720, framerate=120/1 ! omxh265enc ! rtph265pay name=pay0 pt=96 config-interval=1"NB! In Jetpack 4.3 pipelines changed to
./test-launch "nvarguscamerasrc ! video/x-raw(memory:NVMM), format=NV12, width=1920, height=1080, framerate=30/1 ! nvvidconv ! video/x-raw(memory:NVMM), width=640, height=480, format=NV12, framerate=30/1 ! omxh265enc ! rtph265pay name=pay0 pt=96 config-interval=1"And to play it:
display-id=2 as in nvoverlaysink display-id=2 will redirect output to USB-C displaygst-launch-1.0 rtspsrc location=rtsp://127.0.0.1:8554/test ! queue ! decodebin ! nvoverlaysinkgst-launch-1.0 rtspsrc location=rtsp://127.0.0.1:8554/test ! queue ! rtph265depay ! h265parse ! nvv4l2decoder ! nvoverlaysinkAnother computer in the network:
gst-launch-1.0 rtspsrc location=rtsp://127.0.0.1:8554/test ! queue ! decodebin ! videoconvert ! xvimagesinkFor VLC
gst-launch-1.0 rtspsrc location=rtsp://127.0.0.1:8554/test ! queue ! decodebin ! videoconvert ! v4l2sink device=/dev/video1ZED camera streaming:
./test-launch "v4l2src device=/dev/video1 ! video/x-raw,format=YUY2 ! nvvidconv ! video/x-raw(memory:NVMM),width=2560,height=720,format=I420 ! omxh265enc ! rtph265pay name=pay0 pt=96"Vlc reading
vlc rtsp://server_ip_address:8554/testVideo only:
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=2592, height=1944, format=NV12, framerate=30/1' ! omxh264enc ! 'video/x-h264,stream-format=byte-stream' ! filesink location="test2.h264" -eWith audio:
gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM),width=1920, height=1080,format=NV12,framerate=30/1' ! omxh264enc ! 'video/x-h264,stream-format=byte-stream' ! h264parse ! queue ! muxer.video_0 alsasrc device="hw:2,0" ! voaacenc ! queue ! muxer.audio_0 qtmux name=muxer ! filesink location=test.movgst-launch-1.0 nvarguscamerasrc num-buffers=1 ! 'video/x-raw(memory:NVMM), width=(int)2592, height=(int)1944' ! nvvidconv ! jpegenc ! filesink location=camerashot.jpgroot@nvidia-desktop:/sys/class/regulator/regulator.13# echo disabled > state root@nvidia-desktop:/sys/class/regulator/regulator.13# echo enabled > statewget https://developer.download.nvidia.com/embedded/L4T/r32_Release_v4.3/sources/T186/public_sources.tbz2 tar -xjf public_sources.tbz2 cd Linux_for_Tegra/ cd source/ cd public/ tar -xjf kernel_src.tbz2 mkdir ~/out TEGRA_KERNEL_OUT=~/out cd kernel/ cd kernel-4.9/ make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_defconfig nano Linux_for_Tegra/source/public/kernel/kernel-4.9/arch/arm64/configs/tegra_defconfig #here i sth eplace for adding a line like modulename=m ## make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j 6 KERNEL_MODULES_OUT=~/out/modules sudo make modules_install ARCH=arm64 O=$TEGRA_KERNEL_OUT INSTALL_MOD_PATH=$KERNEL_MODULES_OUT