#11078 closed defect (fixed)
Speex decoding speed regression?
| Reported by: | Ronald | Owned by: | |
|---|---|---|---|
| Priority: | important | Component: | avcodec |
| Version: | git-master | Keywords: | speex |
| Cc: | Ronald, MasterQuestionable, escape0707, Yuzu Vita | Blocked By: | |
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | yes |
Description (last modified by )
Summary of the bug:
ffplay plays .spx very slowly
How to reproduce:
% ffplay test.spx built on arch linux ffplay version n7.0.1 Copyright (c) 2003-2024 the FFmpeg developers built with gcc 14.1.1 (GCC) 20240522 configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-frei0r --enable-gmp --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libdvdnav --enable-libdvdread --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libharfbuzz --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librsvg --enable-librubberband --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-mbedtls --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-vapoursynth --enable-version3 --enable-vulkan 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
Attachments (1)
Change History (17)
by , 2 years ago
comment:1 by , 2 years ago
In an old version (about one or two weeks ago) of ffplay, it plays .spx correctly.
vlc plays .spx correctly.
A sample .spx file is in attachment.
comment:2 by , 2 years ago
| Description: | modified (diff) |
|---|
comment:3 by , 23 months ago
| Priority: | normal → critical |
|---|
comment:4 by , 23 months ago
| Cc: | added |
|---|
comment:5 by , 23 months ago
| Priority: | critical → important |
|---|
comment:6 by , 23 months ago
| Cc: | added |
|---|---|
| Component: | ffplay → avcodec |
| Keywords: | regression speex added |
| Summary: | ffplay plays .spx very slowly → Speex decoding speed regression? |
͏ Speex appears to be a much defunct codec. ("obsoleted by Opus")
͏ Please help ascertain the exact regression window, if you deem it important.
͏ (simple revert may be applicable..?)
comment:8 by , 23 months ago
͏ Half-broken better than completely-broken for this case. Supposedly.
͏ Haven't analyzed in detail, but it seems to affect realtime playback (not transcoding)?
comment:9 by , 22 months ago
| Cc: | added |
|---|
comment:10 by , 17 months ago
Cannot we just delete the native speex codec?
FFmpeg currently has 2 speex decoder.
A....D speex Speex A....D libspeex libspeex Speex (codec speex)
The native one (speex) has been broken since the release of 7.0. Either nobody really cares or it doesn't worth the time and no one is motivated to fix it.
Having a working one is better than having a broken one. The libspeex one simply works.
comment:11 by , 17 months ago
The exact error is in libavcodec/speexdec.c -> parse_speex_extradata where the frame_size calculation is wrong.
comment:12 by , 17 months ago
| Analyzed by developer: | set |
|---|
͏ Would you propose the fix directly? (GitHub direct commit)
͏ Alike: https://trac.ffmpeg.org/ticket/5514#comment:22
͏ Meanwhile "-c:a libspeex" (as input option (before ͏"-i") ) should workaround.
͏ Known that there are several other buggy codecs too.
͏ "aac", "opus", "vorbis", ...
͏ Maybe the better fix is to change the default decoder?
comment:13 by , 17 months ago
Hi, I made a patch by poking around last night.
https://ffmpeg.org/pipermail/ffmpeg-devel/2025-January/338959.html
I am not sure about correctness because I have almost no relevant knowledge.
However, it does fix the test files in the bug reports. Someone more competent maybe can take a look and take over to do it properly.
Maybe the better fix is to change the default decoder?
This seems more realistic.
comment:14 by , 17 months ago
| Keywords: | regression removed |
|---|---|
| Resolution: | → fixed |
| Status: | new → closed |
| Version: | 7.0 → git-master |
Should be fixed in 4a0e1cfc6f33d152e007849f6de7028d651de2af
comment:15 by , 17 months ago
comment:16 by , 14 months ago
| Cc: | added |
|---|



It plays the pronunciation for "hello".