This CLI Audio Recorder is a Python-based tool designed to record MP3 audio streams from the internet.
- Record MP3 streams directly from provided URLs.
- Customize the recording duration.
- Specify output filenames (default includes timestamp).
- Adjust block size for reading and writing data.
- Built-in help and usage information.
Clone the repository:
git clone https://github.com/sophie4075/cli_audiorecorder.git
cd audiorecorderInstall dependencies:
pip install -r requirements.txtBasic syntax:
python cli_audiorecorder.py <url> [--filename=<name>] [--duration=<time>] [--blocksize=<size>]Record a stream with default settings (30 seconds duration, 64 bytes block size, timestamped filename):
python cli_audiorecorder.py http://example.com/streamRecord a stream with custom filename, duration, and block size:
python cli_audiorecorder.py http://example.com/stream --filename=myRecording --duration=60 --blocksize=128Display help information:
python cli_audiorecorder.py --helpUsage:
cli_audiorecorder.py <url> [--filename=<name>] [--duration=<time>] [--blocksize=<size>]
Options:
url URL of the MP3 stream you want to record.
--filename=<name> Name of the saved recording (default: myRadioRecordingTIMESTAMP.mp3).
--duration=<time> Recording duration in seconds (default: 30).
--blocksize=<size> Block size for read/write operations in bytes (default: 64).
- Python 3.x
- Packages: argparse, requests
- Additional dependencies listed in
requirements.txt.
Resources: