Opus support? {Implemented with a 3rd party plug-in by thinktink)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • kzuse
    Senior Member
    • Oct 2005
    • 484

    #61
    Wow, just wow - thank you!

    Yes, those podcasts are only in mono. Here's the complete "MediaInfo" output for the example file posted above:

    HTML Code:
    General
    =======
    
    Complete name                            : D:\Download\rz052-solar-orbiter.opus
    Format                                   : OGG
    File size                                : 24.5 MiB
    Duration                                 : 1h 8mn
    Overall bit rate                         : 50.2 Kbps
    Album                                    : Raumzeit
    Track name                               : RZ052 Solar Orbiter
    Track name/Position                      : 52
    Performer                                : Tim Pritlove
    Encoded by                               : auphonic.com
    Genre                                    : Podcast
    Recorded date                            : 2013
    Writing application                      : opusenc from opus-tools 0.1.5
    Terms of use                             : http://creativecommons.org/licenses/by-nc-nd/3.0/de/
    tags                                     : timpritlove,raumzeit,podcast,esa,dlr,raumfahrt
    rights-date                              : 2013
    rights                                   : 2013 Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Germany
    rights-uri                               : http://creativecommons.org/licenses/by-nc-nd/3.0/de/
    encoded_by                               : auphonic.com
    metadata_block_picture                   : AAAAAwAAAAppbWFnZS9qcGVnAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHPy/ {...cut...}
    
    Audio
    =====
    
    ID                                       : 579673411 (0x228D1D43)
    Format                                   : Opus
    Duration                                 : 1h 8mn
    Channel(s)                               : 1 channel
    Channel positions                        : Front: C
    Sampling rate                            : 44.1 KHz
    Compression mode                         : Lossy
    Writing library                          : libopus 1.0.1
    
    Menu
    ====
    
    00:00:00.000                             : Intro
    00:00:41.625                             : Vorstellung
    00:01:52.010                             : Persönlicher Hintergrund
    00:09:18.281                             : Missionen zur Sonne
    00:12:24.870                             : Zur Sonne fliegen
    00:17:55.250                             : Flug des Solar Orbiter
    00:27:19.130                             : Ziele der Mission
    00:36:04.010                             : Solarzyklus
    00:37:59.693                             : Instrumente und Datenübermittlung
    00:54:03.750                             : Planung des Starts
    00:59:58.625                             : Troubleshooting
    01:06:20.922                             : Missionsdauer
    There you see that there's only one channel. And there you also see the original 44.1 kHz input sample rate.

    But there are some other issues I encountered with the plugin:

    - Seeking backwards in the long opus file works well in 99% of all cases, but sometimes, pressing the "left" arrow key on the keyboard jumps to some random position in the file, instead of 5 seconds back. Especially annoying with podcasts... Actually, I couldn't reproduce it any more, after it occured 2 times.

    - When playing an opus file through out_ds (standard output plugin), pressing "Stop" does not do the short fade-out as it does with all other file types. Maybe there's some buffering issues? I have enabled short fades for pause, seeking and stop in out_ds, but stopping an opus file results in immediate "cut off".

    - A very strange one: While an opus file plays, it is difficult to use the playlist buttons (those pop-up-button-menus) in classic skin! When you click on one of those, for example, "Add", the button bar pops up but immediately disappears, being "overwritten" by the playlist's contents, then again flickering up, also correlated to mouse movement. Weird, I cannot explain that to myself...

    - I do not understand why the DLL has to be so big... it's 1.4 MB, whereas most other (original) Nullsoft input plugins are ~100 KB or ~300 KB or so... Not a major issue, but it leads me to thinking about loading times and memory consumption?


    Again a big thank you and keep it up!

    Best regards,
    kzuse


    Comment

    • kzuse
      Senior Member
      • Oct 2005
      • 484

      #62
      ...And I found another one:

      With Opus, the title doesn't scroll in the taskbar, if "Scroll Title in Taskbar" is enabled, while playing.

      With all other formats this works.

      Strangely, when pausing the Opus file, the title starts scrolling. But it doesn't add "[Paused]" to the scrolling title, as Winamp does with all other formats!

      Also a very weird issue....


      Comment

      • thinktink
        Forum King
        • May 2009
        • 3371

        #63
        Originally Posted by kzuse View Post
        ...
        - Seeking backwards in the long opus file works well in 99% of all cases, but sometimes, pressing the "left" arrow key on the keyboard jumps to some random position in the file, instead of 5 seconds back. Especially annoying with podcasts... Actually, I couldn't reproduce it any more, after it occured 2 times.
        I don't remember if I actually saw any problems with seeking before and fixed it although it could have been a side-effect of a different issue.


        Originally Posted by kzuse View Post
        - When playing an opus file through out_ds (standard output plugin), pressing "Stop" does not do the short fade-out as it does with all other file types. Maybe there's some buffering issues? I have enabled short fades for pause, seeking and stop in out_ds, but stopping an opus file results in immediate "cut off".
        I'm still not seeing that issue. If I set out_ds to do fade outs on stop it works. I cannot replicate your issue, therefore I cannot solve it.


        Originally Posted by kzuse View Post
        - A very strange one: While an opus file plays, it is difficult to use the playlist buttons (those pop-up-button-menus) in classic skin! When you click on one of those, for example, "Add", the button bar pops up but immediately disappears, being "overwritten" by the playlist's contents, then again flickering up, also correlated to mouse movement. Weird, I cannot explain that to myself...
        That I have seen. It started ever since I implemented SetInfo(...) calling to update the KBps display for the actual bitrate during playback. At the moment I don't understand why it's doing that. It's something I've been thinking about for a while now.


        Originally Posted by kzuse View Post
        - I do not understand why the DLL has to be so big...
        Here's why: Because I don't wanna spend 50 billion hours coding and debugging UI elements and window boxes. It's the Borland VCL that's adding to the size. It's what's enabled this plugin to be available so soon instead of 5 years later. That's not likely going to change anytime soon.


        Originally Posted by kzuse View Post
        ... - With Opus, the title doesn't scroll in the taskbar, if "Scroll Title in Taskbar" is enabled, while playing. With all other formats this works.
        I see it, don't know what to about it however. I'm not setting anything weird and there is no seperate setting or API for input plugins to effect or control title scrolling so maybe it will be something that clears up while solving other issues.


        Originally Posted by kzuse View Post
        Strangely, when pausing the Opus file, the title starts scrolling. But it doesn't add "[Paused]" to the scrolling title, as Winamp does with all other formats!...
        I'm seeing that as well now. I will investigate.
        | Opus Audio Codec plugins 2.0 | Embedded Album Art | DiskWrite |
        | Save your playlist first! | Live voice-over | X-Fade 2.5 |
        | AterKast (Source DSP) | More of my stuff... |

        Comment

        • MrX_1980
          Senior Member
          • Mar 2003
          • 109

          #64
          Listen live to your favourite music and presenters at Absolute Radio. Keep up with the latest news and shows, enter competitions, and check out our playlists.
          MainPC: ASUS M4N82 Deluxe; AMD Phenom 1090T BE; 2x 2GB EX2-4800P2-SX; Gigabyte GT650 Ti, Samsung HD103SJ, SyncMaster 204BM und 225BW
          TestPC: Gigabyte GA-K8NS Pro; AMD Athlon 64 Venice 3200+; 2x 1GB MDT DDR-400-CL2; Club3D HD4670 AGP; Samsung HD103SJ, SyncMaster 204BM oder NEC VT48

          Comment

          • thinktink
            Forum King
            • May 2009
            • 3371

            #65
            Originally Posted by MrX_1980 View Post
            ...[clipped URL]...
            I am already aware of this radio station (and have many of their (broken) streams in my playlist for testing and debugging purposes) and many others that are already streaming opus.
            | Opus Audio Codec plugins 2.0 | Embedded Album Art | DiskWrite |
            | Save your playlist first! | Live voice-over | X-Fade 2.5 |
            | AterKast (Source DSP) | More of my stuff... |

            Comment

            • Kaminari
              Member
              • Mar 2003
              • 52

              #66
              I toyed around with the fading settings, and I discovered that the plugin correctly fades out with the "end of song" option enabled, but not with the "pause/stop" option (more precisely: "pause" works, "stop" doesn't).

              Comment

              • thinktink
                Forum King
                • May 2009
                • 3371

                #67
                Originally Posted by Kaminari View Post
                I toyed around with the fading settings, and I discovered that the plugin correctly fades out with the "end of song" option enabled, but not with the "pause/stop" option (more precisely: "pause" works, "stop" doesn't).
                I'm still not seeing (hearing) it:





                Attached is a new version that:
                • Allows editing the tags of a currently playing file.
                • Stops calling SetInfo(...) throughout playback. This was apparently causing the title in the taskbar button to not scroll and causing the issue with the open buttons on the playlist editor with classic skins and also causing Winamp to not indicate the paused state.
                Last edited by thinktink; 17 March 2013, 21:30.
                | Opus Audio Codec plugins 2.0 | Embedded Album Art | DiskWrite |
                | Save your playlist first! | Live voice-over | X-Fade 2.5 |
                | AterKast (Source DSP) | More of my stuff... |

                Comment

                • Kaminari
                  Member
                  • Mar 2003
                  • 52

                  #68
                  That's odd indeed.

                  On my config, the only way to get proper fadeout on stop is to enable "end of song" in the DirectSound output settings. (But since "end of song" fading ruins gapless playback, that's not an option.) I don't quite understand why in_bpopus doesn't work with "pause/stop" while other plugins do (Vorbis, Flac, etc), but then again it's a minor issue.
                  Attached Files

                  Comment

                  • thinktink
                    Forum King
                    • May 2009
                    • 3371

                    #69
                    While toying around with my new Embedded Album Art plugin I found a flaw in the opus library's case-insensitive search for the METADATA_BLOCK_PICTURE tag. It wasn't finding it as I was using lowercase letters and it was odd that it did for some but not others.

                    Anyways, updated version attached.

                    @Kaminari: I am now seeing the issue. I had all of the fading options in out_ds turned on instead of just the default ones. However, I still do not understand why out_ds is not crossfading with just that option but will when the others are enabled. Somebody from the official Winamp Dev Team would have to say exactly what it is step-by-step a developer has to do exactly to get that to work.

                    It's not an internal buffering issue that's for sure. There is no buffering functionality in input plugins from what the SDK showing. Only just what the output plugin tells the input plugin what to send to the vis functions for buffering (to keep the visualizations in-sync with the audio I imagine.)
                    Last edited by thinktink; 24 March 2013, 00:17.
                    | Opus Audio Codec plugins 2.0 | Embedded Album Art | DiskWrite |
                    | Save your playlist first! | Live voice-over | X-Fade 2.5 |
                    | AterKast (Source DSP) | More of my stuff... |

                    Comment

                    • Benski
                      Ben Allison
                      Former Winamp Developer
                      • Jan 2005
                      • 1058

                      #70
                      Make sure you're calling
                      code:
                      plugin.outMod->Close();
                      in your Stop() function. Don't call this on the playback thread, call it directly in Stop (after you've waited for the thread to die).
                      Most of the first party plugins do something like this:

                      code:
                      SetEvent(killswitch);
                      WaitForSingleObject(playThread, INFINITE);
                      plugin.outMod->Close();
                      plugin.SAVSADeInit();

                      On the playback thread, handle stop just by calling
                      code:
                      PostMessage(plugin.hMainWindow, WM_WA_MPEG_EOF, 0, 0);
                      And don't do anything else.
                      You should only call
                      code:
                      plugin.outMod->Write(0, 0);
                      in a legitimate end-of-file situation.

                      Hope that helps!

                      Comment

                      • thinktink
                        Forum King
                        • May 2009
                        • 3371

                        #71
                        Originally Posted by Benski View Post
                        Make sure you're...
                        Omnomnomnomnomnomnomnom... /em licks fingers.

                        Will make the changes as soon as I can. You're right, I'm calling ->Close() in the context of the playback thread instead of in Stop(). I actually tried that way at one point but it seemed to hang the Winamp main UI when I did and calling Stop in the thread was an easy solution. However, things have changed internally with the threading last time I tried it so maybe this time it'll work right.
                        | Opus Audio Codec plugins 2.0 | Embedded Album Art | DiskWrite |
                        | Save your playlist first! | Live voice-over | X-Fade 2.5 |
                        | AterKast (Source DSP) | More of my stuff... |

                        Comment

                        • thinktink
                          Forum King
                          • May 2009
                          • 3371

                          #72
                          Well, calling ->Close() inside of Stop() doesn't hang Winamp any more but it still doesn't work entirely. I will leave it there however as it has made small progress as now at least it fades on stop intermittently (but rarely.) The only way I can get a consistent fade out on stop is if I hit [X] (to play) and then [V] (to stop) right after (like not even a second delay between the key presses.)

                          This bug happens only if you have "end of song" turned off, which is odd.
                          | Opus Audio Codec plugins 2.0 | Embedded Album Art | DiskWrite |
                          | Save your playlist first! | Live voice-over | X-Fade 2.5 |
                          | AterKast (Source DSP) | More of my stuff... |

                          Comment

                          • Benski
                            Ben Allison
                            Former Winamp Developer
                            • Jan 2005
                            • 1058

                            #73
                            Originally Posted by thinktink View Post
                            This bug happens only if you have "end of song" turned off, which is odd.
                            You are probably calling plugin.outMod->Write(0, 0) on Stop. You should only be calling this when the song ends.

                            Comment

                            • thinktink
                              Forum King
                              • May 2009
                              • 3371

                              #74
                              Originally Posted by Benski View Post
                              ...calling plugin.outMod->Write(0, 0) on Stop...
                              Actually, I'm not calling that at all, at least not explicitly.

                              I just finished writing a dummy output plugin that outputs to a log file the thread id, name, parameters, and return value (if applicable) of all the calls to it and passing it off to out_ds (hardcoded) to see the actual difference between what the core plugins do and what mine is doing.

                              Just so you know, I'm still on it.
                              | Opus Audio Codec plugins 2.0 | Embedded Album Art | DiskWrite |
                              | Save your playlist first! | Live voice-over | X-Fade 2.5 |
                              | AterKast (Source DSP) | More of my stuff... |

                              Comment

                              • MrSinatra
                                Forum King
                                • Dec 2004
                                • 5899

                                #75
                                hey TT, would you consider doing an ALAC plugin? I mainly use mp3 and FLAC but I have been considering switching FLAC to ALAC if winamp would support it. its open source now and royalty free:





                                the idea is my lossless would then work on PC/winamp and istuff natively.

                                it looks like the tagging is the same as m4a, but we're beyond my pay grade there. as long as I can get ratings in there though!
                                PENN STATE Radio or http://www.LION-Radio.org/
                                --
                                BUG #1 = Winamp skips short tracks
                                Wish #1 = Multiple Column Sorting
                                Wish #2 = Add TCMP/Compilation editing

                                Comment

                                Working...
                                X