Personal tools
Namespaces

Variants
Actions

Ledcat

From NiftyWiki
Jump to: navigation, search
Home Documentation Download Support Showroom Links

Flattr-badge-large.png

Abstract

Read image or raw brightness values framewise from file(s) or stdin and send to LED-setup.

Use ledcat to display frame(s) from file(s) or stream(s) and thus harness the full power of pipes. (s. tee, mkfifo or netcat for example)


Installation

Debian

If not done, yet:

  • import archive key (Fingerprint: 895D 8086 8FEF 100C DA82 0393 16CC 4680 AA46 5E22):
wget -qO - http://debian.niftylight.de/archive.key | sudo apt-key add -
  • register niftylight package source in /etc/apt/sources.list:
deb http://debian.niftylight.de/ unstable main
deb-src http://debian.niftylight.de/ unstable main
  • update
sudo apt-get update


to install, run:

sudo apt-get install ledcat


Gentoo

Emerge layman if you don't have it already.

emerge -va layman

Add the niftyled overlay (if you don't have already)

layman -f -o http://gentoo.niftylight.de/layman.xml -a niftyled

Emerge:

emerge --autounmask-write ledcat


Compile manually

Prerequisites

to compile from sources:

  • compiler e.g. gcc
  • autotools (autoconf, autoheader, ...)
  • niftyled + dev headers
  • ImageMagick + dev headers (optional)

to run:

Get sources

Git: git clone git://github.com/niftylight/ledcat.git
ZIP-Archive: https://github.com/niftylight/ledcat/zipball/master
Browse: github.com.


Compile

If your OS doesn't include the default install prefix, you might have to do that yourself before compiling:

export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
export LD_LIBRARY_PATH="/usr/local/lib"
export PATH="${PATH}:/usr/local/bin"


to compile & install, cd into the source directory and run:

autoreconf -is
mkdir build
cd build
../configure
make
sudo make install


If you don't want to install to the default location (/usr/local), you can choose a different install prefix, e.g.:

./configure --prefix=/usr


To freshly rebuild a previously built tree, do (you can skip this if you just checked out the sources):

make maintainer-clean
or just remove all contents of the build directory and repeat the previous steps.


See additional compile time options by running:

./configure --help


Usage

Send image to LED hardware - http://wiki.niftylight.de/ledcat
Usage: ledcat [options] <file(s)>

Choose "-" as <file> to read from stdin

Valid options:
	--help                  -h          This help text
	--plugin-help           -p          List of installed plugins + information
	--config <file>         -c <file>   Load this prefs file [~/.ledcat.xml]
	--no-cache              -n          Don't use frame cache [off]
	--dimensions <w>x<h>    -d <w>x<h>  Define width and height of input frames. [auto]
	--big-endian            -b          RAW data is big-endian ordered [off]
	--loop                  -L          Don't exit after last file but start over with first [off]
	--fps <n>               -F <n>      Framerate to play multiple frames at. (Ignored when --signal is used) [25]
	--raw                   -r          Treat input files as raw-files (false)
	--format <format>       -f <format> Pixelformat of raw frame - doesn't have effect without --raw. (s. http://gegl.org/babl/ for supported formats)
	--loglevel <level>      -l <level>  Only show messages with loglevel <level> (info)


Valid loglevels:
	verynoisy noisy debug verbose info notice warning error 


Ledcat parses an LED-setup XML file (default: ~/.ledcat.xml) to determine setup attributes (frame width, frame height, ...). It reads data from files or stdin. When in --raw mode, it treats input-data as raw pixel frame according to the format set by the -f parameter (default is "RGB u8"). After a full frame is received, it's displayed on the LED-Hardware according to the requested framerate (default 25).

Examples

output PNG-images in a loop @5 fps

ledcat --loop --fps 5 img1.png img2.png img3.png img4.png


RAW-Output

display an image on an RGB setup:

convert image.png -separate -combine rgb:image.raw
ledcat --raw image.raw


display an image on a Greyscale/Monochrome setup:

convert image.png -separate -combine gray:image.raw
ledcat --raw image.raw


output random pixels

ledcat --raw - < /dev/urandom 2>&1


output video file with mencoder

pipe file "video.avi" as 8-bit RGB data to a 16x16 pixel setup:

mencoder -really-quiet -nosound -vf scale=16:16,format=rgb24 -of rawvideo -ovc raw -o - video.avi | ledcat --raw -


audio visualization with libvisual

s. Libvisual

Issues

Please report anything via the issue tracker.


Changes


Commandline tool to pipe images to a niftyled LED display
http://wiki.niftylight.de/images/c/c9/Logo.png
ledcat
https://github.com/niftylight/ledcat/
Unix-like "cat" tool to pipe various image formats to a niftyled setup
niftylight GmbH
2006-2014
hardware
led
niftyled
https://github.com/niftylight/ledcat/releases
linux
libniftyled