faroit / stempeg

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

Added _read_mp4box_stem_titles function #46

Open naba89 opened 1 year ago

naba89 commented 1 year ago

Basically, for stems which have been created by the NI creator have the titles of the streams in the udta metadata.

I added the functionality to try to read the stream titles if MP4Box is available, else fall back to original default numbered streams.

This is useful if you want to extract wav files using the stem2files, and instead of getting filenames like "stem_0.wav", you can get "Drums.wav" or "Vox.wav" if this information is available in the stem files.

The code is taken almost verbatim from the StemMetadataViewer class in https://github.com/axeldelafosse/stemgen/blob/master/ni-stem/_internal.py

axeldelafosse commented 1 year ago

Nice!

naba89 commented 1 year ago

I added sudo apt-get update to fix the previous issue of 404 errors while installing apt-get packages.

But still, the CI failed with some errors in FFmpeg unable to find x264 libraries. ffprobe: error while loading shared libraries: libx264.so.138: cannot open shared object file: No such file or directory

axeldelafosse commented 1 year ago

@faroit sorry for the ping -- can you have a look when you have some free time please? 🙏