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.mp3If 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.
- Open your preferred text editor and create a file named
radio.m3u. - Add your radio station links, one per line. You can optionally add a
descriptive name above each link using the
#EXTINFtag:
#EXTM3U
#EXTINF:-1,Classic Rock Radio
http://streaming.example.com/rock.mp3
#EXTINF:-1,Jazz Smooth Station
http://streaming.example.com/jazz.aac
- Save the file and run it with mpv:
mpv radio.m3uUseful 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:
- q: Quit and close the stream.
- 9 and 0: Decrease or increase the volume.
- m: Mute or unmute the audio.
- > and <: Skip to the next or
previous radio station (if you are using an
.m3uplaylist). - p or Space: Pause or resume the stream (note: pausing a live stream will buffer the broadcast, and resuming will usually pick up from the live point or wherever the cache allows).
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.mp3If you prefer this behavior permanently, you can add
no-video=yes to your global mpv configuration file
(typically located at ~/.config/mpv/mpv.conf).