Southend Linux User Group

Ascii Art

Video Ascii – ASCII Art

Introduction

ASCII stands for “American Standard Code for Information Interchange” it is one of the the most widely used examples of usable character standards currently in use. You probably don’t even realise it but if you are using a computer to read this, then you are most likely using ASCII to access and read this very article. It is widely used as common printable characters a-z, A-Z and 0-9 along with the various punctuation marks and readily found on your screen and keyboard. Video Ascii is a form of Ascii Art this is the depiction of a readily distinguishable object, person or form that uses the tonal qualities within individual characters to display a recognisable picture. This type of art first came about with the early typewriter and with individual keyboard characters painstakingly manipulated to depict a person or object. This process was only made slightly quicker with the introduction of the electric typewriter, but not much. As computers came into the scene display outputs were extremely simple, both video and print but the production of Ascii Art was almost automated and much simplified. Now it is possible to produce video Ascii Art using common tools readily available from within standard Ubuntu repositories.

ASCII code Table

Video Ascii Art – “hasciicam”

The simplest way to display a moving image using Ascii is to download “hasciicam” unfortunately if you like me have an Acer Aspire One with a Webcam installed “hasciicam” correctly identifies the webcam in the unit but refuses to work, so if you have a fix for this please let me know. Open a new terminal and type the following.

#> sudo apt-get update
#> sudo apt-get upgrade
#> sudo apt-get install hasciicam

This will install “hasciicam” which you can then run from the command line.

#> hasciicam

The output if it works will go directly to the screen as a cascade of changing ASCII characters that as objects within your video move this will be replicated to your screen only using shade of ASCII.

Now if Hasciicam does not work then don’t dismay there is another way to produce the same or similar output it’s just a bit more involved at not at all well documented. Or alternatively you can find a webcam that works with this program.

Colour Video Ascii Art – “vlc”

#> sudo apt-get update
#> sudo apt-get upgrade
#> sudo apt-get install vlc v4l

This will install “vlc” which you can then run from the command line however we will use the variant especially for the command line called “cvlc”.

#> cvlc –vout caca v4l2:///dev/video0

Where “video0” is your installed webcam device. This generates a colourful ascii video art output which fills your screen. So lets look a little more closely at the command line string we have used above.

cvlc – is the command line version of vlc both commands can be substituted with one another –vout – selects the video output module

caca – is a plugin that converts the video to ascii art in colour

v4l2:// – is the device URL so to speak and allows us to select the source input video

Tux

It should be possible to use other plugins also in a similar manner to view a full list on your system you can use the following command.

#> vlc –list

VLC media player 1.0.6 Goldeneye
   
telepathy Telepathy “Now Playing” (MissionControl)
inhibit Power Management Inhibitor
memcpymmxext MMX EXT memcpy
freetype Freetype2 font renderer
lua Fetch artwork using lua scripts
lua Lua Interface Module
lua Lua Playlist Parser Interface
osd_parser osd_parser
osd_parser XML OSD configuration importer
osd_parser OSD configuration importer
logger File logging
dummy Dummy interface function
dummy Dummy font renderer function
dummy Dummy video output function
dummy Dummy audio output function
dummy Dummy encoder function
dummy Dump decoder function
dummy Dummy decoder function
dummy Dummy demux function
dummy Dummy access function
memcpy libc memcpy
xml XML Parser (using libxml2)
probe_hal HAL devices detection
screensaver X Screensaver disabler
stats Stats encoder function
stats Stats video output function
stats Stats demux function
stats Stats decoder function
xtag Simple XML Parser
gnutls GnuTLS transport layer security
gnutls GnuTLS server
vod_rtsp RTSP VoD server
export export
export HTML playlist export
export XSPF playlist export
export Old playlist export
export M3U playlist export
notify LibNotify Notification Plugin
memcpy3dn 3D Now! memcpy
memcpymmx MMX memcpy
audiocrobbler Submission of played songs to last.fm
visual Visualizer filter
puzzle Puzzle interactive game video filter
sharpen Augment contrast between contours.
yuvp YUVP converter
dynamicoverlay Dynamic video overlay
canvas Automatically resize and pad a video
wall Wall video filter
gaussianblur Gaussian blur video filter
noise Noise video filter
wave Wave video filter
swscale Video scaling filter
erase Erase video filter
ripple Ripple video filter
transform Video transformation filter
blendbench Blending benchmark filter
bluescreen Bluescreen video filter
blend Video pictures blending
colorthres Color threshold filter
rv32 RV32 conversion filter
clone Clone video filter
marq Marquee display
osdmenu On Screen Display menu
motiondetect Motion detect video filter
scale Video scaling filter
panoramix Panoramix: wall with overlap video filter
rss RSS and Atom feed display
adjust Image properties filter
mosaic Mosaic video sub filter
alphamask Alpha mask video filter
magnify Magnify/Zoom interactive video filter
croppadd Video scaling filter
invert Invert video filter
motionblur Motion blur filter
postproc Video post processing filter
chain Video filtering using a chain of video filter modules
psychedelic Psychedelic video filter
deinterlace Deinterlacing video filter
deinterlace Deinterlacing video filter
grain Grain video filter
crop Crop video filter
rotate Rotate video filter
extract Extract RGB component video filter
scene Scene video filter
remoteosd Remote-OSD over VNC
gradient Gradient video filter
logo Logo sub filter
logo Logo video filter
fake Fake video decoder
subsdec Text subtitles decoder
cc Closed Captions decoder
spudec DVD subtitles decoder
spudec DVD subtitles packetiser
rawvideo Pseudo raw video decoder
rawvideo Pseudo raw video packetiser
faad AAC audio decoder (using libfaad2)
speex Speex audio decoder
speex Speex audio encoder
speex Speex audio packetiser
libass Subtitle renderers using libass
cmml CMML annotations decoder
cmml CMML annotations decoder
svcdsub Philips OGT (SVCD subtitle) decoder
svcdsub Philips OGT (SVCD subtitle) packetiser
x264 H.264/MPEG4 AVC encoder (x264)
sdl_image SDL_image video decoder
theora Theora video decoder
theora Theora video encoder
theora Theora video packetiser
dts DTS parser
dts DTS audio packetiser
avcodec FFmpeg audio/video decoder
avcodec FFmpeg deinterlace video filter
avcodec FFmpeg audio/video encoder
lpcm Linear PCM audio decoder
lpcm Linear PCM audio packetiser
flac Flac audio decoder
flac Flac audio packetiser
flac Flac audio encoder
subsusf USF subtitles decoder
dvbsub DVB subtitles decoder
dvbsub DVB subtitles encoder
png PNG video decoder
cdg CDG video decoder
a52 A/52 parser
a52 A/52 audio packetiser
telx Teletext subtitles decoder
invmem Memory video decoder
schroedinger Schroedinger video decoder
adpcm ADPCM audio decoder
libmpeg2 MPEG I/II video decoder (using libmpeg2)
t140 t140
t140 T.140 text encoder
araw Raw/Log Audio decoder
araw Raw audio encoder
mpeg_audio MPEG audio layer I/II/III decoder
mpeg_audio MPEG audio layer I/II/III packetiser
twolame Libtwolame audio encoder
cvdsub CVD subtitle decoder
cvdsub Chaoji VCD subtitle packetiser
aes3 AES3/SMPTE 302M audio decoder
aes3 AES3/SMPTE 302M audio packetizer
vorbis Vorbis audio decoder
vorbis Vorbis audio encoder
vorbis Vorbis audio packetiser
stream_filter_rar Uncompressed RAR
stream_filter_record Internal stream record
decomp Decompression
telnet VLM remote control interface
rc Remote control interface
gestures Mouse gestures control interface
http HTTP remote control interface
globalhotkeys Global Hotkeys interface
motion motion control interface
showintf Show interface with mouse
signals POSIX signals handling interface
hotkeys Hotkeys management interface
dbus D-Bus control interface
lirc Infrared remote control interface
stream_out_gather Gathering stream output
stream_out_description Description stream output
stream_out_rtp RTP stream output
stream_out_record Record stream output
stream_out_transcode Transcode stream output
stream_out_autodel Automatically add/delete input streams
stream_out_display Display stream output
stream_out_es Elementary stream output
stream_out_mosaic_bridge Mosaic bridge stream output
stream_out_bridge Bridge stream output
stream_out_duplicate Duplicate stream output
stream_out_dummy Dummy stream output
stream_out_raop Remote Audio Output Protocol stream output
stream_out_raop Remote Audio Output Protocol stream output
access_output_udp UDP stream output
access_output_dummy Dummy stream output
access_output_shout IceCAST output
access_output_file File stream output
access_output_http HTTP stream output
a52tospdif Audio filter for A/52->S/PDIF encapsulation
dolby_surround_decoder Simple decoder for Dolby Surround encoded streams
scaletempo Audio tempo scaler synched with rate
dtstospdif Audio filter for DTS->S/PDIF encapsulation
spatializer Audio Spatializer
headphone_channel_mixer Headphone virtual spatialization effect
headphone_channel_mixer Headphone virtual spatialization effect
trivial_channel_mixer Audio filter for trivial channel mixing
bandlimited_resampler Audio filter for band-limited interpolation resampling
bandlimited_resampler Audio filter for band-limited interpolation resampling
ugly_resampler Audio filter for ugly resampling
equalizer Equalizer with 10 bands
mpgatofixed32 MPEG audio decoder
mpgatofixed32 MPEG audio decoder
dtstofloat32 DTS Coherent Acoustics audio decoder
dtstofloat32 DTS Coherent Acoustics audio decoder
simple_channel_mixer Audio filter for simple channel mixing
simple_channel_mixer audio filter for simple channel mixing
converter_float Floating-point audio format conversions
converter_fixed Fixed point audio format conversions
audio_format Audio filter for PCM format conversion
normvol Volume normalizer
mono Audio filter for stereo to mono conversion
trivial_resampler Audio filter for trivial resampling
param_eq Parametric Equalizer
a52tofloat32 ATSC A/52 (AC-3) audio decoder
linear_resampler Audio filter for linear interpolation resampling
oss UNIX OSS audio output
aout_file File audio output
pulse Pulseaudio audio output
alsa ALSA audio output
packetizer_vc1 VC-1 packetizer
packetizer_h264 H.264 video packetizer
packetizer_mpeg4audio MPEG4 audio packetiser
packetizer_dirac Dirac packetizer
packetizer_mpegvideo MPEG-I/II video packetiser
packetizer_mlp MLP/TrueHD parser
packetizer_mpeg4video MPEG4 video packetiser
packetizer_copy Copy packetiser
i422_yuy2_mmx MMX conversions from I422 to YUY2,YUNV,YVYU,UYVY,UYNV,Y422,IUYV,cyuv
yuy2_i422 Conversions from YUY2,YUNV,YVYU,UYVY,UYNV,Y422,cyuv to I422
i420_yuy2_mmx MMX conversions from I420,IYUV,YV12 to YUY2,YUNV,YVYU,UYVY,UYNV,Y422,IUYV,cyuv
i420_rgb_mmx MMX I420,IYUV,YV12 to RV15,RV16,RV24,RV32 conversions
yuy2_i420 Conversions from YUY2,YUNV,YVYU,UYVY,UYNV,Y422,cyuv to I420
i420_rgb I420,IYUV,YV12 to RGB2,RV15,RV16,RV24,RV32 conversions
grey_yuv Conversions from GREY to I420,YUY2
i420_yuy2 Conversions from I420,IYUV,YV12 to YUY2,YUNV,YVYU,UYVY,UYNV,Y422,IUYV,cyuv,Y211
i422_i420 Conversions from I422,J422 to I420,IYUV,J420,YV12,YUVA
i422_yuy2 Conversions from I422 to YUY2,YUNV,YVYU,UYVY,UYNV,Y422,IUYV,cyuv,Y211
i420_ymga_mmx MMX conversions from I420,IYUV,YV12 to YMGA
i420_ymga Conversions from I420,IYUV,YV12 to YMGA
nuv Nuv demuxer
real Real demuxer
voc VOC demuxer
mp4 MP4 stream demuxer
mod MOD demuxer (libmodplug)
tta TTA demuxer
mkv Matroska stream demuxer
flacsys FLAC demuxer
live555 RTP/RTSP/SDP demuxer (using Live555)
live555 live555 RTSP/RTP access and demux
ogg OGG demuxer
subtitle Text subtitles parser
mpc MusePack demuxer
mjpeg M-JPEG camera demuxer
ty TY Stream audio/video demux
aiff AIFF demuxer
m4v MPEG-4 video demuxer
wav WAV demuxer
xa XA demuxer
demux_cdg CDG demuxer
asf ASF v1.0 demuxer
playlist Playlist
playlist iTunes Music Library importer
playlist Dummy ifo demux
playlist Google Video Playlist importer
playlist QuickTime Media Link importer
playlist Kasenna MediaBase parser
playlist ASX playlist import
playlist New winamp 5.2 shoutcast import
playlist XSPF playlist import
playlist Podcast parser
playlist DVB playlist import
playlist B4S playlist import
playlist PLS playlist import
playlist RAM playlist import
playlist M3U playlist import
demuxdump File dumper
ts MPEG Transport Stream demuxer
avformat FFmpeg demuxer
avformat FFmpeg muxer
nsc Windows Media NSC metademux
vobsub Vobsub subtitles parser
h264 H264 video demuxer
smf SMF demuxer
rawdv DV (Digital Video) demuxer
mpgv MPEG-I/II video demuxer
ps MPEG-PS demuxer
vc1 VC1 video demuxer
nsv NullSoft demuxer
dirac Dirac video demuxer
rawvid Raw video demuxer
es MPEG-I/II/4 / A52 / DTS / MLP audio
pva PVA demuxer
rawaud Raw audio demuxer
au AU demuxer
avi AVI demuxer
x11_screen Screen Input
dvdread DVDRead Input (no menu support)
access_file File input
access_mms Microsoft Media Server (MMS) input
access_mmap Memory-mapped file input
access_directory Standard filesystem directory input
zip Zip files filter
zip Zip access
dvdnav DVDnav Input
access_dv Digital Video (Firewire/ieee1394) input
vcdx Video CD (VCD 1.0, 1.1, 2.0, SVCD, HQVCD) input
v4l Video4Linux input
access_bd Blu-Ray Disc Input
access_udp UDP input
access_ftp FTP input
access_ftp FTP upload output
access_tcp TCP input
access_realrtsp Real RTSP
access_http HTTP input
access_alsa Alsa audio capture input
vcd VCD input
access_oss OSS input
access_fake Fake input
dvb DVB input with v4l2 support
cdda Audio CD input
access_smb SMB input
pvr IVTV MPEG Encoding cards input
rtp Real-Time Protocol (RTP) input
v4l2 Video4Linux2 input
v4l2 Video4Linux2 Compressed A/V
caca Color ASCII art video output
glx OpenGL(GLX) provider
xvideo XVideo extension video output
vmem Video memory output
x11 X11 video output
fb GNU/Linux framebuffer video output
drawable Embedded X window video
drawable Embedded Windows video
opengl OpenGL video output
yuv YUV video output
aa ASCII-art video output
skins2 Skinnable Interface
skins2 Skins loader demux
skins2 Skinnable Interface
qt4 Qt interface
qt4 Dialogs provider
ncurses Ncurses interface
mux_avi AVI muxer
mux_mpjpeg Multipart JPEG muxer
mux_dummy Dummy/Raw muxer
mux_mp4 MP4/MOV muxer
mux_wav WAV muxer
mux_ts TS muxer (libdvbpsi)
mux_ogg Ogg/OGM muxer
mux_ps PS muxer
mux_asf ASF muxer
folder Folder meta data
taglib Taglib
spdif_mixer Dummy S/PDIF audio mixer
float32_mixer Float32 audio mixer
trivial_mixer Trivial audio mixer
upnp_intel Universal Plug’n’Play discovery
bonjour Bonjour services
udev Capture devices2
udev Discs
shout Shoutcast radio listings
shout Freebox TV listing (French ISP free.fr services)
shout French TV
shout Shoutcast TV listings
podcast Podcasts
sap SAP Announcements
sap SDP Descriptions parser
hal HAL devices detection
main main program

Wow what a list vlc is awsome.

Ascii art also extends to the command line also, tools are available such as “figlet” and on Ubuntu “linuxlogo” these fall outside the scope of the above tutorial but worthy a mention at least.

You can install these in Ubuntu using the package manager or apt-get, open a new terminal and add the following:

#> sudo apt-get install figlet linuxlogo

“Linuxlogo” may differ on the system you are using we have seen “linuxlogo” expressed as “linux_logo” and may appear graphically different on other systems in addition. it should also be possible to compose your own linuxlogo.

Author: Derek Shaw - Page reference: 2086
Last modified: Derek Shaw - 2015-01-20

Categories: Uncategorised

Add a Comment