Skip to content
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

Improve STEM support on Windows and Mac #14392

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

acolombier
Copy link
Member

Waiting for mixxxdj/vcpkg#153

@acolombier acolombier force-pushed the chore/stem-on-win-and-macos branch from e0577b5 to 4aaffd9 Compare February 22, 2025 17:06
@@ -116,13 +116,28 @@ bool StemInfoImporter::maybeStemFile(
mimeType = QMimeDatabase().mimeTypeForFile(
fileName, QMimeDatabase::MatchContent);
}

// On Windows (at least), the MIME detection seems to sometime detect stem file
// as `video/quicktime` so we always try and detect from the extension
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, have you an Idea why this happens and why it happens only on windows?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you share such a file?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, no idea. This is the ffprobe of the file I used for testing

ffprobe version 7.0.2 Copyright (c) 2007-2024 the FFmpeg developers
  [...]
  libavutil      59.  8.100 / 59.  8.100
  libavcodec     61.  3.100 / 61.  3.100
  libavformat    61.  1.100 / 61.  1.100
  libavdevice    61.  1.100 / 61.  1.100
  libavfilter    10.  1.100 / 10.  1.100
  libswscale      8.  1.100 /  8.  1.100
  libswresample   5.  1.100 /  5.  1.100
  libpostproc    58.  1.100 / 58.  1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/antoine/Music/Stems/Afroki - Save My Soul (feat. Jordan Grace).stem.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf58.76.100
  Duration: 00:03:28.04, start: 0.000000, bitrate: 1287 kb/s
  Stream #0:0[0x1](und): Audio: aac (libfdk_aac) (mp4a / 0x6134706D), 44100 Hz, stereo, s16, 255 kb/s (default)
      Metadata:
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](und): Audio: aac (libfdk_aac) (mp4a / 0x6134706D), 44100 Hz, stereo, s16, 256 kb/s
      Metadata:
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]
  Stream #0:2[0x3](und): Audio: aac (libfdk_aac) (mp4a / 0x6134706D), 44100 Hz, stereo, s16, 255 kb/s
      Metadata:
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]
  Stream #0:3[0x4](und): Audio: aac (libfdk_aac) (mp4a / 0x6134706D), 44100 Hz, stereo, s16, 256 kb/s
      Metadata:
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]
  Stream #0:4[0x5](und): Audio: aac (libfdk_aac) (mp4a / 0x6134706D), 44100 Hz, stereo, s16, 256 kb/s
      Metadata:
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]

I have shared the file on our GDrive

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I was testing #13470 on Windows with the stem file (and without this patch), the MIME was successfully detected so it does look like random bug.
I would suggest we keep this fix, but since I don't use Windows, I'm not too opinionated and happy to drop it if we think it was a one off

@acolombier acolombier changed the title Improve STEM support on WIndows and Mac Improve STEM support on Windows and Mac Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants