skyjake/lagrange Issue #730: Ogg Opus support in prebuilt binaries
2025-05-21 12:02:11 farvardin
In #169 it's written Opus is not supported but it might be in the future.
I don' know if it has been implemented or the previous fix has a problem, but while it's not crashing the browser, ogg/opus files can be played, but the sound is mixed up. I've put some samples there:
gemini://garvalf.ortie.org/musiques/full_albums/garvalf_02_test_opus/
btw I've noticed a vorbis file with picture doesn't seem to play. The picture was in the metada in the original mp3 file, and if I don't strip it with ``-map a`` there is an error with Lagrange.
I understand it can be complicated to support all various audio, image and video format but on the wikipedia vorbis page it is written that ``"Since 2013, the Xiph.Org Foundation has stated that the use of Vorbis should be deprecated in favor of the Opus codec, an improved and more efficient format that has also been developed by Xiph.Org."``
I'll still use vorbis on my gemspace because of the lack of support for opus, but opus is indeed better (below is vorbis 64 k, above is opus 40 k)

Comments (2)
2025-05-28 04:36:56 skyjake
Opus has been supported as an optional audio format starting with v1.18. However, I don't think it is included in any of the prebuilt binaries, so you'd have to compile the app yourself with libopusfile to enable it. Future prebuilt releases may include it, on some platforms.
When it comes to problems with the existing Vorbis support, it does rely on a simple decoder from the [stb library](https://github.com/nothings/stb), so perhaps it doesn't support some features of the format.
2025-08-05 15:29:54 farvardin
@skyjake I've converted all my music using ogg/vorbis instead of opus.
I also run into a strange problem, on this page all the files are playing correctly on my (linux) desktop, using the AppImage:
gemini://garvalf.ortie.org/musiques/full_albums/garvalf_09_espaces_lointains/
But on the mobile version (using latest version from Lagrange Pre Release on F-Droid) some files are playing correctly while most of them simply don't start at all.
After a second look, it seems the problem is if we have several players on the same page (android only): if I refresh the page or if I click again on a song so it will fold again, then the new song can play.