Old 30th April 2018, 19:17   #1
Ramon_Unchained
Junior Member
 
Join Date: Apr 2018
Posts: 11
in_opus plugin for Winamp 2 (release)

Hello, this is the first time I post on this forum, I wrote a plugin for winamp 2+ to support reading of OPUS audio files, so I decided to share it in case anyone would be interested.

I developed this plugin because I wanted to be able to play OPUS files with Winamp 2, both on my Windows XP machine and an old Windows 98 SE, That is still used for playing music and for retro gaming at my home.

I had to build myself the libraries because they include dependencies that are not present on this old OS.

The plugin was tested and works fine on Windows 98SE/NT4/XP/2003/7.

There is a very good plugin that was already written by thinktink but it only works for Winamp 5.

I provide this plugin for compatibility with old platforms. to my knowledge, this is the only Opus player for Windows 98. and some of you may still use Winamp 2 for some reasons.
Attached Files
File Type: zip in_opus.zip (111.6 KB, 2270 views)
Ramon_Unchained is offline   Reply With Quote
Old 21st July 2018, 18:56   #2
hairlessbunny
Banned
 
Join Date: May 2018
Posts: 2
Doesn't seem to be working under Winamp 5.666 and a file encoded using oggenc:

code:
ffprobe test.ogg
[ogg @ 0x98047c0] 550 bytes of comment header remain
Input #0, ogg, from 'test.ogg':
Duration: 04:33:21.47, start: 0.000000, bitrate: 41 kb/s
Stream #0:0: Audio: opus, 48000 Hz, mono, fltp
Metadata:
ENCODER : opusenc from opus-tools 0.1.10-71-32d4b475 AVX1 [Jun 3 2018]
ENCODER_OPTIONS : --bitrate 48

hairlessbunny is offline   Reply With Quote
Old 31st July 2018, 08:21   #3
Ramon_Unchained
Junior Member
 
Join Date: Apr 2018
Posts: 11
To avoid any interference with the ogg vorbis files, my plugin only considers files with the extensions .opus or .opu. Try renaming the file and let me know; the plugin will in no cases be loaded if the file extension is .ogg.

Winamp 5 only knows ogg vorbis files and thus anything with the extension .ogg is assumed to contain a vorbis stream, in your case it contains an opus stream, the "proper" way to name those files is actually .opus, same container but different stream.

When I made experiments with various files it appeared that some opus streams would not be decoded by libopusfile, when they would work just fine with other decoders such as the one within Mplayer.

As I did not want to take time to try other decoders I just use ffmpeg to fix the file with the command:

ffmpeg -i broken.opus -acodec copy unbroken.opus

In case renaming the file does not work, try this...
Ramon_Unchained is offline   Reply With Quote
Old 18th April 2019, 06:47   #4
Ramon_Unchained
Junior Member
 
Join Date: Apr 2018
Posts: 11
Update in_opus v0.444

Here is a new update of my in_opus plugin which is now version 0.444.
Using it I encountered a few isues and I fixed them so now I share them as promised.

* FIXED: A few bugs in reading tags.

* NEW: ReplayGain supported, it uses the standart R128 tag, in 256th of dB
there is no configuration box, if you want to enable replay gain, you have
to write it directly in the Winamp.ini file in winamp's directory.
If no parameters are written, no replay gain of any kind will be applied.
The plugin will not write anything into winamp.ini, you have to write those
options yourself and restart Winamp or go to the config dialor box of
in_opus, this will read the configuration, you will need to stop and start
playback again though.

Open "winamp.ini" with notepad and paste at the end the folowing 4 lines:

[IN_OPUS]
USE_REPLAY_GAIN=1
PRE_GAIN=0.0
THREAD_PRIORITY=1

to use Album gain, set USE_REPLAY_GAIN=1 and set it to 2 for track gain, or 0 to disable replay gain.

the PRE_GAIN value is a preamplification factor in dB that is applied before the gain. you should consider putting a negative value if you experience clipping problems. A common value is -6dB (ultra safe, very rare clipping) 0 is usually OK becaus the gain is almost always negative anyway. You should use the same parameters with the others plugins. If you are reading this, it means you know what you are doing anyway.

You can set the decode priority thread (default is 1, above normal) other values are: -2: Lowest, -1: Below Normal; 0: Normal; 1: Above Normal; 2 Higher You can also try -15: Idle (not recomended) or +15: Real Time (not recomended)

For more details read the txt file in the zip.
Hope it helps a few guys out there.
If any one wants the source, just e-mail me.
Attached Files
File Type: zip in_opus_v0.444.zip (114.0 KB, 943 views)
Ramon_Unchained is offline   Reply With Quote
Old 13th July 2019, 14:58   #5
anonim1979
Junior Member
 
Join Date: Oct 2018
Posts: 2
Is it possible to add ability to play Opus radio streams?

I'm using Media Library with added Icecast www page:

Media Library -> Online Media (right click add NEW) -> Icecast / http://dir.xiph.org/index.php

that has some radio stations with Opus streams; M3U/XSPF playlists.

ex.
http://listen.radiogibson.net:80/radiogibson.opus
http://stream.radioreklama.bg:80/veronika.opus
anonim1979 is offline   Reply With Quote
Old 15th November 2019, 18:56   #6
Ramon_Unchained
Junior Member
 
Join Date: Apr 2018
Posts: 11
UPDATE 0.610 (open beta of beta)

Here I am again to share the addition of radio stream support.

* NEW: Added radio support. for the moment only HTTP streams are supported.
I release this version because I am not sure when I will have time to work
more on the plugin (Hopefully soon). So keep an eye for a Release.
Of course any feedback will be welcome on this beta.

* NOTE: I could not test it at all on Win 9x as I am far from home.
Theoretically it should work

Try it for yourself and see if it works for you!
Attached Files
File Type: zip in_opus_0.610..zip (111.2 KB, 454 views)
Ramon_Unchained is offline   Reply With Quote
Old 28th November 2019, 07:34   #7
Ramon_Unchained
Junior Member
 
Join Date: Apr 2018
Posts: 11
Update in_opus v0.666

This update is quite important as it enables Unicode filename support. if you use Winamp 5.3+ on Windows NT+. Normally you have nothing to do, as the default behaviour is to auto detect the proper conditions to enable UNICODE filenames support.

This means that you will no longer se the ugly short names with ~1 at the end, but you will instead see the real filename with all its Unicode glory such as Chinese Cyrillic etc.

This is also the "stable" release including Radio stream support. Most of the work was to remove dependency to OpenSSL which is a pain to build on windows especially on Win95. In addition OpenSSL is bloated and unnecessary for my case as I never encountered HTTPS radio streams.

I tested this release on Windows XP (Winamp2.95 & 5.666) and Windows 95 osr2 (Winamp 2.95). It should work on all later windows versions.

* NEW: Now you can enable support for UNICODE file names by adding the option UNICODE_FILE=1 in the [IN_OPUS] section of winamp.ini. You need Winamp 5.3 or greater AND windows NT/2000/XP/Vista/7/8/10. This option will not do anything under Windows 9x and plugin will fail to load if you are using a Winamp version smaller than 5.3 and enabled this option. Set UNICODE_FILE=2 (default) to enable auto detection. Note that this detection is based on the "WHATSNEW.TXT" file in the Winamp directory. if the plugin cannot find the specified file it will assume no Unicode filenames. Finally set it to 0 if your system cannot handle UNICODE.

* NEW: Value added to the USE_REPLAY_GAIN option. Set it to 3 (Auto mode) and it will automatically pick the Album gain except when winamp is in Shuffle mode where it will chose the Track gain. This is very sensible in my opinion as the purpose of replay gain is to avoid volume changes between tracks. In this case if you listen to a full album, the volume between tracks will respect the original Album purpose and if you are randomly listening to tracks the individual track gain will be applied.

* FIXED: Now the plugin does not rely on Windows Socket 2 but is instead compatible with Windows Socket 1 that is included in Win95 by default.

* FIXED: Now the seek-bar is disabled in Radio mode.

* FIXED: Small change to the Info dialog box in the case of Radio streams.

Feedback is always welcome as always.
Attached Files
File Type: zip in_opus_v0.666.zip (112.4 KB, 471 views)
Ramon_Unchained is offline   Reply With Quote
Old 25th May 2019, 06:20   #8
Vaporeon
Junior Member
 
Join Date: Oct 2018
Posts: 2
Nice plugin, however v0.444 Crashes for me on any version of Winamp when attempting to play anything, either on 5.8b/Win10 or 2.95 in Windows 98 SE. The version in the OP works though.
Vaporeon is offline   Reply With Quote
Old 9th June 2019, 19:49   #9
Ramon_Unchained
Junior Member
 
Join Date: Apr 2018
Posts: 11
Update in_opus v0.555

Here is again a new update.

This one is quite important as it introduces support for Windows 95.
It also introduces UNICODE support on Win NT/2000/XP/7 and later.
Finally it uses the latest opus 1.3.1 and libopusfile 0.11.

@Vaporeon: Hopefully it should fix the crash you encountered.

I could not test it on Windows 10 but a friend told me it as working on his machine.
However all machines are not equal and I just tested it myself with:
Windows 95/98SE/NT4/2000 (Pentium III),
Windows Server 2003 (Core 2 duo)
and Windows 7 (Xeon)

* NEW:
The font used for "Opus File Info" dialog can now be customized.
I figured his would be helpful with Unicode support.
add in the [IN_OPUS] section of Winamp.ini

TAGS_FONT=11 Times New Roman

To select Times New Roman 11pt font, you can use any font available on yous system.

Finally an option to enable or disable dithering was added. This is because some of you might prefer to disable it for personal preference or because of performance.
I had a 35% faster decoding without dithering.
Set USE_DITHERING=0 to disable or 1 to enable (default).

See changelog in the in_opus.txt file,
and take a look at the configurations options for more details.
Attached Files
File Type: zip in_opus_v0.555.zip (99.1 KB, 965 views)
Ramon_Unchained is offline   Reply With Quote
Old 27th June 2019, 22:06   #10
J_Ason
Junior Member
 
Join Date: Mar 2013
Posts: 3
Thank you Ramon, very cool!
J_Ason is offline   Reply With Quote
Old 25th May 2020, 15:14   #11
bitcore
Member
 
bitcore's Avatar
 
Join Date: Jan 2004
Location: Earth, SOL system
Posts: 54
Send a message via AIM to bitcore
Works a treat, Thank you!!!

Like music? Like milkdrop? You need a BLTC sandwich.
Better Living Through Chemicals. It's Pretty!
bitcore is offline   Reply With Quote
Old 17th August 2020, 11:41   #12
Ramon_Unchained
Junior Member
 
Join Date: Apr 2018
Posts: 11
Update 0.892

This is mostly a bug-fix update. Most significantly I would say, is the fix of long durations. Due to integer overflow, in theory the longest file that can be played is 2^31 - 1 ms ie ~25 days. I came along a 27day recording, and decided to fix the bug. Not that I think many of you will need that, but it costs nothing to share right? The other addition is the support of 24b and 32b output, use the OUT_BITS option. So if you hardware supports 24 or 32b output, go for it. However keep in mind tht the EQ shall work only for 16b output on Winamp2.x and will work on 16 and 24b output on Winamp5.3+.

* UPDATE: Now using opusfile 0.12 (with modifications)

* NEW: Support for 8, 24 and 32 bits decoding resolution, the default is always 16b. Add the option OUT_BITS=value in the [IN_OPUS] section of your .ini file to use this option.

* FIXED: Now dithering is applied even when resampling is used. Note that It is not very useful as resampling error tends to make bigger artefacts than quantization error. In addition, noise-shaping will be used only for 16b:48kHz outpt mode, which is the default since the first version.

* FIXED: Now the user's session winamp.ini file will be read. This concerns Winamp 5.11+, and when the 'paths.ini' file is in winamp's directory.

* FIXED: Now WACUP users should have Unicode filename enabled by default.

* FIXED: Crash in some conditions. Now the plugin is compatible with XMPlay, this is not really useful because of XMPlay's native support for opus. However this can fix problems people experienced in some cases with Winamp.

* FIXED: Unnecessary bloat to the dll removed using gcc's -flto option.

* FIXED: The 24 days 20 h 31 min 24 s and 647 ms maximum duration bug. Actually, for any length greater than that, time will be displayed in hrs:min instead of min:sec format, this applies when jumping in the file with Ctrl+J option as well. Now the new limit for track time is thus 60x greater hence: 4 years 1 month 1 days 7 h 23 min 38 s and 820 ms.
Yep u can laugh.
Note1: the [h:min] flag will be added at the end of the playlist name.
Note2: Visualisation will look wrong in this context.

* FIXED: Possible memory leaks.

* FIXED: Problem in the resampling code that would lead to NULL output in some cases. This should cure random 'not working' when using resampling.

* FIXED: Now the error code will no longer be automatically displayed in the PL for the URL streams, because it does causes performances problems. The error details will still be displayed in the Info dialog on "Alt+3".
Attached Files
File Type: zip in_opus_v0.892.zip (107.9 KB, 178 views)
Ramon_Unchained is offline   Reply With Quote
Old 7th September 2020, 20:54   #13
PekeMM
Junior Member
 
Join Date: Sep 2020
Posts: 2
Not working with MediaMonkey

Hi,
Unfortunately in_opus.dll plugin do not load in MediaMonkey even MediaMonkey is compatible with Winamp 2.x plugins.

Sent you PM with few details about issue.
PekeMM is offline   Reply With Quote
Old 7th September 2020, 21:12   #14
PekeMM
Junior Member
 
Join Date: Sep 2020
Posts: 2
Hi,
In further tests I've found that 0.888 works so I guess some sort of regression happened.
PekeMM is offline   Reply With Quote
Old 14th September 2020, 06:06   #15
Ramon_Unchained
Junior Member
 
Join Date: Apr 2018
Posts: 11
Update in_opus v0.911

Here is again a new release with some nice features, namely .ogg file support (hackish), unified dialog info support (Winamp 5.5+) and proper playlist name entry (Winamp 5.x). This release also fixes a serious bug that prevented the plugin function under MediaMonkey. Now the plugin is fully functional with MediaMonkey (including radio), except that MediaMonkey does not retrieve tags information using the winampGetExtendedFileInfo function, newly exported by the plugin.

* FIXED: Now url streams should work with MediaMonkey.

* FIXED: The plugin should be compatible with MediaMonkey again. It will be in my test list from now, even though MediaMonkey 5 will have native opus support.

* NEW: Now the average bitrate can be displayed instead of the instant bitrate, set INSTANT_BR=0 in the [IN_OPUS] section of winamp.ini.

* 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.

* NEW: The playlist entry will display proper format under winamp 5.x, because the winampGetExtendedFileInfo function was implemented.

* NEW: Unified dialog on "Alt+3" can be enabled for Winamp 5.5+ now setting the UNIFIED_DIALOG=1 in the [IN_OPUS] section of the winamp.ini file.

PS: To any admin of the forum: How do I get permission to edit my posts?
I would like to put an updated version of the plugin in the first post so that people do not have to scroll down to find the last version. If it is not possible, could you edit the first post to add that last version is found in the last update post...
Attached Files
File Type: zip in_opus_v0.911.zip (109.7 KB, 48 views)
Ramon_Unchained is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump