in_opus plugin for Winamp 2 (release)

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Ramon_Unchained
    Junior Member
    • Apr 2018
    • 15

    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
  • hairlessbunny
    Banned
    • May 2018
    • 2

    #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

    Comment

    • Ramon_Unchained
      Junior Member
      • Apr 2018
      • 15

      #3
      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...

      Comment

      • Ramon_Unchained
        Junior Member
        • Apr 2018
        • 15

        #4
        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

        Comment

        • Vaporeon
          Junior Member
          • Oct 2018
          • 2

          #5
          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.

          Comment

          • Ramon_Unchained
            Junior Member
            • Apr 2018
            • 15

            #6
            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

            Comment

            • J_Ason
              Junior Member
              • Mar 2013
              • 3

              #7
              Thank you Ramon, very cool!

              Comment

              • anonim1979
                Junior Member
                • Oct 2018
                • 2

                #8
                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.

                Comment

                • Ramon_Unchained
                  Junior Member
                  • Apr 2018
                  • 15

                  #9
                  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

                  Comment

                  • Ramon_Unchained
                    Junior Member
                    • Apr 2018
                    • 15

                    #10
                    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

                    Comment

                    • Ramon_Unchained
                      Junior Member
                      • Apr 2018
                      • 15

                      #11
                      It seems that under Winamp 5 the equalizer (EQ) does not work when playing opus files with this plugin (whatever the version).

                      It is strange as it works fine works with Winamp 2 (I developed on this one).

                      It also works with the Constant-Q EQ that is generally considered to be superior in design and that is available in Winamp 5.51+. You can enable it as follows:

                      - Winamp > Ctrl+P
                      - General Preferences > Playback
                      - Equalizer tab > in the 'EQ Type' dropdown box you have the option between 'Winamp 4Front EQ' and 'Constant-Q EQ'
                      - Select 'Constant-Q EQ'
                      - close out of Prefs and restart Winamp

                      I hope to fix this bug in the future but I thought it would help in the meantime.

                      An other way is to use external DSP module to do the EQ.

                      Comment

                      • Ramon_Unchained
                        Junior Member
                        • Apr 2018
                        • 15

                        #12
                        Update in_opus v0.777

                        CHRISTMAS RELEASE...

                        It fixes most bugs I was reported lately. I recommend the Update, don't use the version in the first post. Read the txt file for all details.

                        * NEW: added an internal volume option, set INTERNAL_VOLUME=1 to enable. In this case the volume slider in winamp will adjust volume before decoding, this hase some use if you want to manually avoid clipping while playing. With this option enabled the volume slider goes from -20dB to +0dB.

                        * NEW: Added resampling option, Now the output can be resampled at any sampling rate eg you can set 44100 Hz for compatibility with some old soundcards. Set the OUT_SAMPLERATE to the desired value in the [IN_OPUS] section of the winamp.ini file. You can also set the quality of resampling from 0 (low quality) to 4 (high quality with) the RESAMPLE_Q option. The default value is 2 as it already gives a good sound quality and higher values are much more CPU heavy. Up-sampling is also supported.

                        * NEW: PRE_GAIN is now reserved for files and RADIO_GAIN is used for radio streams, the default value for RADIO_GAIN is -3dB because I experienced a lot of clipping with the radio streams I listened to and -3dB is a good value in my opinion. If you want a specific RADIO_GAIN value, set it (in dB) in the winamp.ini file.

                        * NEW: added a value to USE_REPLAY_GAIN, set it to 4 to use the raw opus signal without the header gain. I do not recommend this option because the Header gain should always be applied, this value is here in case it is needed. eg: opus files with a completely broken Header gain.

                        * FIXED: invalid behaviour in reading ini file in some conditions.

                        * FIXED: Now the PRE_GAIN is always applied, even when replay gain is disabled. this is useful if you have clipping problems and do not want to use replay gain, note that RADIO_GAIN is always applied when playing Radio streams.

                        * FIXED: Now the normal EQ (Winamp 4Front EQ) works on Winamp5.x with this plugin. It was a strange bug related to the Info display.

                        * FIXED: No more flickering of the menu-buttons at the bottom of the winamp playlist when playing opus file. Hopefully it should also fix the screen tearing some people experienced with previous versions.
                        Attached Files

                        Comment

                        • Ramon_Unchained
                          Junior Member
                          • Apr 2018
                          • 15

                          #13
                          Update in_opus v0.888

                          This is again a recomended update because it fixes a major interferance bug that might prevent other plugins to load URL streams.

                          * NEW: Error message will be displayed in the PL when a stram is offline, invalid, has a bad header, etc.

                          * NEW: Added Shoutcast/Icecast server info in the info dialog Box (Alt+3). In addition proper error will be displayed in the playlist when a radio stream is offline or if it is not an opus stream.

                          * NEW: Added TARGET_LUFS config variable so that you can decide the target loudness at which to play opus files when RG info is available and RG is enabled.

                          * NEW: the plugin will also read the in_opus.ini config file in the plugin directory prior to the winamp.ini. If you write options in both files, the ones in winamp.ini will dominate when the concerned option is the same, otherwise all parameters will be read.

                          * FIXED: now the plugin should no longer risk to interact with other radio streams that he cannot handle. This implies that if the url does not end with .opus the plugin will not try to load the url.

                          NOTE: If you have an opus stream that does not end with .opus, append the string ">.opus" or "?.opus" at the end of URL in order to force in_opus to load it.
                          eg: http://ivyrd.wtju.net:8000/wtju-opus-256.ogg is actually an opus
                          stream even though it ends with .ogg (like ogg vorbis file)
                          use: http://ivyrd.wtju.net:8000/wtju-opus-256.ogg>.opus to play it.

                          In the rare case a radio streams ends with .opus but is not an opus stream,
                          add "?.mp3" or "?.aac" to avoid in_opus try and open it.
                          eg: http://nebula.shoutca.st:8751/aac320.opus is actually an aac stream,
                          use: http://nebula.shoutca.st:8751/aac320.opus?.aac to play it
                          eg2: http://radioilusion.es:8000/radioilusion.opus actually an ogg stream
                          use: http://radioilusion.es:8000/radioilusion.opus?.ogg to play it
                          Attached Files

                          Comment

                          • Vibosoft
                            Junior Member
                            • Dec 2001
                            • 4

                            #14
                            I changed my stream into real OPUS:
                            code:
                            http://nebula.shoutca.st:8751/quikoradio.opus
                            Best, Andrew

                            Comment

                            • bitcore
                              Member
                              • Jan 2004
                              • 54

                              #15
                              Works a treat, Thank you!!!
                              Like music? Like milkdrop? You need a BLTC sandwich.
                              Better Living Through Chemicals. It's Pretty!

                              Comment

                              Working...
                              X