- Add new parameter
gain_during_overlay
topydub.AudioSegment.overlay
which allows users to adjust the volume of the target AudioSegment during the portion of the segment which is overlaid with the additional AudioSegment. pydub.playback.play()
No longer displays the (very verbose) playback "banner" when using ffplay- Fix a confusing error message when using invalid crossfade durations (issue #193)
- Allow codec and ffmpeg/avconv parameters to be set in the
pydub.AudioSegment.from_file()
for more control while decoding audio files - Allow
AudioSegment
objects with more than two channels to be split usingpydub.AudioSegment().split_to_mono()
- Add support for inverting the phase of only one channel in a multi-channel
pydub.AudioSegment
object - Fix a bug with the latest avprobe that broke
pydub.utils.mediainfo()
- Add tests for webm encoding/decoding
- Add a new constructor:
pydub.AudioSegment.from_mono_audiosegments()
which allows users to create a multi-channel audiosegment out of multiple mono ones. - Refactor
pydub.AudioSegment._sync()
to support an arbitrary number of audiosegment arguments.
- Add the ability to add a cover image to MP3 exports via the
cover
keyword argument topydub.AudioSegment().export()
- Add
pydub.AudioSegment().get_dc_offset()
andpydub.AudioSegment().remove_dc_offset()
which allow detection and removal of DC offset in audio files. - Minor fixes for windows users
- Make
pydub.AudioSegment()._spawn()
accept array.array instances containing audio samples
- Make
pydub.AudioSegment()
objects playable inline in ipython notebooks. - Add scipy powered high pass, low pass, and band pass filters, which can be high order filters (they take
order
as a keyword argument). They are used forpydub.AudioSegment().high_pass_filter()
,pydub.AudioSegment().low_pass_filter()
,pydub.AudioSegment().band_pass_filter()
when thepydub.scipy_effects
module is imported. - Fix minor bug in
pydub.silence.detect_silence()
- Update
pydub.AudioSegment()._spawn()
method to allow user subclassing ofpydub.AudioSegment
- Add a workaround for incorrect duration reporting of some mp3 files on macOS
- Add support for radd (basically, allow
sum()
to operate on an iterable ofpydub.AudioSegment()
objects) - Fix bug in 24-bit wav support (understatement. It didn't work right at all the first time)
- Add support for python 3.5 (overstatement. We just added python 3.5 to CI and it worked 😄)
- Add native support for 24-bit wav files (ffmpeg/avconv not required)
- Fix bug where you couldn't directly instantiate
pydub.AudioSegment
withbytes
data in python 3
- pydub will use any ffmpeg/avconv binary that's in the current directory (as reported by
os.getcwd()
) before searching for a system install
- Make it easier to instantiate
pydub.AudioSegment()
directly when creating audio segments from raw audio data (without having to write it to a file first) - Add
pydub.AudioSegment().get_array_of_samples()
method which returns the samples which make up an audio segment (you should usually prefer this overpydub.AudioSegment().raw_data
) - Add
pydub.AudioSegment().raw_data
property which returns the raw audio data for an audio segment as a bytes (python 3) or a bytestring (python 3) - Allow users to specify frame rate in
pydub.AudioSegment.silent()
constructor
- Add support for RAW audio (basically WAV format, but without wave headers)
- Add a new exception
pydub.exceptions.CouldntDecodeError
to indicate a failure of ffmpeg/avconv to decode a file (as indicated by ffmpeg/avconv exit code)
- Fix a bug in python 3.4 which failed to read wave files with no audio data (should have been audio segments with a duration of 0 ms)
- Fix a bug in
pydub.utils.mediainfo()
that caused inputs containing unescaped characters to raise a runtime error (inputs are not supposed to require escaping)
- Rename
pydub.AudioSegment().set_gain()
topydub.AudioSegment().apply_gain_stereo()
to better reflect it's place in the world (as a counterpart topydub.AudioSegment().apply_gain()
)
- Add
pydub.AudioSegment().pan()
which returns a new stereo audio segment panned left/right as specified.
- Add a logger,
"pydub.converter"
which logs the ffmpeg commands being run by pydub. - Add
pydub.AudioSegment().split_to_mono()
method which returns a list of mono audio segments. One for each channel in the original audio segment. - Fix a bug in
pydub.silence.detect_silence()
which caused the function to break when a silent audio segment was equal in length to the minimum silence length. It should report a single span of silence covering the whole silent audio segment. Now it does. - Fix a bug where uncommon wav formats (those not supported by the stdlib wave module) would throw an exception rather than converting to a more common format via ffmpeg/avconv
- Add
pydub.AudioSegment().max_dBFS
which reports the loudness (in dBFS) of the loudest point (i.e., highest amplitude sample) of an audio segment
- Overhaul Documentation
- Improve performance of
pydub.AudioSegment().overlay()
- Add
pydub.AudioSegment().invert_phase()
which (shocker) inverts the phase of an audio segment - Fix a type error in
pydub.AudioSegment.get_sample_slice()
- Add
pydub.generators
module containing simple signal generation functions (white noise, sine, square wave, etc) - Add a
loops
keyword argument topydub.AudioSegment().overlay()
which allows users to specify that the overlaid audio should be repeated (i.e., looped) a certain number of times, or indefinitely
- Fix a bug in db_to_float() where all values were off by a factor of 2
- Allow users to set the location of their converter by setting
pydub.AudioSegment.converter = "/path/to/ffmpeg"
and added a shim to support the old method of assigning topydub.AudioSegment.ffmpeg
(which is deprecated now that we support avconv)
- Add support for Python 3.4
- Audio files opened with format "wave" are treated as "wav" and "m4a" are treated as "mp4"
- Add
pydub.silence
module with simple utilities for detecting and removing silence. - Fix a bug affecting auto-detection of ffmpeg/avconv on windows.
- Fix a bug that caused pydub to only work when ffmpeg/avconv is present (it should be able to work with WAV data without any dependencies)
- Add a runtime warning when ffmpeg/avconv cannot be found to aid debugging
- Added support for pypy (by reimplementing audioop in python). Also, we contributed our implementation to the pypy project, so that's 💯
- Add support for avconv as an alternative to ffmpeg
- Add a new helper module
pydub.playback
which allows you to quickly listen to an audio segment using ffplay (or avplay) - Add new function
pydub.utils.mediainfo('/path/to/audio/file.ext')
which reports back the results of ffprobe (or avprobe) including codec, bitrate, channels, etc