faroit / stempeg

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

Add stem file created with NI stem creator (mp4box) #32

Closed axeldelafosse closed 3 years ago

axeldelafosse commented 4 years ago

Compatible with Traktor:

Screen Shot 2020-06-06 at 2 59 50 PM Screen Shot 2020-06-06 at 3 01 45 PM
faroit commented 4 years ago

Great, thanks!

axeldelafosse commented 4 years ago

Yes, ALAC is supported. I used a slightly modified version of https://github.com/axeldelafosse/stemgen to generate the files. The file is bigger but it's lossless. I actually don't mind having bigger files. I guess it should be an option, we need to keep this in mind.

faroit commented 4 years ago

Okay, I will add ALAC support to the unit tests later. For now, lets try to keep the repo-size down and just go with m4a, please

axeldelafosse commented 4 years ago

OK. Just to be sure, you want me to replace the current stem.mp4 file with the new stem.m4a aac file?

faroit commented 4 years ago

Yep. If you want to keep m4a instead of mp4, thats also fine. In that case change the unit test paths

axeldelafosse commented 4 years ago

Cool. Done!

faroit commented 4 years ago

weird, this new file doesn't seem to be able to be able to get demuxed with quicklook on OSX (See https://github.com/faroit/stempeg/issues/22). Maybe we need a combination the current and the new method to cover more broad playback support (quicktime, vlc, ffmpeg and traktor)

faroit commented 4 years ago

Your file is significantly larger than the old one. Does the stem creator use different bitrate settings? (I used 256kbit CBR AAC)

axeldelafosse commented 4 years ago

weird, this new file doesn't seem to be able to be able to get demuxed with quicklook on OSX (See #22). Maybe we need a combination the current and the new method to cover more broad playback support (quicktime, vlc, ffmpeg and traktor)

Yeah this feature can be useful! Didn't knew about it.

Your file is significantly larger than the old one. Does the stem creator use different bitrate settings? (I used 256kbit CBR AAC)

No it's 256kbit too: https://github.com/axeldelafosse/stemgen/blob/master/ni-stem/_internal.py#L110

Digging in, I realized that the stem creator convert each stem to .m4a using afconvert before creating the file with mp4box.

I double checked and it's weird but the file is 238kbit:

Screen Shot 2020-06-06 at 9 28 31 PM

Your old file is 129kbit:

Screen Shot 2020-06-06 at 9 53 21 PM

Any idea why?

faroit commented 3 years ago

coming back to this, i noticed that your file does not allow to switch substreams on the OSX default player (See #22). So, it looks like there are good reasons for stems created using mp4box (NI/Traktor compatibility) or ffmpeg (general better compatibility). Therefore, I want to allow mp4box optionally and not replace the ffmpeg way of exporting

@axeldelafosse can you rename your exported files so we have

in addition to

Also

faroit commented 3 years ago

@axeldelafosse would you mind looking into this again? thanks so much!

axeldelafosse commented 3 years ago

Yeah sure -- sorry for the delay. Can you share the MUSDB18 colors here please?

faroit commented 3 years ago

Yeah sure -- sorry for the delay. Can you share the MUSDB18 colors here please?

dito ;-)

the musdb18 colors are:

vocals #56B4E9
drums #009E73
bass #D55E00
other #CC79A7
axeldelafosse commented 3 years ago

Here we go

faroit commented 3 years ago

the file is included in #28 . closing this out now