NCurses Internet Radio Player

Since moving house last year, I've found myself unable to receive Saorview (Irish DVB-T) using an indoor aerial (my new house is about 10km further from the transmitter). This was previously my primary way of receiving the RTÉ Radio stations when working on my desktop. I have a high gain wideband antenna in the attic which works great, but with no neat way to get a cable to my desktop, this is unfortunately not an option..

I had a look around for terminal-based internet radio players but could find none packaged within Debian, which I found a bit surprising. I came across pyradio, but I found it a bit clunky. Nevertheless, it is still an improvement on RTÉ's horrible Flash-based web player. I figured I could do better, and remembered VLC's nifty NCurses interface; which is ideal for my requirements.

I've collated the IceCast m3u streams from RTÉ and other Irish stations into a XSPF playlist and placed it on Github. By opening this playlist within VLC, we get a pretty clean terminal interface for playing my radio stations:
vlc -I ncurses --no-color /path/to/radio_playlist.xspf

2015-04-24-013126_461x431_scrot

Axis 207 IP Camera Recording

While the Axis 207 IP camera provides MPEG4 video output, the MPEG4 format is a bit obscure, and not handled by many media players. This makes recording the output difficult. Fortunately, VLC is capable of both playing and recording this format.

The following cron line uses VLC to record hourly chunks of video from a Axis 207 camera with IP address 10.0.0.1, and store them in /tmp/Axis207.

0 * * * * /usr/bin/vlc rtsp://10.0.0.1:554/mpeg4/media.amp --rc-fake-tty \
--no-sout-audio --sout file/ps:/tmp/Axis207/$(date +\%a_\%H00).mp4 \
--stop-time 3600 vlc:quit > /dev/null 2>&1

VLC CACA ASCII Output

If you are logged into a remote terminal and wish to quickly view the contents of video files, you can use the CACA output module of VLC to view an ASCII version of the video through the terminal. This is handy if you haven't set up X forwarding, or if X isn't available.

vlc -V caca fileToOpen

I'd even recommend doing it just for fun on your local machine. The results are surprisingly good!