Send-Audio-Plugin-BetterDiscord
Send-Audio-Plugin-BetterDiscord copied to clipboard
Audio files are missing meta data and the file ending is wrong
Your plugin sends audio files without meta data and with the wrong file ending. Regardless of the setting, your addon sends opus files with an mp3 ending, which makes them unplayable on most devices without first changing the file ending.
The missing meta data also means that the mini-player discord has doesn't know the duration of the file until it has been played completely, and it also means you can't jump around within the file. Test it with a 2+ minute recording, it's really unusable.
#21 this should fix the file ending
you should be able to change the format in the settings. looking at what you changed in the pr it seems like you have set it to ogg in the settings but the plugin just appends the wrong file ending. that could be the issue. but yes, the meta data really is missing.
the author does not really have time to maintain the plugin and i asked him if it is ok if i'd rewrite the plugin and publish it. so thank you for this information, i did not think about the missing meta data. i already started working on it and maybe you will see a new plugin in the plugin repo in a week (idk how much time and motivation i will have, so maybe a few weeks)
you should be able to change the format in the settings. looking at what you changed in the pr it seems like you have set it to ogg in the settings but the plugin just appends the wrong file ending. that could be the issue. but yes, the meta data really is missing.
the author does not really have time to maintain the plugin and i asked him if it is ok if i'd rewrite the plugin and publish it. so thank you for this information, i did not think about the missing meta data. i already started working on it and maybe you will see a new plugin in the plugin repo in a week (idk how much time and motivation i will have, so maybe a few weeks)
Please read the code the file ending is hardcoded. It does not respect the settings. Since the plugin just puts out an opus file with an mp3 extension no matter what, at least fixing the file extension is better than what it currently does.
Please read the code the file ending is hardcoded. It does not respect the settings.
I saw that this specific code snipped does not do that but I was saying that it should be respected in other places so that it should work fine if you select mp3 in the settings. That means an actual fix would be to respect the settings in the upload function and not to just replace the file ending.
Sure, if you want to do that. But this is at least better than what it currently does since nothing the program does actually respects any of the settings. I'd go so far as to say that you should probably remove the settings until they're functional.
To clarify, the program does not produce an mp3 file even if you choose mp3 in the settings. It is still an opus file with an mp3 extension, which is dumb. So I'd recommend merging that PR until you actually fix that part.
Please read the code the file ending is hardcoded. It does not respect the settings.
I saw that this specific code snipped does not do that but I was saying that it should be respected in other places so that it should work fine if you select mp3 in the settings. That means an actual fix would be to respect the settings in the upload function and not to just replace the file ending.
If you want to be super technical, the correct file ending would actually be .opus and not .ogg, but Discord doesn't recognize .opus as an audiofile even though it can technically play them, so it doesn't launch the miniplayer. (Discord's miniplayer ignores file extensions and instead determines the filetype by looking at the meta data of the file).
(The reason why ogg instead of opus is ok has to do with ogg being an alias/container for .opus files, albeit deprecated, and this is still respected by most players such as VLC. .mp3 is NOT and has never been, a container for opus files.)
Technically the recommendation is to only use .ogg for ogg vorbis files, but using it for opus files is supported, and discord, despite internally using opus as its voice codec and supporting opus files, doesn't recognize the opus file extension. So given the state of the plugin, choosing .ogg is the best possible compromise that keeps the audio messages playable on the majority of devices.
See also https://en.wikipedia.org/wiki/Ogg https://en.wikipedia.org/wiki/Opus_(audio_format)
I made good progress with my own version of the plugin but it seems like the metadata missing is an issue in chromium.
Based on my understanding, "non-seekable" here really means "non-efficiently-seekable". It refers to WebM files that do not contain a "cues" section. Without the cue section, seeking is still possible (assuming the player supports this) but requires reading all of the audio/video data up to the target location in order to find it.
I have found something that might be able to solve this issue but I did not test it yet.
The wrong file ending is something I fixed in my own version, there should be no problems with that. It also checks for supported mime types from a list of some selected ones. It seems like pretty much only audio/webm
and audio/webm;codecs=opus
are supported but I added some others as well in case that will change in the future.