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

Help wanted: Speex (commonly used in mdx) is currently broken in FFmpeg7.0 #1738

Open
shenlebantongying opened this issue Aug 31, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@shenlebantongying
Copy link
Collaborator

shenlebantongying commented Aug 31, 2024

We need to delay Qt6.8 updates until these problems fixed. (Hopefully, the Qt6.7 doesn't bump major FFmpeg version yet.)

Help wanted to fix the bug in FFmpeg. (One reports says only a single line of change is needed.)

Furthermore, nobody else appears to use/care about this format anymore. FFmpeg could break silently again in future. Maybe we should implement/copy the speex decoder code to our source tree, as libspeex doesn't appear to be changing anymore (but other parts of FFmpeg keeps changing).

https://github.com/videolan/vlc/blob/master/modules/codec/speex.c


speex_mini.zip

Minimum dict to do test with a single entry “A” and 2 speex audios.

ffplay -> has exactly the same issue as GD

vlc -> no issue

@shenlebantongying shenlebantongying added the bug Something isn't working label Aug 31, 2024
@shenlebantongying
Copy link
Collaborator Author

shenlebantongying commented Aug 31, 2024

Workarounds:

  • uses VLC's no gui command line to play audio vlc --intf dummy --play-and-exit or cvlc
  • On linux, force QT_MEDIA_BACKEND=gstreamer and ensure both the qt6's gstreamer backend installed and GStreamer codecs packages are installed (no idea which one, but some distros names them good/bad/ugly....)

@shenlebantongying shenlebantongying changed the title Help wanted: Speex is currently broken in FFmpeg7.0 Help wanted: Speex (commonly used in mdx) is currently broken in FFmpeg7.0 Aug 31, 2024
@powerboat9
Copy link

Would https://fate.ffmpeg.org/ be useful?

@KonstantinDjairo
Copy link
Contributor

KonstantinDjairo commented Oct 2, 2024

Maybe we should implement/copy the speex decoder

that's a good idea, but then as you said:

FFmpeg could break silently again in future.

we can solve both with a single strategy, that is: transcoding

i'm quite familiar with the ffmpeg codebase since i've been working with VVC and needed to dig into their codebase, i think i can help with that, but my idea is to create a native transcoder inside of goldendict-ng, that takes a format X and transcodes to a more familiar format Y (let's say mp3 for example)

real-time transcoding is not a big task for nowaday's CPUs
(btw the way that navidrome does that is quite interesting, it relies on ffmpeg but im quite sure we can write our own transcoder using some FOSS libs.)

@shenlebantongying
Copy link
Collaborator Author

There is no need to waste time on those things. They already exists in FFmpeg.

The task that needs to be performed is pretty much verify the 3 commits since April in the repo below, and put together a patch (with credit to the repo's author) and send it to FFmpeg's patch tracker.

https://github.com/librempeg/librempeg/commits/master/libavcodec/speexdec.c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants
@powerboat9 @shenlebantongying @KonstantinDjairo and others