Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

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:

https://www.xiph.org/downloads/

Release History

Release History

This version
History Node

0.3

History Node

0.2

History Node

0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pyrogg-0.3-cp26-cp26m-manylinux1_i686.whl (336.9 kB) Copy SHA256 Checksum SHA256 cp26 Wheel Oct 22, 2017
pyrogg-0.3-cp26-cp26m-manylinux1_x86_64.whl (375.7 kB) Copy SHA256 Checksum SHA256 cp26 Wheel Oct 22, 2017
pyrogg-0.3-cp26-cp26mu-manylinux1_i686.whl (336.9 kB) Copy SHA256 Checksum SHA256 cp26 Wheel Oct 22, 2017
pyrogg-0.3-cp26-cp26mu-manylinux1_x86_64.whl (375.7 kB) Copy SHA256 Checksum SHA256 cp26 Wheel Oct 22, 2017
pyrogg-0.3-cp27-cp27m-manylinux1_i686.whl (337.0 kB) Copy SHA256 Checksum SHA256 cp27 Wheel Oct 22, 2017
pyrogg-0.3-cp27-cp27m-manylinux1_x86_64.whl (375.7 kB) Copy SHA256 Checksum SHA256 cp27 Wheel Oct 22, 2017
pyrogg-0.3-cp27-cp27mu-manylinux1_i686.whl (337.0 kB) Copy SHA256 Checksum SHA256 cp27 Wheel Oct 22, 2017
pyrogg-0.3-cp27-cp27mu-manylinux1_x86_64.whl (375.7 kB) Copy SHA256 Checksum SHA256 cp27 Wheel Oct 22, 2017
pyrogg-0.3-cp33-cp33m-manylinux1_i686.whl (339.1 kB) Copy SHA256 Checksum SHA256 cp33 Wheel Oct 22, 2017
pyrogg-0.3-cp33-cp33m-manylinux1_x86_64.whl (377.4 kB) Copy SHA256 Checksum SHA256 cp33 Wheel Oct 22, 2017
pyrogg-0.3-cp34-cp34m-manylinux1_i686.whl (339.0 kB) Copy SHA256 Checksum SHA256 cp34 Wheel Oct 22, 2017
pyrogg-0.3-cp34-cp34m-manylinux1_x86_64.whl (377.5 kB) Copy SHA256 Checksum SHA256 cp34 Wheel Oct 22, 2017
pyrogg-0.3-cp35-cp35m-manylinux1_i686.whl (340.0 kB) Copy SHA256 Checksum SHA256 cp35 Wheel Oct 22, 2017
pyrogg-0.3-cp35-cp35m-manylinux1_x86_64.whl (378.4 kB) Copy SHA256 Checksum SHA256 cp35 Wheel Oct 22, 2017
pyrogg-0.3-cp36-cp36m-manylinux1_i686.whl (341.2 kB) Copy SHA256 Checksum SHA256 cp36 Wheel Oct 22, 2017
pyrogg-0.3-cp36-cp36m-manylinux1_x86_64.whl (378.6 kB) Copy SHA256 Checksum SHA256 cp36 Wheel Oct 22, 2017
pyrogg-0.3.tar.gz (65.0 kB) Copy SHA256 Checksum SHA256 Source Oct 22, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting