Skip to content

Goodbye VLCD, hello CVLC

Currently working on my Pimoroni Pirate Radio. This kit is fantastic—it came with everything needed to play internet radio, except for a Raspberry Pi Zero with headers.

One of the coolest features is that it worked with VideoLAN (VLC) and M3U playlists. It could play internet radio URLs using vlcd, which unfortunately seems to have been removed after VLC version 2.2.6.

That was a real disappointment, because vlcd ran headlessly. You couldn’t ask for a simpler way to play M3U files.

Another great feature is the ability to control playback through a web GUI. That was awesome—you could manage the radio from another host. Keep in mind, the kit did include headers that let you control volume and skip forward or backward through stations in the M3U playlist.

The web GUI is especially nice because you can browse the items in the playlist, select a station to play, and adjust the volume—all from a clean interface.

http://<ipofradio>:808

As mentioned earlier, it seems that after VLC version 2.2.6, vlcd was removed. I panicked, because I had planned to build an internet radio inside the shell of an old radio. I even purchased the replacement Pirate Audio board, hoping it would include vlcd or something similar. Instead, it came with Mopidy—which isn’t VLC.

With vlcd gone, I gave up on the project for a while. I still want to build an internet radio. I even asked a group on Facebook about using the ESP32 for internet radios, since a lot of people are using those to build with.

Recently, I was updating my M3U playlist—refreshing the URLs for ROK Classic Radio and PumpkinFM so I could listen to some classic shows. By the way, I love Old Time Radio, and those two sites are among the best.

A few years passed, and I couldn’t shake the feeling that VLC wouldn’t just drop a feature that worked so well. So I started digging into what replaced vlcd. That’s when I discovered cvlc, the command-line version of VLC.

At first glance, cvlc doesn’t run as a service like vlcd did, but it gets the job done.

First thing, a m3u will be needed. To play the m3u list from the cli, here is the example of the code needed

cvlc <playlist>.m3u

VLC will start playing, and even if you press Ctrl+C, the stream will continue to play in the background.

Now, to get it running like the old vlcd—complete with a web GUI—you can use the following command:

cvlc -I http --http-host <ip/localhost> --http-password <password>& 

-I http
–http-host <ip/localhost>
— http-password <password>&

If you’re accessing it from another device, replace localhost with the IP address of the machine running VLC.

Adding an ampersand (&) at the end of the command will start the process and keep it running in the background—unless you explicitly kill it using its process ID.

I recommend binding to 0.0.0.0, which attaches the service to all network interfaces. This is useful because if you bind to localhost, the web GUI will only be accessible from the device running cvlc. Binding to 0.0.0.0 allows remote access from other devices on the network.

The device running cvlc will need a sound card and speakers. Once the cvlc command is issued, audio will begin playing directly from that device.

This is a major step forward for me. Hopefully, I can finally restart my Radio Project.

Leave a Reply

Your email address will not be published. Required fields are marked *