This repository contains a Python script for streaming and playing audio from a given URL. It utilizes the requests
library for retrieving stream information and the vlc
library for audio playback.
To use this script, you need to have Python installed on your system. Additionally, you'll need to install the required dependencies using pip
. Open a terminal or command prompt and execute the following command:
pip install requests python-vlc
-
Clone the repository or download the script file
stream_player.py
to your local machine. -
Open the script file in a text editor of your choice.
-
Locate the line that defines the
stream_url
variable and replace the URL with the one you want to stream. -
Save the changes to the script file.
-
Open a terminal or command prompt and navigate to the directory where the script file is located.
-
Run the script by executing the following command:
python stream_player.py
The script will retrieve stream information from the provided URL and display it in the terminal. It will then start playing the audio stream.
-
To stop the playback, press Enter in the terminal.
This project is licensed under the MIT License. For more information, please refer to the LICENSE file.
This script is provided as-is without any warranty. Use it at your own risk. The author is not responsible for any consequences that may arise from its usage.
Contributions to this project are welcome. If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.