User avatar
HashberryPee
Posts: 66
Joined: Thu Apr 05, 2012 9:41 am
Location: Germany

ascii output?

Fri May 31, 2013 6:48 pm

Hi,

how can I get a cam stream in ascii (local, on the RPi)?

BR
Michael

mikerr
Posts: 2825
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: ascii output?

Fri May 31, 2013 7:35 pm

Full motion ascii via mplayer caca is good fun:

Code: Select all

sudo apt-get install mplayer

raspivid -t 10000 -p 0,0,320,200 -w 320 -h 200  -o - |mplayer -cache 1024 -fps 30 -vo caca -
Image

The matrix has you...
Android app - Raspi Card Imager - download and image SD cards - No PC required !

User avatar
HashberryPee
Posts: 66
Joined: Thu Apr 05, 2012 9:41 am
Location: Germany

Re: ascii output?

Sun Jun 02, 2013 6:09 pm

It works, thanks a lot!

First you've posted two solutions. Remember something with '...|h'. What was that about?

mikerr
Posts: 2825
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: ascii output?

Sun Jun 02, 2013 9:41 pm

The first bit was just a joke, that I removed, but here it is again:

Code: Select all

raspivid -t 1000 -o - | tr -dc '[:print:]' |head
It does print an ascii stream ...
Android app - Raspi Card Imager - download and image SD cards - No PC required !

User avatar
HashberryPee
Posts: 66
Joined: Thu Apr 05, 2012 9:41 am
Location: Germany

Re: ascii output?

Mon Jun 03, 2013 8:13 pm

I see.. :)

Tried the very same with 'aa' instead of 'caca' but I get:
Cache not responding! [performance issue]
VO: [aa] cannot open /dev/ccsa00 for writing, so we'll use linux driver
X Error of failed request: BadName (named color or font does not exist)
Major opcode of ailed request: 45 (X_OpenFont)
Serial number of failed request: 7
Parent process disappeared, exiting cache process.
Any idea?

mikerr
Posts: 2825
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: ascii output?

Mon Jun 03, 2013 10:18 pm

X Error of failed request: BadName (named color or font does not exist)
libaa want's a font it can't find. The fix would be to install that font - but it's not telling you which one ... :roll:

So I got it working using curses instead:

Code: Select all

raspivid -t 999999 -p 0,0,320,200 -w 320 -h 200  -o - |mplayer -cache 1024 -nosub -fps 31 -vo aa:driver=curses -quiet -monitoraspect 0.5 -
Image
Last edited by mikerr on Tue Jun 04, 2013 8:52 pm, edited 1 time in total.
Android app - Raspi Card Imager - download and image SD cards - No PC required !

User avatar
HashberryPee
Posts: 66
Joined: Thu Apr 05, 2012 9:41 am
Location: Germany

Re: ascii output?

Tue Jun 04, 2013 8:21 pm

For some reason it doesn't like the '-monitoraspect' option. Error message isn't that revealing
Unknown option on the command line: -monitoraspect=0.5
Error parsing option on the command line: -monitoraspect=0.5
MPlayer svn r34540 (Debian), built with gcc-4.6 (C) 2000-2012 Mplayer Team
Works without the monitoraspect option but the ascii outut is quite small then.

mikerr
Posts: 2825
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: ascii output?

Tue Jun 04, 2013 8:54 pm

Sorry typed that bit of the line wrong, there's no "=" after monitoraspect :oops:

Code: Select all

raspivid -t 999999 -p 0,0,320,200 -w 320 -h 200  -o - |mplayer -cache 1024 -nosub -fps 31 -vo aa:driver=curses -quiet -monitoraspect 0.5 -
Android app - Raspi Card Imager - download and image SD cards - No PC required !

User avatar
HashberryPee
Posts: 66
Joined: Thu Apr 05, 2012 9:41 am
Location: Germany

Re: ascii output?

Wed Jun 05, 2013 8:02 pm

That's it, thanks again! You're a wizard.

Should have seen it by myself - was looking through the documentation and didn't notice. :roll:

Return to “Camera board”