faroit / stempeg

Python I/O for STEM audio files
https://faroit.github.io/stempeg
MIT License
96 stars 13 forks source link

evaluate `filter_complex` #17

Closed faroit closed 4 years ago

faroit commented 5 years ago

currently stempeg loads stems by

For each stream extraction a os.call is used. For small files this could slows down stempeg loading significantly.

Alternatively we can also use ffmpegs amerge filter to merge several input stream into a single stream with multiple channels.

eg.

-filter_complex', "[0:0][0:1][0:2][0:3][0:4] amerge=inputs=5 merges the 5 streams in a stem file into a 10channel stream. This reduces os.calls and should make reading faster... given the filter implementation is efficiently done in C.

faroit commented 4 years ago

It turned out that complex filters are slow.