Latest restricted WACUP beta release is build #18654 (March 24th 2024) (x86 & x64 changelogs) | Latest WACUP public preview is build #17040 (September 30th 2023) (x86 only)


NOTE: Beta testers are added in a limited & subjective manner as I can only support so many people as part of the beta test program to keep it useful for my needs.

Unless I think you're going to be helpful, not all requests will be accepted but might still be later on. Remember that beta testing is to help me & the limitations currently works for my needs for this project.

Author Topic: Internet stream vs title and image  (Read 2248 times)

daniel_kukiela

  • Beta Tester
  • Full Member
  • ***
  • Posts: 14
    • View Profile
Internet stream vs title and image
« on: November 02, 2021, 04:31:31 PM »
Hi,
Last time I asked about the AAC internet streams and I learned that I need to wait for a support. I think I'm going to write some code to decompress to PCM and re-stream the stream to make it work with Winamp (think of it as some sort of proxy).
Now my question is - if I play a network stream, am I able, somehow, to show the title? I can source this information as well as a photo (that I could show as a cover photo in Winamp).
But is it possible to construct a stream in some way to achieve this or interface with Winamp in some other way (external, not as a plugin)?

Thanks

dro

  • Admin / WACUP Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 4428
    • View Profile
    • WACUP (Winamp Community Update Project)
Re: Internet stream vs title and image
« Reply #1 on: November 02, 2021, 04:56:33 PM »
A non-HTTPS version of the stream which the client connecting to is not having to do any redirects related to it are all that's needed. You should be able to run for example an Icecast server that takes in the stream you want to listen to & then have WACUP connect to the stream it's offering - that's the proxying you're wanting to achieve without having to mess around with re-encoding the stream & degrading the audio quality.

Otherwise if you really want to go down the route of making an input plug-in then yes that information can be provided to the core as that's something all of the plug-ins have the capability to do (for an example you could look at the wavpack input plug-in which has the support to act as an artwork provider amongst other things).

-dro
« Last Edit: November 02, 2021, 04:58:35 PM by dro »

daniel_kukiela

  • Beta Tester
  • Full Member
  • ***
  • Posts: 14
    • View Profile
Re: Internet stream vs title and image
« Reply #2 on: November 02, 2021, 05:16:13 PM »
I did not think of making an input plugin. I'm Python dev (PHP previously) and while I know other languages, I might not have enough knowledge to write an input plugin (at least not with good documentation).

I'll take a look at Icecast. Thank you for this hint.

As for re-streaming with my own code - I did not want to re-compress, just de-compress (so with no quality loss) to a PCM format (which I thought WACUP should not have any issues with). The original stream is AAC and WACUP does not want to play not just it, but also AAC files (locally, from a disk), so some I don't think, unless I'm mistaken, that Icecast and re-stream using it will work with WACUP and AAC (AAC so no re-compression would be needed).

I'm also assuming, from the rest of your message, that to show a title and image I would need to have an appropriate input plugin and none of the containers could provide this info to WACUP?

Hope I'm not asking too many questions. Internet streams are the last missing part for me with WACUP.
« Last Edit: November 02, 2021, 05:17:12 PM by daniel_kukiela »

dro

  • Admin / WACUP Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 4428
    • View Profile
    • WACUP (Winamp Community Update Project)
Re: Internet stream vs title and image
« Reply #3 on: November 02, 2021, 06:18:14 PM »
For the local .aac issue, I'd need a small example file that doesn't work for you for me to try out. As there seems to be a .aac related check going on in in_mp3 so potentially it should be able to play it but it would very likely need to be a raw ADTS format if it's going to work i.e. no container, just the 7 byte header & then the audio sample data if I'm remembering the format correctly.

All playback ends up being PCM once it's been decoded but accepting a raw PCM stream e.g. via piped input (that's something I've still to get my head around how to do that vs how WACUP runs) isn't going to be possible unless there's typically an input plug-in to do the handling (the wacup core blurs the lines a bit as I try to do things without a solid reliance on those plug-ins such as when it comes to metadata). The same goes for the artwork & to an extent title updates (it is technically possible to do cross-process aspects where a string is correctly transferred but it's messy at the best of times assuming python can even do it).

Hopefully the icecast step will do what's needed as I'd hope it's going to be able to pull in another HTTPS stream & then you just connect locally & it's a direct connection that should *fingers crossed* work. I also fully admit it's a lame solution & I need to do something to at least keep in_mp3 happy but it's a deep rabbit hole to dive into when it'd be better for me to use that time to make a replacement plug-in that is built to support the more modern streaming protocols that are used & is something I need to get started on in 2022.

-dro
« Last Edit: November 02, 2021, 06:20:04 PM by dro »

daniel_kukiela

  • Beta Tester
  • Full Member
  • ***
  • Posts: 14
    • View Profile
Re: Internet stream vs title and image
« Reply #4 on: November 02, 2021, 06:57:46 PM »
Ok, I made some tests.

I installed Icecast and set a relay for this stream (http://stream.open.fm/127). I also discovered that this stream is also streamed using Icecast. Anyway, WACUP does not play it (keeps connecting) while other apps like MPC-BE do (using my relay). I simply did this:
Code: [Select]
    <relay>
        <server>stream.open.fm</server>
        <port>80</port>
        <mount>/127</mount>
        <local-mount>/weekend-hits</local-mount>
        <on-demand>0</on-demand>

        <relay-shoutcast-metadata>1</relay-shoutcast-metadata>
    </relay>
I was also able to dump part of this stream using my local relay and WACUP does not play it while mentioned MPC-BE does. I'm attaching this sample for you, following your request.

Will WACUP handle Shoutcast metadata, assuming it'll play the stream?
And yes, I can do about anything with Python. If not plain Python, there are so many C/C++ packages for it, that I'll be able to find something for sure.

If I would like to write my own input plugin for this streaming provider, is there any resource I could read to learn how to do that?

And yes, I'm not expecting you to put your time to do anything about my case. I know and understand how much of the work needs still to be done by you. I'll try to make my own workarounds to achieve what I want and even the local Icecast server will be totally fine with me. Sadly it did not work.

dro

  • Admin / WACUP Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 4428
    • View Profile
    • WACUP (Winamp Community Update Project)
Re: Internet stream vs title and image
« Reply #5 on: November 02, 2021, 07:19:42 PM »
I've just tried with the current WACUP dev build (equivalent to the current beta) & also against a plain 5.666 & a completely clean install of the current preview build 7236 & that stream url plays fine in all 3 of them.

The test.aac is also working fine so there's got to be something wrong with the install & there's no point in continuing the talk about plug-ins & stuff as it shouldn't be needed.

With the AAC in the main playlist editor, is it showing any information when you open the alt+3/view file info dialog on it ? Have attached what I'm seeing for it.

-dro
« Last Edit: November 02, 2021, 07:20:23 PM by dro »

daniel_kukiela

  • Beta Tester
  • Full Member
  • ***
  • Posts: 14
    • View Profile
Re: Internet stream vs title and image
« Reply #6 on: November 02, 2021, 07:46:41 PM »
I see exactly the same info.

I might perform a clean install of WACUP, but it has been a clean install in a clean Windows 10 install. Do you think I might be missing something in my system then? Some codec maybe?

dro

  • Admin / WACUP Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 4428
    • View Profile
    • WACUP (Winamp Community Update Project)
Re: Internet stream vs title and image
« Reply #7 on: November 02, 2021, 07:51:52 PM »
There's no external dependencies used when it comes to in_mp3 & it's handling of streams or mp3/aac files.

-dro

daniel_kukiela

  • Beta Tester
  • Full Member
  • ***
  • Posts: 14
    • View Profile
Re: Internet stream vs title and image
« Reply #8 on: November 02, 2021, 08:17:14 PM »
So... I reinstalled WACUP and... indeed it works. I have no idea why it didn't previously. I also see the current title, so the Shoutcast metadata is being parsed and shown properly.
I'm a heck of a happy man as I can add streams to WACUP now (and also to my Stream Deck).
Thank you and sorry for taking this much of your time.

Speaking theoretically, the site that uses this stream also shows a cover photo (https://open.fm/stacja/weekend-hits). I'm not sure if they also attach it with the Shoutcast metadata included within this stream. Does WACUP support not only a title but also this image if it's attached? If to believe this: https://www.radioforge.com/icecast-shoutcast-metadata-with-artwork-image/, Icecast can attach images.
Why I'm asking is I could still tinker here a bit to achieve this.

dro

  • Admin / WACUP Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 4428
    • View Profile
    • WACUP (Winamp Community Update Project)
Re: Internet stream vs title and image
« Reply #9 on: November 02, 2021, 08:37:54 PM »
That's good that it's now working correctly for you. Still baffling that it messed up but that's computers for you at times.

I don't remember Icecast sending the artwork as part of the stream either as an url within the shoutcast compatible metadata block though it could or as something within the connection headers. Not that in_mp3 is going to really do anything with it even if it is present & I don't know there's many that even attempt to set it (radio paradise were the only ones I really remember ever string to use the stream_url option in that metadata block).

What you've linked is using a custom api as part of their offered hosting service afaict.

-dro

daniel_kukiela

  • Beta Tester
  • Full Member
  • ***
  • Posts: 14
    • View Profile
Re: Internet stream vs title and image
« Reply #10 on: November 02, 2021, 09:15:12 PM »
Ok, so it seems that the only way to make cover images work would be to write own plugin. I'm not going to attempt to, at least for now. I have too many things I want to do :)

Thank you for your help here and for answering my questions.

dro

  • Admin / WACUP Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 4428
    • View Profile
    • WACUP (Winamp Community Update Project)
Re: Internet stream vs title and image
« Reply #11 on: November 02, 2021, 11:28:44 PM »
If there was a nice consistent way for me to know what the artwork for an icecast / shoutcast style stream is then I could have my artwork handling do a look-up but it's knowing the url that is the issue & is something that has annoyed me so much with those services that nothing gets done (annoyingly what I'd been trying to get into SHOUTcast to help do just that never got finished before I was let go). Oh well, at least they play for you :)

-dro