Releases: faroit/stempeg
stempeg 0.2.3
Version 0.2 is a rewrite of stempeg
that focusses on speed and performance but also adding a number of additional features.
Furthermore, stempeg
now can read and write stem files in three different ways to utilize best the different audio containers. For example, as pcm/wav
doesn't support multiple audio streams, instead, stempeg
can read and write into streams aggregated into multiple pairs of stereo channels.
Audio Loading
- Underlying reading backend is now based on python-ffmpeg.
- With this new backend, the creation of any temporary files is reduced, thus audio is directly piped into numpy via stdio. This leads to loading time improvement of 20%-30%.
- A target sample rate can be specified to resample audio on-the-fly using ffmpeg.
- An optional
stems_from_multichannel
was added to load stems that are aggregated into multichannel audio (concatenation of pairs of stereo channels), see more info on audio writing. - substream titles metadata can be read from the Info object.
- Loading audio now uses the same API as in spleeters audio loading backend.
Audio Writing
This new version stabilizes writing support adding writer
methods to be passed to stempeg.write_stems()
to save multi-stream audio.
The choice of the writing method mainly depends on the audio container and codec. E.g. some containers supports multiple stems (mp4/m4a
, opus
, mka
) where as others does do not (wav
, mp3
...).
stempeg.FilesWriter
saves stems into multiple files. This writer can be boosted in performance usingmultiprocess=True
. Which writes the stems in parallel.stempeg.ChannelsWriter
saves as multiple channels. Stems will be multiplexed into channels and saved as a single
multichannel file. E.g. anaudio
tensor ofshape=(stems, samples, 2)
will be converted to a single-stem multichannel audio
(samples, stems*2)
.stempeg.StreamsWriter
saves into a single a multi-stream file.stempeg.NIStemsWriter
saves into a single multistream audio. Finally one can create stems files that are fully compatible with Native Instruments stems. For this, MP4Box has to be installed. See more info here.
Furthermore the following features were added:
- Names for each substream can now be embedded into metadata.
stempeg
can be used to just write normal audio files (mono and multichannel) usingwrite_audio
which also is fully API compatible to spleeters audio backend.
For more information see the updated documentation
Thanks to @mmoussallam, @romi1502, @Rhymen, @nlswrnr, and @axeldelafosse
...Another bugfix release
The seeking issue (#21) was not fully fixed. This release should address the remaining issues when using the chunked loading using very small float numbers as start parameter
Bugfix release
Demo Track
- a demo track is now part of stempeg for convenience
stem, rate = stempeg.read_stems(stempeg.example_stem_path())
Seek it!
Fixed out_type
There was a bug in the earlier versions of stempeg that didn't respect the set out_type
in the stem reader. This was fixed and the output defaults to np.float64
.
Thanks to
@hexafraction
Add warnings if ffmpeg version is older than 3.0
Add some code and warnings to detect the ffmpeg version and warn users when a version older than 3.0 is used since that is adding additional silence to the output files when encoding.
Also addressing #3
Check for available AAC codecs
this release fixes #1 by checking the available ffmpeg encoders and picking aac
ist libfdk_aac
is not available.
Also the ffmpeg error now are visible
initial release after some debugs
v0.1.1 update version