How to Play Internet Radio Streams with mpv?

Using mpv, a powerful and lightweight command-line media player, is one of the most efficient ways to listen to internet radio streams without the bloat of a web browser. This article provides a quick guide on how to launch network streams via the terminal, manage your favorite stations using a basic playlist file, and utilize key keyboard shortcuts to control your playback. Whether you want to stream a direct audio URL or organize an entire library of online stations, mpv offers a highly customizable, distraction-free audio experience.


Streaming Direct Audio URLs

The simplest way to listen to an internet radio station in mpv is by passing the stream’s direct URL into your terminal. mpv automatically detects network protocols and begins buffering the audio.

To play a live stream, open your terminal and run:

mpv https://example.com/radio-stream.mp3

If the stream is running properly, mpv will open a small terminal interface displaying the stream’s metadata, audio codec, and current playback time. To stop the stream at any time, simply press q on your keyboard.

Creating a Radio Station Playlist

If you regularly listen to multiple stations, typing out long URLs every time is inefficient. You can create a standard .m3u playlist file to organize your favorite streams and quickly cycle through them.

  1. Open your preferred text editor and create a file named radio.m3u.
  2. Add your radio station links, one per line. You can optionally add a descriptive name above each link using the #EXTINF tag:
#EXTM3U
#EXTINF:-1,Classic Rock Radio
http://streaming.example.com/rock.mp3
#EXTINF:-1,Jazz Smooth Station
http://streaming.example.com/jazz.aac
  1. Save the file and run it with mpv:
mpv radio.m3u

Useful Controls for Radio Streaming

When listening to internet radio in mpv, you do not need a visual user interface. You can control everything directly from your keyboard using these essential shortcuts:

Running mpv in Audio-Only Mode

By default, mpv might open a blank video window when playing an audio stream if the stream includes album art or placeholder visuals. You can force mpv to run strictly inside your terminal without spawning a separate graphical window by adding the --no-video flag:

mpv --no-video https://example.com/radio-stream.mp3

If you prefer this behavior permanently, you can add no-video=yes to your global mpv configuration file (typically located at ~/.config/mpv/mpv.conf).