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 /
Last active Jan 14, 2020
Python OpenCV 3.3 NVIDIA Jetson TX example for built-in camera; L4T 28.1
#!/usr/bin/env python
# MIT License
# Copyright (c) 2017 Jetsonhacks
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
jetsonhacks /
Last active Nov 15, 2019
Install Jedroid onto SD card - NVIDIA Jetson TK1
# Install Jedroid 1.3 on SD card
# Assumes a blank Ext4 formatted SD card is in the card reader
# The SD Card is not mounted
sudo mkdir /media/ubuntu/jedroidInstall
sudo mount -t ext4 /dev/mmcblk1p1 /media/ubuntu/jedroidInstall
# Get Jedroid 1.3 from Google Drives
cd ~/Downloads
wget -O jedroid_v1.31.tar.bz2
wget -O jedroid_v1.31.tar.bz2.md5sum
jetsonhacks /
Last active Sep 26, 2019
Gstreamer two MJPG Webcams
# 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"
jetsonhacks /
Last active Sep 8, 2019
Using Gstreamer, take a h264 stream from a Logitech c920, preview it on the display and save it to a file along with the webcam audio.
# Preview and save webcam video on NVIDIA Jetson TK1
# Grab audio and video (in h264 format) from Logitech c920 @ 1920x1080
# Preview @ 1280x720 on screen
# Store video to file named gEncode1080p.mp4
# Logitech c920 is video1 on this machine
VELEM="v4l2src device=/dev/video1 do-timestamp=true"
# Video capability from the camera - get h264 1920x1080
VCAPS="video/x-h264, width=1920, height=1080, framerate=30/1"
jetsonhacks /
Last active Aug 31, 2019
Install iTorch and prerequisites
# Install Python prerequisites on NVIDIA Jetson TK1 for iTorch
# This is for
# L4T 21.3, Torch 7 (
# Python 2.7 or greater must be installed before running this script
# Torch 7 should already be installed before running this script
# iPython is loaded using pip, as repository version is 1.x version, > 2.0 is needed
# Need to compile from source as repository version libzmq3-dev is not the correct revision
tar xzvf zeromq-4.0.5.tar.gz
jetsonhacks /
Last active Aug 16, 2019
Install Caffe on NVIDIA Jetson TK1 LT4 21.2 - CUDA 6.5
# 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
#NVIDIA Jetson TK1
#Create a swapfile for Ubuntu at the current directory location
fallocate -l 4G swapfile
#List out the file
ls -lh swapfile
# Change permissions so that only root can use it
chmod 600 swapfile
#List out the file
ls -lh swapfile
jetsonhacks / gist:1008d24f02e532217cfa
Created Oct 28, 2014
Gstreamer example preview, save and stream video
View gist:1008d24f02e532217cfa
# 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
# You can list devices:
# $ v4l2-ctl --list-devices
jetsonhacks / Install LT4
Last active May 19, 2019
Install LT4 21.1 on Jetson TK1
View Install LT4

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

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
jetsonhacks /
Created Oct 17, 2014
Use GStreamer to preview webcams
# Show a webcam that delivers video 1920x1080 MJPG on screen
VELEM="v4l2src device=/dev/video0"
VCAPS="image/jpeg, width=1920, height=1080, framerate=30/1"
VIDEO_SINK="videoconvert ! videoscale ! xvimagesink sync=false"
VIDEO_DECODE="jpegparse ! jpegdec"
# echo is just for debugging purposes
echo gst-launch-1.0 -vvv \
You can’t perform that action at this time.