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

TODO

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s