Name | anyplayer JSON |
Version |
0.0.7
JSON |
| download |
home_page | None |
Summary | A simple, minimal-hassle, few-dependency Python audio playback solution |
upload_time | 2024-11-27 14:42:44 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7 |
license | MIT License Copyright (c) 2023 Elaina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
audio
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
anyplayer
=========
A simple, minimal-hassle, few-dependency Python audio playback solution.
Play audio using any of the optional dependencies you have installed.
**Options** (clink to see installation instructions):
`ffplay <#ffmpeg-recommended>`__ `mpv <#mpv-recommended>`__ `vlc <#vlc>`__
`mpg123 <#mpg123>`__ `cmus <#cmus>`__ `gst <#gst>`__ `aplay <#alsa-aplay>`__
`simpleaudio <#simpleaudio>`__ `pyaudio <#pyaudio>`__
`playsound <#playsound>`__ `filemgr <#file-manager>`__ `elisa <#elisa>`__
(and auto)
**Note**: If you prefer the most convenient audio playback on a modern
PC and don't mind the additional hard disk space (less than 256 MB),
choose the optional dependency `ffplay <#ffmpeg-recommended>`__.
Usage Guidelines
----------------
**Installation**:
.. code:: shell
pip install anyplayer
**Simple Example**:
.. code:: python
from anyplayer import get_player
player = get_player('auto', './ba.mp3')
player.start()
player.wait()
Optional Dependencies
---------------------
`ffplay <#ffmpeg-recommended>`__ `mpv <#mpv-recommended>`__ `vlc <#vlc>`__
`mpg123 <#mpg123>`__ `cmus <#cmus>`__ `gst <#gst>`__ `aplay <#alsa-aplay>`__
`simpleaudio <#simpleaudio>`__ `pyaudio <#pyaudio>`__
`playsound <#playsound>`__ `filemgr <#file-manager>`__ `elisa <#elisa>`__
FFmpeg (Recommended)
~~~~~~~~~~~~~~~~~~~~
`FFmpeg <https://www.ffmpeg.org/>`__ is a complete, cross-platform
solution to record, convert and stream audio and video.
**Windows**: Download binaries from **BtbN/FFmpeg-Builds**
`GitHub Releases <https://github.com/BtbN/FFmpeg-Builds/releases>`__ (and add
it to your ``PATH``).
**Linux**:
.. code:: shell
pacman -Syu ffmpeg
# or
apt install ffmpeg
mpv (Recommended)
~~~~~~~~~~~~~~~~~
`mpv <https://mpv.io/>`__ is a free, open source, and cross-platform
media player.
**Windows**: Download binaries from `First-party
builds <https://nightly.link/mpv-player/mpv/workflows/build/master>`__
(and add it to your ``PATH``).
**Linux**:
.. code:: shell
pacman -Syu mpv
# or
apt install mpv
VLC
~~~
`VLC <https://www.videolan.org/>`__ is a free and open source
cross-platform multimedia player and framework that plays most
multimedia files as well as DVDs, Audio CDs, VCDs, and various streaming
protocols.
**Linux**:
.. code:: shell
pacman -Syu vlc
# or
apt install vlc
mpg123
~~~~~~
`mpg123 <https://www.mpg123.de/>`__ is a fast console MPEG Audio Player
and decoder library.
**Windows**: Download binaries from
`First-party <https://www.mpg123.de/download.shtml>`__
(and add it to your ``PATH``).
**Linux**:
.. code:: shell
pacman -Syu mpg123
# or
apt install mpg123
cmus
~~~~
`cmus <https://cmus.github.io/>`__ is a small, fast and powerful console
music player for Unix-like operating systems.
**Linux**:
.. code:: shell
pacman -Syu cmus
**Note**: To use the optional player ``cmus``, ensure ``cmus`` is
running in a separate terminal session.
Gst
~~~
`gst-plugins-base-libs <https://archlinux.org/packages/extra/x86_64/gst-plugins-base-libs/>`__
is a multimedia graph framework.
**Linux**:
.. code:: shell
pacman -Syu gst-plugins-base-libs
ALSA aplay
~~~~~~~~~~
`aplay <https://alsa.opensrc.org/Alsa-utils>`__ is an utility for the
playback of ``.wav``, ``.voc``, ``.au`` files. It's included in the
official alsa-utils package.
**Linux**:
.. code:: shell
pacman -Syu alsa-utils
simpleaudio
~~~~~~~~~~~
The `simplaudio <https://github.com/hamiltron/py-simple-audio>`__
package provides cross-platform, dependency-free audio playback
capability for Python 3 on **OSX**, **Windows**, and **Linux**.
.. code:: shell
pip install simplaudio
# or
pacman -Syu python-simpleaudio
**Note**: Unfortunately,
`simpleaudio <https://github.com/hamiltron/py-simple-audio>`__ has
been archived and unmaintained for over three years. It has known bugs
and compatibility
`issues <https://github.com/hamiltron/py-simple-audio/issues/72>`__ with
**Python 3.12** or later.
(A segmentation fault will occur when audio playback is completed or
aborted. This can be used if you are only playing once and have no other
tasks after the playback stops.)
Additionally, on **Windows**, ensure you call
``multiprocessing.freeze_support()`` immediately after the
``if __name__ == '__main__':`` line in the main module:
.. code:: python
# main.py
import multiprocessing
...
if __name__ == '__main__':
multiprocessing.freeze_support()
...
PyAudio
~~~~~~~
`PyAudio <https://people.csail.mit.edu/hubert/pyaudio/>`__ provides
Python bindings for PortAudio v19, the cross-platform audio I/O library.
.. code:: shell
pip install pyaudio
# or
conda install pyaudio portaudio
# or
pacman -Syu python-pyaudio
**Note**: The optional module ``pyaudio`` may fail to play **64-bit**
WAV files, as the ``wave`` module does not support **64-bit** WAV audio.
Additionally, on **Linux**, ``pyaudio`` may produce significant noise
during playback.
playsound
~~~~~~~~~
`playsound <https://github.com/TaylorSMarks/playsound>`__ is a pure
**Python**, cross platform, single-function module with no dependencies
for playing sounds.
**Note**: However, as the original module is no longer maintained and
doesn't accept pull requests, we use
`playsound3 <https://github.com/sjmikler/playsound3>`__ as an
alternative.
.. code:: shell
pip install playsound3
File Manager
~~~~~~~~~~~~
Invokes the default file manager directly.
**Windows**: ``explorer.exe``.
**Linux**: ``dolphin`` or ``xdg-open``.
**Note**: ``filemgr`` directly invokes the default file manager so may
not exit cleanly.
Elisa
~~~~~
`Elisa <https://apps.kde.org/elisa/>`__ is the default music player for
**KDE**.
To do
-----
More information specific to **OSX** (optional dependencies, testing,
...)
Raw data
{
"_id": null,
"home_page": null,
"name": "anyplayer",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "userElaina <userelaina@pm.me>",
"keywords": "audio",
"author": null,
"author_email": "userElaina <userelaina@pm.me>",
"download_url": "https://files.pythonhosted.org/packages/b2/ab/d98854021350d3dd623cd845601442a1a0a8b4ff69b64ef8b0786c75bd5c/anyplayer-0.0.7.tar.gz",
"platform": null,
"description": "anyplayer\n=========\n\nA simple, minimal-hassle, few-dependency Python audio playback solution.\n\nPlay audio using any of the optional dependencies you have installed.\n\n**Options** (clink to see installation instructions):\n`ffplay <#ffmpeg-recommended>`__ `mpv <#mpv-recommended>`__ `vlc <#vlc>`__\n`mpg123 <#mpg123>`__ `cmus <#cmus>`__ `gst <#gst>`__ `aplay <#alsa-aplay>`__\n`simpleaudio <#simpleaudio>`__ `pyaudio <#pyaudio>`__\n`playsound <#playsound>`__ `filemgr <#file-manager>`__ `elisa <#elisa>`__\n(and auto)\n\n**Note**: If you prefer the most convenient audio playback on a modern\nPC and don't mind the additional hard disk space (less than 256 MB),\nchoose the optional dependency `ffplay <#ffmpeg-recommended>`__.\n\nUsage Guidelines\n----------------\n\n**Installation**:\n\n.. code:: shell\n\n pip install anyplayer\n\n**Simple Example**:\n\n.. code:: python\n\n from anyplayer import get_player\n\n player = get_player('auto', './ba.mp3')\n player.start()\n player.wait()\n\nOptional Dependencies\n---------------------\n\n`ffplay <#ffmpeg-recommended>`__ `mpv <#mpv-recommended>`__ `vlc <#vlc>`__\n`mpg123 <#mpg123>`__ `cmus <#cmus>`__ `gst <#gst>`__ `aplay <#alsa-aplay>`__\n`simpleaudio <#simpleaudio>`__ `pyaudio <#pyaudio>`__\n`playsound <#playsound>`__ `filemgr <#file-manager>`__ `elisa <#elisa>`__\n\nFFmpeg (Recommended)\n~~~~~~~~~~~~~~~~~~~~\n\n`FFmpeg <https://www.ffmpeg.org/>`__ is a complete, cross-platform\nsolution to record, convert and stream audio and video.\n\n**Windows**: Download binaries from **BtbN/FFmpeg-Builds**\n`GitHub Releases <https://github.com/BtbN/FFmpeg-Builds/releases>`__ (and add\nit to your ``PATH``).\n\n**Linux**:\n\n.. code:: shell\n\n pacman -Syu ffmpeg\n # or\n apt install ffmpeg\n\nmpv (Recommended)\n~~~~~~~~~~~~~~~~~\n\n`mpv <https://mpv.io/>`__ is a free, open source, and cross-platform\nmedia player.\n\n**Windows**: Download binaries from `First-party\nbuilds <https://nightly.link/mpv-player/mpv/workflows/build/master>`__\n(and add it to your ``PATH``).\n\n**Linux**:\n\n.. code:: shell\n\n pacman -Syu mpv\n # or\n apt install mpv\n\nVLC\n~~~\n\n`VLC <https://www.videolan.org/>`__ is a free and open source\ncross-platform multimedia player and framework that plays most\nmultimedia files as well as DVDs, Audio CDs, VCDs, and various streaming\nprotocols.\n\n**Linux**:\n\n.. code:: shell\n\n pacman -Syu vlc\n # or\n apt install vlc\n\nmpg123\n~~~~~~\n\n`mpg123 <https://www.mpg123.de/>`__ is a fast console MPEG Audio Player\nand decoder library.\n\n**Windows**: Download binaries from\n`First-party <https://www.mpg123.de/download.shtml>`__\n(and add it to your ``PATH``).\n\n**Linux**:\n\n.. code:: shell\n\n pacman -Syu mpg123\n # or\n apt install mpg123\n\ncmus\n~~~~\n\n`cmus <https://cmus.github.io/>`__ is a small, fast and powerful console\nmusic player for Unix-like operating systems.\n\n**Linux**:\n\n.. code:: shell\n\n pacman -Syu cmus\n\n**Note**: To use the optional player ``cmus``, ensure ``cmus`` is\nrunning in a separate terminal session.\n\nGst\n~~~\n\n`gst-plugins-base-libs <https://archlinux.org/packages/extra/x86_64/gst-plugins-base-libs/>`__\nis a multimedia graph framework.\n\n**Linux**:\n\n.. code:: shell\n\n pacman -Syu gst-plugins-base-libs\n\nALSA aplay\n~~~~~~~~~~\n\n`aplay <https://alsa.opensrc.org/Alsa-utils>`__ is an utility for the\nplayback of ``.wav``, ``.voc``, ``.au`` files. It's included in the\nofficial alsa-utils package.\n\n**Linux**:\n\n.. code:: shell\n\n pacman -Syu alsa-utils\n\nsimpleaudio\n~~~~~~~~~~~\n\nThe `simplaudio <https://github.com/hamiltron/py-simple-audio>`__\npackage provides cross-platform, dependency-free audio playback\ncapability for Python 3 on **OSX**, **Windows**, and **Linux**.\n\n.. code:: shell\n\n pip install simplaudio\n # or\n pacman -Syu python-simpleaudio\n\n**Note**: Unfortunately,\n`simpleaudio <https://github.com/hamiltron/py-simple-audio>`__ has\nbeen archived and unmaintained for over three years. It has known bugs\nand compatibility\n`issues <https://github.com/hamiltron/py-simple-audio/issues/72>`__ with\n**Python 3.12** or later.\n\n(A segmentation fault will occur when audio playback is completed or\naborted. This can be used if you are only playing once and have no other\ntasks after the playback stops.)\n\nAdditionally, on **Windows**, ensure you call\n``multiprocessing.freeze_support()`` immediately after the\n``if __name__ == '__main__':`` line in the main module:\n\n.. code:: python\n\n # main.py\n import multiprocessing\n ...\n if __name__ == '__main__':\n multiprocessing.freeze_support()\n ...\n\nPyAudio\n~~~~~~~\n\n`PyAudio <https://people.csail.mit.edu/hubert/pyaudio/>`__ provides\nPython bindings for PortAudio v19, the cross-platform audio I/O library.\n\n.. code:: shell\n\n pip install pyaudio\n # or\n conda install pyaudio portaudio\n # or\n pacman -Syu python-pyaudio\n\n**Note**: The optional module ``pyaudio`` may fail to play **64-bit**\nWAV files, as the ``wave`` module does not support **64-bit** WAV audio.\n\nAdditionally, on **Linux**, ``pyaudio`` may produce significant noise\nduring playback.\n\nplaysound\n~~~~~~~~~\n\n`playsound <https://github.com/TaylorSMarks/playsound>`__ is a pure\n**Python**, cross platform, single-function module with no dependencies\nfor playing sounds.\n\n**Note**: However, as the original module is no longer maintained and\ndoesn't accept pull requests, we use\n`playsound3 <https://github.com/sjmikler/playsound3>`__ as an\nalternative.\n\n.. code:: shell\n\n pip install playsound3\n\nFile Manager\n~~~~~~~~~~~~\n\nInvokes the default file manager directly.\n\n**Windows**: ``explorer.exe``.\n\n**Linux**: ``dolphin`` or ``xdg-open``.\n\n**Note**: ``filemgr`` directly invokes the default file manager so may\nnot exit cleanly.\n\nElisa\n~~~~~\n\n`Elisa <https://apps.kde.org/elisa/>`__ is the default music player for\n**KDE**.\n\nTo do\n-----\n\nMore information specific to **OSX** (optional dependencies, testing,\n...)\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2023 Elaina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "A simple, minimal-hassle, few-dependency Python audio playback solution",
"version": "0.0.7",
"project_urls": {
"Bug Reports": "https://github.com/userElaina/anyplayer/issues",
"Homepage": "https://github.com/userElaina/anyplayer",
"Source": "https://github.com/userElaina/anyplayer"
},
"split_keywords": [
"audio"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "68da677bc0e1bc1b78ecbc34b8e4e09b7117a2b87eaae7f7137834af53406ed0",
"md5": "bf05f31a2473b88a4bce54b38b792a93",
"sha256": "6b5439efe53c59bea892e30f4a5240315105e7e270b6673644df451421cfe3ba"
},
"downloads": -1,
"filename": "anyplayer-0.0.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bf05f31a2473b88a4bce54b38b792a93",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 13625,
"upload_time": "2024-11-27T14:42:42",
"upload_time_iso_8601": "2024-11-27T14:42:42.687134Z",
"url": "https://files.pythonhosted.org/packages/68/da/677bc0e1bc1b78ecbc34b8e4e09b7117a2b87eaae7f7137834af53406ed0/anyplayer-0.0.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b2abd98854021350d3dd623cd845601442a1a0a8b4ff69b64ef8b0786c75bd5c",
"md5": "050a3580798d9250301efa791410975c",
"sha256": "50b16c28326cde9f31f6b1198ea2cb6b900f4688c9bfda4aa7eaa166289091a3"
},
"downloads": -1,
"filename": "anyplayer-0.0.7.tar.gz",
"has_sig": false,
"md5_digest": "050a3580798d9250301efa791410975c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 11198,
"upload_time": "2024-11-27T14:42:44",
"upload_time_iso_8601": "2024-11-27T14:42:44.590984Z",
"url": "https://files.pythonhosted.org/packages/b2/ab/d98854021350d3dd623cd845601442a1a0a8b4ff69b64ef8b0786c75bd5c/anyplayer-0.0.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-27 14:42:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "userElaina",
"github_project": "anyplayer",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "anyplayer"
}