Recode Ogg-Vorbis files to a different quality level
Project description
What is it?
pyrogg is a simple recoding library for Ogg-Vorbis audio files, implemented in Cython. It reads Vorbis streams from the provided input files and recodes them to the desired quality level (-1 … 10). It comes with a handy command line interface.
Example
Command line usage:
$ recode.py -d outputdir --quality=1 --parallel=3 input1.ogg input2.ogg input3.ogg
Python usage:
>>> from pyrogg import VorbisFileRecoder >>> rec = VorbisFileRecoder("input.ogg") >>> time = rec.recode("output.ogg", quality=1)
Since the time used for decoding is substantially lower than that used for encoding, you might want to set the following environment variable to avoid busy waiting OpenMP threads:
OMP_WAIT_POLICY=PASSIVE
Why would I use it?
It can recode files on the file-system as well as file-like objects.
It uses OpenMP to decode and encode an input stream in parallel, as well as multiprocessing to recode multiple files in parallel. So it can use all resources that your machine can provide, which makes it pretty fast.
Parallel recoding of separate input files is thread-safe and frees the GIL.
Why would I not use it?
Currently, error handling isn’t very elaborate, so unexpected errors may crash your system. This should be easy to fix with a little work, and help on this is certainly appreciated. (Fear not, it’s written in Cython, not C.)
It’s not meant to recode streams on the fly, just files and file-like objects. Currently, input files/objects must allow random access through seek(). This should be fixable.
How can I install it?
Using pip:
pip install pyrogg
Note that this will do a source build, so you need a properly configured C compiler on your system that can build Python extension modules, as well as the library packages libogg, libvorbis, and their corresponding development packages. Most operating systems (including all commonly used Linux distributions) will allow you to install them via the normal package management tool. For the development packages, look for packages called libogg-dev or libogg-devel.
For Windows and MacOS, however, you need to install them manually. See here:
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 Distributions
Hashes for pyrogg-0.2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffeda8ddf4cd29f86fe8f29e14669d23fe7ee069cd61f60a41b3a6b1eae47bea |
|
MD5 | 116b8460174c3134833d740a88aaf137 |
|
BLAKE2b-256 | 86fdae50ca726495e4fbcac879b9077072ff851eabf72606185f832756319d79 |
Hashes for pyrogg-0.2-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99dc06931f1a84c0dfd2155253e7a7de1387efcf31f86ee5de77b28875efbdb8 |
|
MD5 | 0f13e1735cb81f09973f30aa554cdf29 |
|
BLAKE2b-256 | 6aa9eb31a2e9c7c980e1d75110ccce94631e277bd6a947277520f6f441bf5e1e |
Hashes for pyrogg-0.2-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a57abb7b7ea9a1fde4f183420798ebacd123c4aea6cf31811c75acbaf7dc2c1 |
|
MD5 | 376ad8fe32bdbe406681e77d2b00462c |
|
BLAKE2b-256 | 606184804263851371fd9ce06155575798711042683f9247ff55116754f272e3 |
Hashes for pyrogg-0.2-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f44f90dfe117b23fe3a9c32c23d225d38fc0d333efe24a3f3c6448f4e98c7214 |
|
MD5 | 22c4e09ab490460f3b079ad045a63dba |
|
BLAKE2b-256 | 7cbee5e6a3eef3d0dab889c6099a37f08c11b7a70a788fe6853684462e36f720 |
Hashes for pyrogg-0.2-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2a1fe9e8b340c58955d124bb39e7d2f59a43ee8300aa0c00edb03a2c7081932 |
|
MD5 | cf78c2609cc6cdc8667558f1d5cc900f |
|
BLAKE2b-256 | 168e2ff5de59c12ad7ffee47b9da15f340a2250bf5b07c94dfecec1c662fef01 |
Hashes for pyrogg-0.2-cp34-cp34m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce1197a9465a4332056b84dcfd728d37629acaf511c0f4ee83241d07430af5f1 |
|
MD5 | efbf096f114daa31f61d200b3821f949 |
|
BLAKE2b-256 | 880e0866d775663bc4252e8c08b650dec446b750eeb400e1e2d732f7fa36bf1d |
Hashes for pyrogg-0.2-cp33-cp33m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | acd3ca9f38e5cc5060ad8f5f2bc0f050632a7412a208dd20cbdeaf18730f4f08 |
|
MD5 | 47f85bf4f09339b4e0c81a9721e0a0b7 |
|
BLAKE2b-256 | ccd51798ea467b265fe68361054ed62982e2dce0c9133326dc135a5a1306cb65 |
Hashes for pyrogg-0.2-cp33-cp33m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04dd39f4944ce9a1bbd80d12b0ca924ef1e642ec1bc638dfecf121189511a151 |
|
MD5 | 987f1fb6fa9af7c30f3f24d892f8b76e |
|
BLAKE2b-256 | 69a4776df314e93bb87aee335578e994fefb00cf14bf3826af587476dcbf1359 |
Hashes for pyrogg-0.2-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f665ace2430d7c230dee0723b42a5703ed31f211ac5849217b90dcd6e6f5c549 |
|
MD5 | 9a17b8c7b0174c12a976ac54aeaea37e |
|
BLAKE2b-256 | b3a0495ff44ea409305509dd61485d7516eb424b595ef1b9fd69b0eb0301905e |
Hashes for pyrogg-0.2-cp27-cp27mu-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67be6231d47a7a42662e62ed0b6b274f8a1023960ddb882608117cfd473d7365 |
|
MD5 | baed155cbe6b2c52665d91f3f65c39e1 |
|
BLAKE2b-256 | 70ae503a9ed55f9251ba6743de70cc8520a79546af2e8aea0739b827970da7e0 |
Hashes for pyrogg-0.2-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20e2ffe4016168f569627850fa75d367f78900118f591ae21b98710167aec607 |
|
MD5 | 29a483287454b7ca714bbac9a9aea16f |
|
BLAKE2b-256 | 547a091dde72512ad07bc9fd02f0e30c3f8ba98266038e56a6ad8acc2e59b05a |
Hashes for pyrogg-0.2-cp27-cp27m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de1a9628eec4e0b20860c0a6aa63d960f0c6c85a280cfd75b47888fd77a49926 |
|
MD5 | 12dd8a708a97a9e1ce0ec201f1bd2f87 |
|
BLAKE2b-256 | 9cc45ec539758635b96315deafbf18f7f5be56411fdba7963479d230923c7176 |
Hashes for pyrogg-0.2-cp26-cp26mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e58a5f0824be3594a514d82d38d194cbe447a94eebd4518ba868ed68b7953022 |
|
MD5 | 7d7ed12f2350a001db697fa5f299265d |
|
BLAKE2b-256 | 53f29b5afc6b8587f903c719a17591e10554f8ef3e2d1f00802b59ec2da85464 |
Hashes for pyrogg-0.2-cp26-cp26mu-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 402bf68bec89c488462f494c9dedc34ca5ba409d68ae96cdf60c7775e867e272 |
|
MD5 | 69f67d6066c10fb58c153870cb3f109f |
|
BLAKE2b-256 | 24ab682ec340c2e27956f8d121299e1ad24c0a26a7436f279794f2bef68466ce |
Hashes for pyrogg-0.2-cp26-cp26m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19e10854686b9488dc9967f168df5c4c2962dd4f2dac5da534a4a0d5ea2e30e6 |
|
MD5 | 050cb966c354bc81fd01806a61ce901e |
|
BLAKE2b-256 | cff37c0cbbef40f0cb04b9885eec36c2d164052c7b4eef265bc6854a57c92a21 |
Hashes for pyrogg-0.2-cp26-cp26m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31770d9f6a69f4fe95ac29dd2b637c60311c5e7802299d30363e0bdce0b14c9a |
|
MD5 | 178e3c6f502e9a1a085c7c4960d2df5a |
|
BLAKE2b-256 | 09d462fc7ed7de613c16267b3eb24dab2f491ba8c4d76e633e3c2f9ba9fac315 |