Loop play audio
Project description
playbacque
Loop play audio
Usage
> pip install playbacque
> playbacque "audio.wav"
Requires FFmpeg on PATH
Use Ctrl+C to stop playback
Supports most file formats (as this uses FFmpeg)
Supports taking audio from stdin
> ffmpeg -i "audio.mp3" -f wav pipe: | playbacque -
Advanced
When input is from stdin, an internal buffer is automatically used to loop the audio
If input is from a URL (not seekable), pass --buffer
to force buffering the audio
For PCM encoded input, ensure it is 48000 Hz signed 16 bit stereo audio, and pass --pcm
To write PCM encoded audio to stdout, pass --out
To specify a specific audio device to output to, pass --device <id>
(list devices using --list-devices
)
On Windows, there is a Microsoft Sound Mapper - Output, MME (0 in, 2 out)
device that redirects to the default output device and also works after disconnecting
Development
This project uses Hatch for project management and hatch-vcs for getting the version from Git tags when building
However, other tools can be used, such as virtualenv for isolating dependencies, pip to install the project, build to build the project, and twine to publish the project
I recommend using pipx to install Hatch and hatch-vcs
Install pipx globally
> pip install --user pipx
> pipx ensurepath
Install Hatch 1.0 (currently in prerelease) and inject the hatch-vcs plugin
> pipx install "hatch>=1.0.0.dev"
> pipx inject hatch hatch-vcs
Run the project using Hatch
> hatch run playbacque -V
Run linters and tests
> hatch run lint:all
> hatch run test:all
If you have Python 3.7 - 3.10 all installed for some reason, run tests on all of them
> hatch run test-matrix:all
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file playbacque-0.2.3.tar.gz
.
File metadata
- Download URL: playbacque-0.2.3.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.22.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82506b9c3305eaab60bca5a39c90b533d7856886915b4a624a4f26d8779b632b |
|
MD5 | 1821f94a771e20e7f5795bc300404361 |
|
BLAKE2b-256 | 5ebf28fe8275e60506653b402d226ced6623d7f89ed1b35f11e107ef974ef5f2 |
File details
Details for the file playbacque-0.2.3-py3-none-any.whl
.
File metadata
- Download URL: playbacque-0.2.3-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.22.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d742d0ccaf47588a2e8bbd28a320af050413dbac5d794eacdc1238a69bca7ae |
|
MD5 | 771f487cef729ccb608ee4bc07df4b73 |
|
BLAKE2b-256 | 3e4af444cbe41d71db00a9984777a122250dc625a47eb64bbc06f55648f111ce |