{ "info": { "author": "Fabian-Robert Stoeter", "author_email": "mail@faroit.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Science/Research", "Intended Audience :: Telecommunications Industry", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Multimedia :: Sound/Audio :: Analysis", "Topic :: Multimedia :: Sound/Audio :: Sound Synthesis" ], "description": "# stempeg = stems + ffmpeg\n\n[![Build Status](https://travis-ci.org/faroit/stempeg.svg?branch=master)](https://travis-ci.org/faroit/stempeg)\n[![Latest Version](https://img.shields.io/pypi/v/stempeg.svg)](https://pypi.python.org/pypi/stempeg)\n[![Supported Python versions](https://img.shields.io/pypi/pyversions/stempeg.svg)](https://pypi.python.org/pypi/stempeg)\n\npython package to read and write [STEM](https://www.native-instruments.com/en/specials/stems/) files.\nTechnically, STEMs are MP4 files with multiple audio streams and additional metatdata. _stempeg_ is a python interface for [ffmpeg](https://www.ffmpeg.org/) particularly made to read and write multi stream MP4 audio files. \n\n## Installation\n\n### 1. Installation of ffmpeg Library\n\n_stempeg_ relies on [ffmpeg](https://www.ffmpeg.org/) (tested: 4.1, 4.0.2, 3.4 and 2.8.6) to decode the stems file format. For\nencoding ffmpeg >= 3.2 is suggested.\n\nThe Installation if ffmpeg differ among operating systems. If you use [Anaconda](https://anaconda.org/anaconda/python) you can install ffmpeg on Windows/Mac/Linux using the following command:\n\n```\nconda install -c conda-forge ffmpeg\n```\n\n__Decoding__ is supported with any recent build of ffmpeg. For __Encoding__ it is recommended to use the Fraunhofer AAC encoder (`libfdk_aac`) which is not included in the default ffmpeg builds. Note that the conda version currently does _not_ include `fdk-aac`. If `libfdk_aac` is not installed _stempeg_ will use the default `aac` codec which will result in slightly inferior audio quality.\n\nYou can install ffmpeg with `libfdk-aac` support manually as following:\n\n* Mac: use homebrew: `brew install ffmpeg --with-fdk-aac`\n* Ubuntu Linux: See installation script [here](https://gist.github.com/rafaelbiriba/7f2d7c6f6c3d6ae2a5cb).\n* Using Docker (Mac, Windows, Linux): `docker pull jrottenberg/ffmpeg`\n\n### 2. Installation of the _stempeg_ package\n\nInstallation via PyPI using pip\n\n```\npip install stempeg\n```\n\n## Usage\n\nThere are very few freely available stem files. We included a small test track from the Canadian rock-band _The Easton Ellises_. The band [released them](https://www.heise.de/ct/artikel/c-t-Remix-Wettbewerb-The-Easton-Ellises-2542427.html) under Creative Commons license CC BY-NC-SA 3.0.\n\nTo use the included stem example you can use `stempeg.example_stem_path()`.\n\n### Reading stems\n\n```python\nimport stempeg\nS, rate = stempeg.read_stems(stempeg.example_stem_path())\n```\n\n`S` is the stem tensor that includes the time domain signals scaled to `[-1..1]`. The shape is `(stems, samples, channels)`.\n\n### Reading individual stem ids\n\nyou can read individual substreams of the stem file by passing the corresponding stem id (starting from 0):\n\n```python\nS, rate = stempeg.read_stems(stempeg.example_stem_path(), stem_id=[0, 1])\n```\n\n### Read excerpts (set seek position)\n\nto read an excerpt from the stem instead of the full file, you can provide start (`start`) and duration (`duration`) in seconds to `read_stems`:\n\n```python\nS, _ = stempeg.read_stems(stempeg.example_stem_path(), start=1, duration=1.5)\n# read from second 1.0 to second 2.5\n```\n\n### Improve performance\n\nif `read_stems` is called repeatedly, it always does two system calls, one for getting the [file info](https://github.com/faroit/stempeg/blob/a56349d2a8297ccf5db13712fc16048029503b26/stempeg/read.py#L120) and one for the [actual reading](https://github.com/faroit/stempeg/blob/a56349d2a8297ccf5db13712fc16048029503b26/stempeg/read.py#L160). To speed this up you could provide the `Info` object to `read_stems` if the number of streams, the number of channels and the samplerate is identical.\n\n```python\nfile_path = stempeg.example_stem_path()\ninfo = stempeg.Info(file_path)\nS, _ = stempeg.read_stems(file_path, info=info)\n```\n\n### Writing stems\n\nWriting stem files from a numpy tensor\n\n```python\nstempeg.write_stems(S, \"output.stem.mp4\", rate=44100)\n```\n\n> :warning: __Warning__: Muxing stems using _ffmpeg_ might lead to non-conform stem files. Please use MP4Box, if you need a reliable result.\n\n\n### Use the command line tools\n\n_stempeg_ provides a convenient cli tool to convert a stem to multiple wavfiles. The `-s` switch sets the start, the `-t` switch sets the duration.\n\n\n```bash\nstem2wav The Easton Ellises - Falcon 69.stem.mp4 -s 1.0 -t 2.5\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/faroit/stempeg", "keywords": "stems audio reader", "license": "", "maintainer": "", "maintainer_email": "", "name": "stempeg", "package_url": "https://pypi.org/project/stempeg/", "platform": "", "project_url": "https://pypi.org/project/stempeg/", "project_urls": { "Bug Reports": "https://github.com/faroit/stempeg/issues", "Homepage": "http://github.com/faroit/stempeg" }, "release_url": "https://pypi.org/project/stempeg/0.1.8/", "requires_dist": [ "numpy (>=1.6)", "soundfile (>=0.9.0)", "pytest ; extra == 'tests'" ], "requires_python": "", "summary": "Read and write stem multistream audio files", "version": "0.1.8" }, "last_serial": 5507723, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "f0cd5a90bfb4215dfdc8cfee81e4f034", "sha256": "04fb5ba15d5e2c179e2929ae9e0f489bf99767a8044dd2850e23c7ada59d713f" }, "downloads": -1, "filename": "stempeg-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f0cd5a90bfb4215dfdc8cfee81e4f034", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5841, "upload_time": "2017-12-17T19:54:49", "url": "https://files.pythonhosted.org/packages/11/a7/a70642acd3ee9b0e4ad87acbc20edb27163c0929ce345eaa88b4a2141ddd/stempeg-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9ae1c778edf1597ebdceec89324b04a0", "sha256": "ad68eba85768b05fc74a77622248208d7c2eb32837fececeb59f834a682825e0" }, "downloads": -1, "filename": "stempeg-0.1.1.tar.gz", "has_sig": false, "md5_digest": "9ae1c778edf1597ebdceec89324b04a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4951, "upload_time": "2017-12-17T19:54:50", "url": "https://files.pythonhosted.org/packages/84/31/4e761c631c14aa60a02b4e5cdd74fb7a1968286dd4e04f30c2e78b2558cd/stempeg-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "5944b5a082e2ad34c81520eaf68422ff", "sha256": "f4f9b8eaac994c8e643d40536c7650d54b32576472756f7169c78d9ff75b6786" }, "downloads": -1, "filename": "stempeg-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5944b5a082e2ad34c81520eaf68422ff", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6284, "upload_time": "2017-12-20T11:30:34", "url": "https://files.pythonhosted.org/packages/9d/a7/768e81274768dd4e27763df38cefeae6f1fc23d54531d7169ef8ba3b3756/stempeg-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "be392dbf4a75a9850622d4757643e8b0", "sha256": "c55bc725d4b109e6b632d071b6aea6b7f48eb8a149c6c45e1c66bd369eb4fb7a" }, "downloads": -1, "filename": "stempeg-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "be392dbf4a75a9850622d4757643e8b0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6281, "upload_time": "2017-12-20T11:30:36", "url": "https://files.pythonhosted.org/packages/53/cd/4605e433c62ea95a28314b0b1345e9a2ac0f600793accbb75d5c6e2df41a/stempeg-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "48a5ebe9967351f872cb3974eff0adeb", "sha256": "dbad2307f6a5de036c5b9d8d42830a787ca5e6343cb3f002a3774caf522359f2" }, "downloads": -1, "filename": "stempeg-0.1.2.tar.gz", "has_sig": false, "md5_digest": "48a5ebe9967351f872cb3974eff0adeb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5374, "upload_time": "2017-12-20T11:30:38", "url": "https://files.pythonhosted.org/packages/37/ae/6b447483a4149e7d3dced62867da70b161f9b6990bd5b7a93d2a71a5d95d/stempeg-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "8502d0165d9d6a2c734c7a6221ba5f17", "sha256": "03b88aef44a8f2bc3aa847ecbbef3092dff736c1e530ed89819b66414a085211" }, "downloads": -1, "filename": "stempeg-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8502d0165d9d6a2c734c7a6221ba5f17", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6670, "upload_time": "2018-02-18T16:55:23", "url": "https://files.pythonhosted.org/packages/11/b3/78a93f19f957c719e54ba0d66b2d87689755926f1dc69323123f666069c6/stempeg-0.1.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ce6a7574480078e074d855690bce9f2a", "sha256": "b63e147d0ab92ab4ec2d11a97ff8a8a4af4b247c147e27b267a31b923047f2c9" }, "downloads": -1, "filename": "stempeg-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "ce6a7574480078e074d855690bce9f2a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6665, "upload_time": "2018-02-18T17:00:08", "url": "https://files.pythonhosted.org/packages/d8/ad/bed4311fd8acccbcdd69545619f94239b4ac370731f2341231c9ff4bbdf6/stempeg-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8fd5ca80922501e6590a023ce435cebd", "sha256": "bc0e9fd4d3befb799baa8c59893ba18cecc74ba979aba99ca7d7470d5c08b989" }, "downloads": -1, "filename": "stempeg-0.1.3.tar.gz", "has_sig": false, "md5_digest": "8fd5ca80922501e6590a023ce435cebd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5663, "upload_time": "2018-02-18T17:01:44", "url": "https://files.pythonhosted.org/packages/08/3b/579a7bef93d729574fbe02064e0b6e6d2c2cfc545d064b4212b00721990c/stempeg-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "a8ceb92cde486776b07a465909ec73ed", "sha256": "58525f62b3f52fc121767fd8f148866c89177b9e04895bfd07c80b1d77d73b8a" }, "downloads": -1, "filename": "stempeg-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "a8ceb92cde486776b07a465909ec73ed", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6461, "upload_time": "2018-11-10T12:12:07", "url": "https://files.pythonhosted.org/packages/3b/a4/ec7276fadf549876591b149111b31c25914eda4d9448e1a3cc1c1d052ddc/stempeg-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "671ef07abd17dce42cc49afcbf191077", "sha256": "bab6ef47663a036a4abede243b1bfacfe5cac4e47795d2c11263f17430a0392c" }, "downloads": -1, "filename": "stempeg-0.1.4.tar.gz", "has_sig": false, "md5_digest": "671ef07abd17dce42cc49afcbf191077", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5754, "upload_time": "2018-11-10T12:12:08", "url": "https://files.pythonhosted.org/packages/61/a8/b9b1832dda7115d06034b749e4a8dc889d51376bff58bc6df30ec737d73a/stempeg-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "1bb723a0968524a384b2125e8e6d533a", "sha256": "6d4f330111331747746a0854c40922d84cdfb0619d8a45bbe50398e66a967ba0" }, "downloads": -1, "filename": "stempeg-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "1bb723a0968524a384b2125e8e6d533a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8773, "upload_time": "2019-03-13T16:28:54", "url": "https://files.pythonhosted.org/packages/e2/bf/2e1efff783f2999e0b2a6d8551120eb779f9c2160c194d86948da5b8ac63/stempeg-0.1.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7b7909daaa95d2633914c2f658d9781c", "sha256": "d2e50254f6af70bacc6535cedcc19da7696000d6b3639a72275cb73df2efb3f8" }, "downloads": -1, "filename": "stempeg-0.1.5.tar.gz", "has_sig": false, "md5_digest": "7b7909daaa95d2633914c2f658d9781c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7051, "upload_time": "2019-03-13T16:28:55", "url": "https://files.pythonhosted.org/packages/d9/cd/9b20414c759cf6eec6b9ab800cdfb6fb50bfdbbf0330a90b9fa1287bb55c/stempeg-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "eaaf673b2f6439a370ec2b35f2789501", "sha256": "68b2d8eafbd366d51d2d688c8ae04b45b8114a51640635bbacb1143d13d378c2" }, "downloads": -1, "filename": "stempeg-0.1.6-py3-none-any.whl", "has_sig": false, "md5_digest": "eaaf673b2f6439a370ec2b35f2789501", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 509270, "upload_time": "2019-03-13T22:57:45", "url": "https://files.pythonhosted.org/packages/cc/63/8bf9c09937348bf5594c3ff13f094bb35c8186266044ad9219bb931d8910/stempeg-0.1.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "80fb288c955e5166b943b76d29f2fbec", "sha256": "bfe22b83a9f585730f24bfab054c553ef3126c1ee687d59cd5cb62cd7a728476" }, "downloads": -1, "filename": "stempeg-0.1.6.tar.gz", "has_sig": false, "md5_digest": "80fb288c955e5166b943b76d29f2fbec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 510902, "upload_time": "2019-03-13T22:59:06", "url": "https://files.pythonhosted.org/packages/ba/fb/4e238141d3fcce0bf0607bcbe0ded6a85d6227facd62e9dfc40beec52e84/stempeg-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "d9a7e0640ae3110439294e67bc7a6a40", "sha256": "cc4a8c01c1120f4726a5d0fdec6d4f49a97c2bc6ad3b9013d1662baa9b4df7a0" }, "downloads": -1, "filename": "stempeg-0.1.7-py3-none-any.whl", "has_sig": false, "md5_digest": "d9a7e0640ae3110439294e67bc7a6a40", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 509693, "upload_time": "2019-07-08T11:13:53", "url": "https://files.pythonhosted.org/packages/69/fc/362ddb5a4733d6935bfac04f81310bb88a0fcd2bafa60bd62065781c234f/stempeg-0.1.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4276c1963b3f928bcdead3943d91a755", "sha256": "e0c9756a898458963eaab87418be1065b869e3d075d69be81f02a752a77c2aa8" }, "downloads": -1, "filename": "stempeg-0.1.7.tar.gz", "has_sig": false, "md5_digest": "4276c1963b3f928bcdead3943d91a755", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 511364, "upload_time": "2019-07-08T11:13:55", "url": "https://files.pythonhosted.org/packages/d7/ae/de45dab47565021d160139aa57521075919720064dd495170499258669f7/stempeg-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "89f530a699e632d1ae069ae77569f122", "sha256": "3b999c4a84704d8546bb47df74b0b3e6a4cd544bb7e6abb382aae94789eb0c46" }, "downloads": -1, "filename": "stempeg-0.1.8-py3-none-any.whl", "has_sig": false, "md5_digest": "89f530a699e632d1ae069ae77569f122", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 509787, "upload_time": "2019-07-09T15:20:54", "url": "https://files.pythonhosted.org/packages/29/ab/6e7362cbff21c25e99cfc3ef116057a7f9ebe6f429a44038eef82de3479d/stempeg-0.1.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "40ae4f656945ead28922cdb7d22001f0", "sha256": "f2266ad32d4e4ff3a936279b62a48ba58e6ada32f0e5ee53f4968877c0148136" }, "downloads": -1, "filename": "stempeg-0.1.8.tar.gz", "has_sig": false, "md5_digest": "40ae4f656945ead28922cdb7d22001f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 511467, "upload_time": "2019-07-09T15:20:56", "url": "https://files.pythonhosted.org/packages/f5/dc/b37d98b2532aadfbf941695d6663ff0b54103795223cea8c17bf91a55183/stempeg-0.1.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "89f530a699e632d1ae069ae77569f122", "sha256": "3b999c4a84704d8546bb47df74b0b3e6a4cd544bb7e6abb382aae94789eb0c46" }, "downloads": -1, "filename": "stempeg-0.1.8-py3-none-any.whl", "has_sig": false, "md5_digest": "89f530a699e632d1ae069ae77569f122", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 509787, "upload_time": "2019-07-09T15:20:54", "url": "https://files.pythonhosted.org/packages/29/ab/6e7362cbff21c25e99cfc3ef116057a7f9ebe6f429a44038eef82de3479d/stempeg-0.1.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "40ae4f656945ead28922cdb7d22001f0", "sha256": "f2266ad32d4e4ff3a936279b62a48ba58e6ada32f0e5ee53f4968877c0148136" }, "downloads": -1, "filename": "stempeg-0.1.8.tar.gz", "has_sig": false, "md5_digest": "40ae4f656945ead28922cdb7d22001f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 511467, "upload_time": "2019-07-09T15:20:56", "url": "https://files.pythonhosted.org/packages/f5/dc/b37d98b2532aadfbf941695d6663ff0b54103795223cea8c17bf91a55183/stempeg-0.1.8.tar.gz" } ] }