-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read Cues from Serato MP3 Tags #2526
Read Cues from Serato MP3 Tags #2526
Conversation
7ed1cb3
to
6287684
Compare
src/track/serato/tags.cpp
Outdated
switch (timingShiftCase) { | ||
#if defined(__MAD__) | ||
case EXIT_CODE_CASE_D: | ||
timingOffset = -16; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ywwg Here's an example how to set timing offsets btw.
Unrelated warning:
|
I have some ideas how to explicitly handle the discrepancy between file tags and stream properties of track objects. Stay tuned. |
Has anyone looked into the cue offset issues with this? @ehendrikd maybe you could help? If you don't want to directly work on this, maybe sending @Holzhaus the audio files you tested with Rekordbox and Mixxx would be helpful. |
Here is a selection of known MP3 offset issue tracks, categorized in to cases A, B, C and D: https://github.com/pestrela/music/tree/master/traktor/26ms_offsets/examples_tagged As per ABCD cases defined here: digital-dj-tools/dj-data-converter#3 And this was the final algorithm I settled on: mixxx/src/library/rekordbox/rekordboxfeature.cpp Line 1045 in 78a8640
|
Sorry, but the Xenial issues are blocking me. I will not introduce more workarounds and make unnecessary compromises. |
Why is a commented feature a beta blocker? |
I checked and the offset seems to be -18 ms in all cases for the MAD decoder on linux. Can someone check the other offsets? I don't have a mac and my windows VM is too slow for audio playback on Serato for some reason. If you want to test, you need to apply this patch first: diff --git a/CMakeLists.txt b/CMakeLists.txt
index 912c3d2a6f..d99fd3741e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -730,6 +730,7 @@ add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL
set_target_properties(mixxx-lib PROPERTIES AUTOMOC ON AUTOUIC ON)
target_include_directories(mixxx-lib PUBLIC src "${CMAKE_CURRENT_BINARY_DIR}/src")
target_compile_definitions(mixxx-lib PRIVATE SETTINGS_FILE="mixxx.cfg")
+target_compile_definitions(mixxx-lib PUBLIC __EXTRA_METADATA__)
if(UNIX AND NOT APPLE)
target_compile_definitions(mixxx-lib PRIVATE SETTINGS_PATH=".mixxx/")
endif() |
@JosepMaJAZ maybe you could test on Windows? @ferranpujolcamins could you test on macOS? Serato DJ Lite does not cost any money and doesn't require any Serato specific hardware. Can we clarify how exactly to test? Load each file from https://github.com/pestrela/music/tree/master/traktor/26ms_offsets/examples_tagged into Serato, set a cue point on each, then use this branch to import into Mixxx? How are you determining the timing offsets? The deck display in Mixxx is only precise to 10 ms. |
And maybe also test it with ffmpeg for mp3 and aac? |
I set cue points in serato and checked visually if they are at the correct position in Mixxx. I wasn't aware that the waveform display is not accurate. Is there a better way do this? |
How did you compare to determine 18 ms is the offset? Did you write code to guess and check until the waveforms looked exactly the same? |
@Holzhaus you can test for the FFMPEG decoder on Linux by editing |
We use libmad (SoundSourceMp3) for both Linux and Windows, right? So I don't anticipate any difference between Linux and Windows. On macOS we use SoundSourceCoreAudio for MP3 so we do need someone with a Mac to test that. Judging from the offsets for Rekordbox, it is likely CoreAudio will not be the same as libmad. |
it looked like it was designated such from the project page. @Holzhaus would it be ok to take this off the beta-blocking list? |
My understanding is that there is only a little bit left to do here to correct the cue offsets (correct me if I am wrong). The hard work of reverse engineering the file tags is already merged. I think it would be a shame to release this feature in a half-baked state with the Serato library support for playlists without being able to read Serato cues. Releasing it in that state would raise the hopes of lots of people who would quickly be disappointed because it isn't practically all that beneficial. It would also be a shame to disable the Serato library feature to avoid disappointing those users. So I think we should push to finish this last part for the 2.3 beta release. |
|
Shouldn't we get rid of the |
Your documentation says AIFF uses the same ID3 tags as MP3. Does this PR also work for AIFF files? |
I have no idea, I converted the a file into all supported formats, loaded them in Serato and had a quick glance at the tags written. I didn't really try to reverse them. |
AIFF files could have ID3v2 tags or RIFF tags. For ID3v2 tags it works, for RIFF tags no. I could check if Serato is writing its markers into RIFF INFO tags. |
I guess the lack of Windows/OSX testers is probably due to the buggy waveforms. Until that is fixed, can at least someone check the offsets on Linux? Or shall we postpone this to 2.4? I feel like we're not making progress here. |
@bengl3rt will you have time to find the offsets for macOS soon? |
Great, thanks for taking this up @ehendrikd. Yes, make a PR for @Holzhaus's fork. Please leave a comment here with a link to your PR so all Mixxx contributors can find it. |
Think I have the offsets set for CoreAudio. Holzhaus#4 |
…coreaudio CoreAudio MP3 offsets for Serato cues
Ready for merge? |
No windows offsets yet. Also, I'd really like someone to verify my Linux findings. It's strange that all values are the same... |
Mixxx uses libmad (SoundSourceMP3) on both Windows and Linux, so the offsets should be the same on both. Can you confirm that is correct, @uklotzde? |
It's possible that Serato also uses libmad which is why there are no offsets to correct for on Linux and Windows. From the MAD homepage:
|
@Holzhaus maybe you could do a little digging to search for libmad symbols in the Serato binary? |
Ha! What an interesting find. In the "Applications Using MAD" section on the libMAD homepage, it lists Stanton Final Scratch Live, one of the first DVS programs first released in 2004. Serato Scratch Live was also first released in 2004, so it wouldn't surprise me if they also bought a proprietary license for libMAD around the same time. |
That's correct. |
Ok, then lets merge and I'll rebase #2673 on master for the loop import. |
This is based on PRs #2499 and #2523.