cTune is a ncurses based internet radio player written in C for Linux.
Aside from playing a radio stream you can search and browse stations as well as keep a list of favourites.
It uses the RadioBrowser API to search and get radio stream information.
Click here to watch the video (~45MB)
Usage: ./ctune [OPTION]...
--debug prints out all debug messages to the log
-f --favourite add station to favourites when used in conjunction with "--play"
-h --help display this help and exits
-p --play "UUID" plays the radio stream matching the RadioBrowser UUID
-r --resume resumes station playback of the last session
--show-cursor always visible cursor
-v --version prints version information and exits
type | file name | path | description |
---|---|---|---|
executable | ctune |
/usr/bin/ |
cTune application binary |
man | ctune.1.gz |
/usr/share/man/man1/ |
cTune man page |
configuration | ctune.cfg |
~/.config/ctune/ |
where the configuration is stored |
configuration | ctune.fav |
~/.config/ctune/ |
where the favourite stations are stored |
logging | ctune.log |
~/.local/share/ctune/ |
log file for last runtime (date/timestamps inside are UTC) |
logging | playlog.txt |
~/.local/share/ctune/ |
playback log containing the stations and songs streamed during last runtime* |
*In case you want to find the name of a song/station that you liked and forgot to write down or favourite.
Both the application log and playback log are overwritten when ctune
is launched again.
Most configuration options are accessible via the options menu.
Click here for a full breakdown of the configuration file's key-value pairs.
functionality | libraries |
---|---|
Network | OpenSSL, POSIX sockets, Curl |
Playback | FFMpeg/VLC, Pipewire/SDL2/PulseAudio/ALSA/sndio |
Recording | lame |
Parsing | json-c (static) |
Requires the following to be installed on the system first:
cmake
version 3.17 and the CMake extra-modules packagegit
for fetching the reposffmpeg
, vlc
player libraries*lame
for recording streams to mp3curl
and openssl
librariessdl2
or pulsedaudio
or alsa
or sndio
or pipewire
sound library/servers*pandoc
and gzip
for the man page(*) The relevant plugins will be compiled for whatever libraries can be found on the system.
From there:
git clone https://github.com/An7ar35/ctune.git
cd ctune
cmake . -DCMAKE_BUILD_TYPE=Release
(append -DCMAKE_INSTALL_PREFIX=</path/to/directory>
if you want to specify a custom directory for the installation)cmake --build .
sudo cmake --install .
Just run sudo xargs rm < install_manifest.txt
from within the cloned directory.
Or, alternatively:
cmake . -DCMAKE_BUILD_TYPE=uninstall
sudo cmake --build . --target uninstall
Finally, for both approaches, run sudo mandb
after to purge the ctune
entry for the man database
The package is available in the AUR repository under ctune-git
. Install using your favourite AUR package browser/installer.
Alternatively just download the
PKGBUILD
file into an empty staging folder and runmakepkg -si
from inside. The rest should take care of itself.
The version of ffmpeg libs packaged with ubuntu 22.04.1 LTS are too old. Since the API changed I've updated the calls in ctune which breaks compilation for older ffmpeg libs.
No PPA but here are copy/paste commands to install all the required programs and development libraries you would need before compiling ctune
:
sudo apt-get install gcc libncurses5 git cmake cmake-extras make man pandoc gzip
sudo apt-get install libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev libavdevice-dev libavfilter-dev libssl-dev libcurl4-openssl-dev libncurses5-dev libbsd-dev libpulse-dev lame
For more input/output plugins, install the required lib too. Once all these are on the system compiling from source should work without hiccups.
Docker is only there for testing purposes and only works on linux with either pulseaudio
or pipewire-pulse
installed and running.
It uses the Arch docker image as base. The docker-compose.sh
script creates the container and runs it (final size = ~1GB).
Linux x64 with a UTF-8 locale.
As a baseline v1.3.2 works on ArchLinux with:
Q. What are the key bindings?
A. Press F1
to get a contextual list of key bindings in the UI.
Q. How do I use the mouse?
A. Check out this guide.
Q. I'm getting weird symbols where the icons are supposed to be. What's going on?
A. Your terminal font does not support the unicode characters used. Either change the font or switch back to ASCII icons from the Options menu.
Q. Can I change the look?
A. Yes. There are internal preset themes available in the Options menu and, if these don't strike your fancy, a custom theme can be specified inside ctune's configuration file.
Disclaimer: I've writen this software primarily for myself so temper your support-level expectations accordingly.
That being said, if you find a bug you are welcome to open a ticket. I'll try to deal with it time allowing. Same for bug PRs.
For tickets, please include the following to help diagnose the source of the problem:
ctune --version
to get a print out of all that info)ctune.cfg
)ctune --debug
to generate more granular and useful info during execution)syslog
) cTune runtime specific entries where the bug occurred (output of journalctl --utc -b -0 | grep ctune
if you're using systemd
)Thank you.
Copyright @ 2020-24 E.A.Davison.
Licensed under AGPLv3