Skip to content

Instantly share code, notes, and snippets.

Jetsonhacks jetsonhacks

Block or report user

Report or block jetsonhacks

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jetsonhacks
jetsonhacks / installCaffe.sh
Last active Dec 4, 2018
Install Caffe on NVIDIA Jetson TK1 LT4 21.2 - CUDA 6.5
View installCaffe.sh
#!/bin/sh
# Install and compile Caffe on NVIDIA Jetson TK1 Development Kit
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install libprotobuf-dev protobuf-compiler gfortran \
libboost-dev cmake libleveldb-dev libsnappy-dev \
libboost-thread-dev libboost-system-dev \
libatlas-base-dev libhdf5-serial-dev libgflags-dev \
libgoogle-glog-dev liblmdb-dev -y
View installOpenCVL4T21.sh
#!/bin/sh
# Get and install OpenCV for Tegra
# Linux for Tegra (LT4) 21.1 and CUDA 6.5 *must* be installed on the Jetson before installation!
wget http://developer.download.nvidia.com/embedded/OpenCV/L4T_21.1/libopencv4tegra-repo_l4t-r21_2.4.10.1_armhf.deb
sudo dpkg -i libopencv4tegra-repo_l4t-r21_2.4.10.1_armhf.deb
sudo apt-get update
sudo apt-get install libopencv4tegra libopencv4tegra-dev
@jetsonhacks
jetsonhacks / maxCPU.sh
Created Nov 19, 2014
Set CPU to full performance on NVIDIA Jetson TK1 Development Kit
View maxCPU.sh
#!/bin/sh
# Set CPU to full performance on NVIDIA Jetson TK1 Development Kit
if [ $(id -u) != 0 ]; then
echo "This script requires root permissions"
echo "$ sudo "$0""
exit
fi
# To obtain full performance on the CPU (eg: for performance measurements or benchmarking or when you don't care about power draw), you can disable CPU scaling and force the 4 main CPU cores to always run at max performance until reboot:
@jetsonhacks
jetsonhacks / installCUDA65.sh
Last active Aug 14, 2018
Fresh install CUDA 6.5 on NVIDIA Jetson TK1 Development Kit
View installCUDA65.sh
#!/bin/sh
# Fresh install for CUDA 6.5 on Jetson TK1 for Linux for Tegra (L4T) 21.1
# CUDA 6.5 REQUIRES L4T 21.1 !!!
sudo apt-add-repository universe
sudo apt-get update
# This is for L4T r21.1 ; Update for your L4T i.e. r21.3
wget http://developer.download.nvidia.com/compute/cuda/6_5/rel/installers/cuda-repo-l4t-r21.1-6-5-prod_6.5-14_armhf.deb
# Install the CUDA repo metadata that you downloaded
# This is for L4T 21.1 ; Update for your L4T i.e. 21.3
@jetsonhacks
jetsonhacks / enableUSB3.md
Last active Oct 12, 2015
NVIDIA Jetson TK1 Enable USB 3.0 under LT4 21.1
View enableUSB3.md

Linux for Tegra (LT4) uses UBoot as its bootloader, replacing fastboot. In order to enable the full size USB port as 3.0, you can change the boot configuration file on the Jetson.

The boot configuration file is located here:

/boot/extlinux/extlinux.conf

There are several example configuration files in that directory which define how to boot from different devices.

The switch to change is:

@jetsonhacks
jetsonhacks / Install LT4 21.1.md
Last active May 19, 2019
Install LT4 21.1 on Jetson TK1
View Install LT4 21.1.md

For best results, you should read through the official NVIDIA documentation found on:

https://developer.nvidia.com/linux-tegra-rel-21

In particular, the Quick Start Guide.

For this process you will need:

  • A host desktop or laptop computer running Ubuntu Linux 12.04 is officially recommended. In practice, this may be a virtual machine, I have used VirtualBox in the past. Also, I've successfully flashed from Ubuntu Linux 14.04. Your mileage may vary.
  • Micro USB cable provided with the Jetson TK1 kit
  • Jetson TK1 and power supply
View gist:29b33257980d0c342cbc
#!/bin/sh
# Video Mixer example
# 3 MPEG IPCAMS and local webcam
# Webcam is MJPEG 1280x720
JPEG_DEC="jpegparse ! queue ! jpegdec"
VID_SPEC="videorate ! videoscale ! video/x-raw-yuv,framerate=30/1,width=960,height=540"
NVVIDCONV="queue ! nvvidconv"
VELEM="v4l2src device=/dev/video0" #video0 is a Logitech c920 webcam with built-in H.264 compression & MJPEG
VCAPS="image/jpeg, width=1280, height=720, framerate=30/1"
# Video Source
@jetsonhacks
jetsonhacks / gExampleClient.sh
Created Oct 28, 2014
Gstreamer RTSP H.264 Receiver
View gExampleClient.sh
#!/bin/sh
# NVIDIA Jetson TK1
# Get rtsp stream from network, decode and display
SOURCE=<IP ADDRESS OF MACHINE, e.g. 10.10.10.10>
#VIDEO Capabilities of the receiver
VIDEO_CAPS="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264"
TCP_VIDEO_CAPS="application/x-rtp"
VIDEO_SINK="videoconvert ! xvimagesink sync=false"
TCPSRC="tcpclientsrc host=$SOURCE port=5000"
VIDEO_DEC="h264parse ! omxh264dec"
@jetsonhacks
jetsonhacks / gist:1008d24f02e532217cfa
Created Oct 28, 2014
Gstreamer example preview, save and stream video
View gist:1008d24f02e532217cfa
#!/bin/sh
# NVIDIA Jetson TK1
# Use Gstreamer to grab H.264 video and audio stream from Logitech c920 webcam
# Preview video on screen
# Save Video and Audio to a file
# Send video as RTSP stream over TCP
# IP Address of the this machine hosting the TCP stream
IP_ADDRESS=<ENTER IP ADDRESS HERE e.g 10.10.10.10>
# You can list devices:
# $ v4l2-ctl --list-devices
@jetsonhacks
jetsonhacks / sideBySide.sh
Last active Jul 12, 2019
Gstreamer two MJPG Webcams
View sideBySide.sh
#!/bin/sh
# Run two video webcam feeds in two different windows
# Script assumes that:
# Microsoft LifeCam Studio is video0
# Logitech c920 is video1
# Both cameras run max 1920x1080 MJPG, but two have both on a USB bus they can run @ 1280x720 max
# MS is made a little smaller
# text overlay and clockoverlay may be added to the pipeline, but render poorly
VELEM="v4l2src device=/dev/video0 do-timestamp=true"
VCAPS="image/jpeg, width=640, height=480, framerate=30/1"
You can’t perform that action at this time.