Skip to main content

Console-based web radio player with ICY metadata support

Project description

Console Web Radio Player (Python)

A simple console-based web radio player written in Python, using low-level streaming concepts. The player connects to an online radio stream, plays audio in real time, and displays ICY metadata (current track information) in the terminal.

This project is intended for learning purposes, focusing on networking, streaming, and protocol-level concepts.


✨ Features

  • Console (terminal) based radio player
  • Streams live internet radio (Icecast / Shoutcast)
  • Displays current song title using ICY metadata
  • Uses Python standard libraries for networking
  • Audio playback via ffplay
  • Clean and minimal implementation

🛠️ Tech Stack

  • Language: Python 3
  • Networking: urllib (HTTP streaming over sockets)
  • Audio playback: ffplay (FFmpeg)
  • Protocol: ICY (Icecast/Shoutcast metadata)

📁 Project Structure

radio-player/
├── radio_client_icy.py
└── README.md

📦 Requirements

  • Python 3.8+
  • FFmpeg (for ffplay)

Install FFmpeg (Ubuntu/Debian)

sudo apt install ffmpeg

▶️ Usage

python3 radio_client_icy.py

Stop playback with:

Ctrl + C

🔄 Changing the Radio Station

Edit the stream URL inside radio_client_icy.py:

STREAM_URL = "https://s2.audiostream.hu/juventus_192k"

Examples:

  • BBC Radio 1 http://stream.live.vc.bbcmedia.co.uk/bbc_radio_one
  • FIP Radio http://icecast.radiofrance.fr/fip-hifi.aac

📡 ICY Metadata

The player reads ICY metadata blocks from the stream and extracts:

  • Artist name
  • Track title

Displayed in real time as:

🎵 Now playing: Artist - Track

⚠️ Notes

  • Not all radio streams provide ICY metadata
  • Designed for educational and experimental use
  • No GUI – terminal only
  • Audio decoding is handled externally by ffplay

🔮 Future Improvements

  • Station selection menu
  • Track change detection
  • Pause / resume support
  • ncurses-based UI
  • POSIX socket implementation in C
  • Custom streaming server

📜 License

This project is open source and free to use.


🙌 Author

Created by Komka László GitHub: https://github.com/niaxinus

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

radio_player-0.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

radio_player-0.1.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file radio_player-0.1.0.tar.gz.

File metadata

  • Download URL: radio_player-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for radio_player-0.1.0.tar.gz
Algorithm Hash digest
SHA256 87a79d9c0a6f9e3a28e4556efaca434aba69aa99df96c9c114c5de1a6b176229
MD5 4e1d07d99ef0228eb8e2fa32e13117f5
BLAKE2b-256 96c4ef13c9f115d622296f10e136ae9a10992b9bb6a73f9d8539d3c19929d9fd

See more details on using hashes here.

File details

Details for the file radio_player-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: radio_player-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for radio_player-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d1361a396ac74ceb2a33db84aa5c15881f7c75535285d1543a244d1b97ad6e29
MD5 0eb2fc63c7b496d0cfa7b0306efd00e2
BLAKE2b-256 990e139ab657735debe2143e1ace16bbe4a692d42873d2f7cee268aa96b7721e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page