RamonUnch / in_opus

Winamp 2.x and 5.x input plugin for Opus file
38 stars 0 forks source link

support opus audio in .ogg container #2

Open BuyMyMojo opened 2 years ago

BuyMyMojo commented 2 years ago

The most common container for opus is slowly becoming .ogg and .webp when downloading audio only from youtube with yt-dl/yt-dlp so support for playing it in those containers would be helpful.

RamonUnch commented 2 years ago

Well it is a hack because .ogg files are supposed to be ogg/vorbis files and not ogg/opus files And Winamp is not designed to do this.

So there is a hack I use to be able to play .ogg files when they improperly contain opus stream. Add the OGGEXT_HACK=1 option in the [IN_OPUS] section of the winamp.ini file. You can also put the options in the in_opus.ini file in the plugin directorry. have a look at the readme for more details.

RamonUnch commented 2 years ago

It was added in version 0.911 and it has a limitation:

  • NEW: An option was added to load files with .ogg extension. The option is not enabled by default because the plugin will have to open all the ogg files to check if they are opus files. Write OGGEXT_HACK=1 in the [IN_OPUS] section of the winamp.ini file if you want to enable it. Note1: In Winamp 5.x, there will be conflicts with the tags when you mix both king of .ogg files, this will lead to tags being not shown for the second type of file you load in the session. All files will play though. Note2: This is not an issue on Winamp 2.x.
RamonUnch commented 2 years ago

Also note that the container for both .ogg and .opus file is OGG, in the case of opus file the stream it contains is opus (ogg/opus) and in the case of a .ogg the stream is vorbis (ogg/vorbis), natively supported by Winamp. Sometime the naming convention is not respected and someone will write .ogg for an ogg/opus which is a mistake. On the other hand .webp is a completely different container that was designed with video in mind. I do not plan supporting it because it would require a significant work.

If yo use youtube-dl what may happen is that you get a .webp file. Be sure to have ffmpeg.exe in your path so youtube-dl and variants can copy the stream to the proper container (it will be lossless).