PNM, PNG, TIFF in Gstreamer

1. Gstreamer to PNM to Tiff

Gstreamer PNM Script

 /opt/gst-installed/bin/gst-launch-1.0 -e v4l2src num-buffers=8000 io-mode=1 blocksize=512 \
 ! video/x-raw, format=GRAY16_LE, width=640, height=512 , framerate=7/1 ! queue \
 ! videorate ! video/x-raw, framerate=1/1 ! pnmenc \
 ! multifilesink async=1 location=${RECORD_DIR}/tau2pipe_${TIMESUBFIX}/tau_%05d.pnm

Netpbm – Pnm to tiff

To manimulate pnm, install netpbm package

> sudo apt-get install netpbm

Then for itirating every pnm file in the folder and convert to tiff in a subfolder, using the command below:

> find . -name "tau_*.pnm" -print0 | while read -d $'\0' f; do pnmtotiff -lzw "$f" > ./outtiff/${f%.pnm}.tiff ; done


2. Gstreamer to PNG

Gstreamer PNG Script

 log sudo ionice -c 1 -n 0 nice -20 \
 /opt/gst-installed/bin/gst-launch-1.0 -e v4l2src num-buffers=8000 io-mode=1 blocksize=512 \
 ! video/x-raw, format=GRAY16_LE, width=640, height=512 , framerate=7/1 ! queue \
 ! videorate ! videoconvert! video/x-raw, format=GRAY16_BE, framerate=1/1 ! pngenc \
 ! multifilesink async=1 location=${RECORD_DIR}/tau2pipe_${TIMESUBFIX}/tau_%05d.png


3. Gstreamer to PNG and UDP

Gstreamer PNG & UDP Script



[Debian Bug] FAT32 Timestamp Offset Issue

FAT32 should be saved using localtime instead of UTC, designed by microsoft. However, FAT32 in Raspbian Version of Linux is saving timestamp with UTC time even without


option in the /etc/fstab file.

In particular case, the Raspberry Pi records time that shows a 2 hour lags on Windows, which is the time difference between localtime and UTC.

This is an known bug, and developers are generally not actively fixing the bug, unfortunately.

Methods that doest work…

Continue reading

[USB] Auto Mounting of Thumb Drive

Hard Coded Method – fstab file

Files to modify:


# device-spec   mount-point     fs-type      options     dump pass
proc /proc proc defaults 0 0
/dev/mmcblk0p6 /boot vfat defaults 0 2
/dev/mmcblk0p7 / ext4 defaults,noatime 0 1
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that
UUID=BCF3-B0C0 /media/pi/TRANSCEND vfat defaults 0 0


Continue reading

Gstreamer 1.10 Cross Compiling

This guide is intended for Raspberry Pi 3B.

0. The Motive

Gstreamer on the package list of Rasbian is 1.4.4 currently, and does not support GRAY16 for some reason. It works fine on Ubuntu based version where the packaged is updated to 1.10.0.

Therefore, building from source is required to support GRAY16 on Raspberry Pi.

1. Set Up Directories

Firstly we need gstreamer source codes, Raspbian root directories (can be simply copy paste) as well as gcc cross compile toolchains.

Continue reading

Research of High-End SoC / SoM

Toradex (SoM)

韬睿(Toradex) 韬睿是一家从事设计和开发嵌入计算机模块(COM)或模块系统(SOM)以及配套底板和配件的瑞士公司。[1]

首个韬睿特许经营 Toradex AG 的注册在2003年11月14号由股东大会在公证处发起。2003年11月19号, Toradex AG 正式注册,成立信息在瑞士公报上发布。公司在美国、巴西、瑞士、印度[2]、日本[3]、中国和越南设有办公室。


韬睿的业务网络包括 飞思卡尔[4][5]、ARM[6]NVIDIAAltiumMARVELL、Microsoft Windows Embedded[7]、Qt[8] 公司 等。公司的合作伙伴包括硬件和软件服务公司,例如 Ginsbury[9]、Antmicro Ltd.[10] 等

韬睿参加位于纽约罗彻斯特理工学院举办的 2015 ARM Developer Day 研讨会。[11] 韬睿参加在德国纽伦堡举办的 Embedded World 2015[12].

2016 年 Toradex 发布了一款采用 NVIDIA® Tegra® K1 处理器并支持 CUDA 的 Apalis TK1 系统模块[13]。同时也发布了基于 NXP i.MX 7Solo 和 i.MX 7Dual 处理器的 Colibri iMX7S 和 Colibri iMX7D 系统模块[14]

Freescale (SoC)

Freescale Semiconductor, Inc. was an American multinational corporation headquartered in Austin, Texas with design, research and development, manufacturing and sales operations in more than 75 locations in 19 countries. The company employed 17,000 people worldwide.
Freescale was one of the first semiconductor companies in the world, having started as a division of Motorola in Phoenix, Arizona in 1948[3] and then becoming autonomous by the divestiture of the Semiconductor Products Sector of Motorola in 2004. In 1955, a Motorola transistor for car radios was the world’s first commercial high-power transistor. It was also Motorola’s first mass-produced semiconductor device.

Phytec (Germany)

phyFLEX® -i.MX 6 System on Module

Processor ∙ Freescale™ i.MX 6Dual/6Quad ∙
1.2 GHz ARM® Cortex™-A9 MPCore™ ∙
Cortex™-A9 NEON™ Media Processing Engine ∙
Hardware Accelerators: VPU, IPUv3H, GPU2Dv2, OpenVG 1.2, ASRC
Memory ∙ up to 4 GB DDR3 / 16 GB NAND / 16 MB SPI Flash ∙ 32 KB I2 C EEPROM
Mechanical ∙ 60 x 70 mm ∙ Three 0.5 mm pitch connectors
Supply ∙ 5V
Temperature ∙ -40 to +85 C

Compulab (Israel)

CM-FX6 – Freescale i.MX6 System-on-Module | Computer-on-Module

CM-FX6 & SB-FX6 evaluation kit (Kit Price: $385)

Camera 1 parallel camera port (up to 20 bit and up to 240 MHz peak)
MIPI CSI-2 serial port, supporting from 80 Mbps up to 1 Gbps speed per data lane



CL-SOM-AM57x – TI AM5728 / AM5718 System-on-Module

No MIPI CSI-2 Interface