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

Prefer FFmpeg for all formats except FLAC/OGG #10313

Open
mixxxbot opened this issue Aug 23, 2022 · 6 comments
Open

Prefer FFmpeg for all formats except FLAC/OGG #10313

mixxxbot opened this issue Aug 23, 2022 · 6 comments
Labels

Comments

@mixxxbot
Copy link
Collaborator

Reported by: uklotzde
Date: 2021-02-04T22:37:46Z
Status: New
Importance: Medium
Launchpad Issue: lp1914662


SoundSourceCoreAudio: Unmaintained due to lack of macOS contributors. Already requires an internal API adapter since the last refactoring.

SoundSourceMediaFoundation: Unmaintained due to lack of Windows contributors and buggy (https://bugs.launchpad.net/mixxx/+bug/1899242)

SoundSourceMP3: Based on abandoned libraries libid3tag and libmad.

SoundSourceM4A: Based on abandoned (libmp4v2) and almost abandoned (libfaad2) libraries. Already requires an ugly workaround.

SoundSourceSndfile: Is well maintained, has a simple API and is already used as a fallback. Currently the primary SoundSource for AIFF and WAV. No offset issues expected when switching to FFmpeg.

SoundSourceWv: Minor maintenance burden, but otherwise does not hurt. The API is simple enough to keep it.

SoundSourceOpus: Obsolete. Contains some special metadata code that is unlikely to be used. Vorbis Comment tags are the most common.

SoundSourceFLAC/SoundSourceOggVorbis: Cannot be replaced by FFmpeg!!

@mixxxbot
Copy link
Collaborator Author

Commented by: Be-ing
Date: 2021-02-04T22:41:06Z


Is there an inherit limitation in FFmpeg that prevents using it for FLAC, Vorbis, and Opus? Are there upstream bug reports about the limiting factors?

@mixxxbot mixxxbot added the bug label Aug 23, 2022
@mixxxbot
Copy link
Collaborator Author

Commented by: uklotzde
Date: 2021-02-04T23:07:49Z


Decoding tests don't pass for FLAC and OGG, seeking seems to be buggy, all documented in code comments. The native libraries work (almost) flawlessly.

We could use FFmpeg for OPUS instead of the native decoder as I just noticed, all tests pass. I remember that this required raising the bounds for allowed decoding errors slightly.

@mixxxbot
Copy link
Collaborator Author

Commented by: uklotzde
Date: 2021-02-04T23:09:54Z


Decoding WavPack files also works, so we don't necessarily need to keep SoundSourceWv for the 1 or 2 people who might still use it.

@mixxxbot
Copy link
Collaborator Author

Commented by: uklotzde
Date: 2021-02-04T23:11:09Z


        ///////////////////////////////////////////////////////////
        // Codecs with failing tests
        ///////////////////////////////////////////////////////////
        /*
    } else if (!strcmp(pavInputFormat->name, "flac")) {
        // FFmpeg failure causes test failure:
        // [flac @ 0x2ef2060] read_timestamp() failed in the middle
        // SoundSourceFFmpeg - av_seek_frame() failed: Operation not permitted
        list.append("flac");
        continue;
    } else if (!strcmp(pavInputFormat->name, "ogg")) {
        // Test failures that might be caused by FFmpeg bug:
        // https://trac.ffmpeg.org/ticket/3825
        list.append("ogg");
        continue;

@mixxxbot
Copy link
Collaborator Author

Commented by: Be-ing
Date: 2021-02-09T07:18:39Z


Perhaps we could drop all SoundSources besides FFmpeg and libsndfile once libsndfile/libsndfile#643 is fixed.

@mixxxbot
Copy link
Collaborator Author

Commented by: Holzhaus
Date: 2021-03-09T01:11:35Z


Unless we have a way to determine encoder sample offsets, this will potentially invalidate all existing cue points.

@mixxxbot mixxxbot transferred this issue from another repository Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant