WACUP

Preview Build Discussion => Preview Build Discussion => Resolved Issues => Topic started by: Bombadil on June 09, 2020, 07:49:30 PM

Title: ogg files not working?
Post by: Bombadil on June 09, 2020, 07:49:30 PM
This .ogg file plays perfectly in AIMP, Potplayer and other players, but it doesn't in WACUP.
Title: Re: ogg files not working?
Post by: dro on June 09, 2020, 09:19:09 PM
It's an Opus file rather than an Ogg Vorbis file as the file extension implies. Rename it from .ogg to .opus & also ensure you've installed one of the 3rd party Opus input plug-ins & that should then work (a native Opus plug-in with WACUP hasn't been done due to the 2 decent 3rd party plug-ins that exist).

-dro
Title: Re: ogg files not working?
Post by: Bombadil on June 14, 2020, 08:25:15 PM
It's an Opus file rather than an Ogg Vorbis file as the file extension implies. Rename it from .ogg to .opus & also ensure you've installed one of the 3rd party Opus input plug-ins & that should then work (a native Opus plug-in with WACUP hasn't been done due to the 2 decent 3rd party plug-ins that exist).

-dro

Cool. Weird that it had a wrong extension, as I downloaded it directly from Youtube and other players play it correctly.
Title: Re: ogg files not working?
Post by: Dr.Flay on June 15, 2020, 12:00:48 AM
If using a current youtube-dl or 3D Youtube Downloader, you will see the files are opus.
If you are using something outdated it will say they are OGG because YT used to use OGG containers.
https://en.wikipedia.org/wiki/Opus_(audio_format)#Containers
Title: Re: ogg files not working?
Post by: Bombadil on June 15, 2020, 01:24:24 AM
I see...   I used Jdownloader, so it was probably that. Thanks for the info!
Title: Re: ogg files not working?
Post by: Dr.Flay on June 15, 2020, 02:50:34 AM
Just found this while looking for other info, but it sort of explains it better
https://discordjs.guide/voice/optimisation-and-troubleshooting.html#from-youtube-videos
Title: Re: ogg files not working?
Post by: dro on June 15, 2020, 02:00:47 PM
Other players play it without issue as they likely have native Opus playback support (WACUP doesn't at the moment) & they're not solely basing what needs to be played by the file extension &/or they're detecting mislabelled Opus correctly due to their design.

I'm going to be changing a few things around so that the 2 known Opus plug-ins will be used as a fallback mode to try to handle the files if the Ogg Vorbis plug-in fails playback assuming they'll accept them (though I really need to just sort out native Opus playback support sooner rather than later as despite there being plug-ins it just makes more sense to provide the support directly).

-dro
Title: Re: ogg files not working?
Post by: Aminifu on June 15, 2020, 08:33:31 PM
Hi dro,

I have long thought Winamp basing what needs to be played by the file extension is a short coming. Even-though I also think that users should be responsible for checking if the extension of the files they use match the files' format. Are you considering doing something different for identifying a file's format with WACUP going forward?
Title: Re: ogg files not working?
Post by: dro on June 16, 2020, 05:55:03 PM
It's a shortcoming but it's also the quickest way to try to match an input plug-in to try to use & makes sense when the input plug-in api was created.

It's something I need to maintain but more so for older input plug-ins but some sort of file sniffing has been something I've considered. Though whether that's done generically or still done at the input plug-in I'm not sure. As I'm not sure how bad the issue is though I get that opus + ogg are one of those more likely to be wrong.

Whatever I do there needs to be some additional tweaks to how playback failure is handled which I've already made some initial adjustments for so that other input plug-ins can be attempted if the initial match doesn't return a success (e.g. if you've got 2 input plug-ins that can both handle a format as I've seen from some of the more exotic video game based formats where extension re-use is an issue).

Whatever I do, it's not something the user should be having to worry about & the onus is on WACUP to hide such things but ideally provide a means to identify incorrectly named files so that they can be corrected.

-dro
Title: Re: ogg files not working?
Post by: Dr.Flay on June 17, 2020, 12:20:25 AM
Most Amiga software reads the header to work out what a file is then falls back to the ext. Irfanview is one of the few Windows tools I use that also does this, and then offers to rename it properly.

Looking in an Opus file I see Ogg as the first 3 bytes, and Opus at 28 bytes in.
As long as this does not vary and the tag info correctly stored after, it can be used to infer what decoder is needed.
Title: Re: ogg files not working?
Post by: dro on June 17, 2020, 12:26:04 AM
There's a cost to doing it either way tbh & sniffing the file itself can also lead to issues (e.g. anything with an APE or ID3 tag would then require more processing & if that is a file on a slow network drive then it starts to make things feel clunky).

The Opus vs Ogg Vorbis thing just gives me more of reason to get Opus support natively implemented since the Ogg frames are handled basically the same & it's just the identifier / de-muxing out to the Opus / Vorbis decoder that's ultimately different.

-dro
Title: Re: ogg files not working?
Post by: Dr.Flay on June 19, 2020, 08:57:10 PM
Yeah it makes sense for the OGG and Opus to be under 1 vorbis. hehe
Title: Re: ogg files not working?
Post by: dro on July 02, 2020, 04:54:48 PM
The change needed is in beta build 5770 but it's only intended as a temporary solution to allow the file to play as the metadata aspects will not be re-mapped to the Opus input plug-in, just the detection & off-loading to an Opus handling input plug-in if one exists.

-dro