kartik-venugopal / aural-player

An audio player for macOS, inspired by Winamp.
MIT License
732 stars 43 forks source link

Support for online streams #38

Open DrGylfin opened 2 years ago

DrGylfin commented 2 years ago

First, let me say that I really like Aural as a player, both aesthetically and functionally.

My one ... stumbling block is that I tend to listen to a lot of internet radio and the like. One station, for example, does its stream via an .ogg file (presumably Vorbis) that it typically plays via a web front-end.

Aural is of course less memory-intensive than a browser tab and better from a usability standpoint overall. So I'd love to be able to add a URL/streaming file and have it stream to Aural rather than relying on the web app or whatever.

ffmpeg has built-in support for streaming a remote file, but I don't know enough about Aural's actual operation to know how hard that would be to implement.

kartik-venugopal commented 2 years ago

Hi @DrGylfin, thanks very much for the feedback and suggestion ! Glad you like the player so far.

The idea of being able to play online streams has been on / off my mind since the inception of Aural Player, and I have looked at other projects to see how they've done it. As you can imagine, it would require a fair bit of work ... even though ffmpeg (or AVFoundation for native files) does most of the heavy lifting. Also, a poor implementation of streaming may negatively affect how users perceive the app, so if I do implement it, I want to make sure it will be reliable (to the extent possible with internet streaming) and provide a good user experience. Hope that makes sense.

That said, I am currently in the process of developing version 4.0, which may come out later this year, and now that you've mentioned that you would find this feature useful, I have added it to the list of new features in the "Roadmap" section of the main README page, and I will do some experimentation to try and implement it in v4.0 ! The new features / improvements list is already quite long, and I'm a one-man army ... so I can't predict when any new features may be released, but I can promise that provided I do find the time, I will give serious thought to online streaming :-)

Cheers !

DrGylfin commented 2 years ago

Thanks for the reply, and that makes complete sense. If I trusted my knowledge of Swift (which is rudimentary at best) I'd offer to contribute, but, well, I don't :)

I don't know if you've seen this one, but plug is an open source project that pulls audio from a specific website, so I don't know if that would be useful in terms of figuring out the implementation. I wish I could offer more.

kartik-venugopal commented 2 years ago

Thanks for the project link ... I will take a look.

BTW, I saw your profile and that you're new to programming. As someone who has been developing for 20+ years ... mostly in Java, and now in Swift, I will say this (as a general remark, not in relation to this project):

Of all the languages I have programmed in, Swift is, by far, the most powerful, extensible, concise, and expressive language. It is an absolute pleasure to write Swift code.

If you ever have to decide which prog. language to learn, that's something to consider :)

DrGylfin commented 2 years ago

Thanks for the thoughts! I have thought about learning some Swift, but my only issue is that it would limit the reach of whatever I write, since it's Apple only. As much as I enjoy my Mac, I can't say that I like Apple's attempts to separate their software ecosystem from other platforms (see also: Metal). Still, I'm sure I'll end up dabbling in Swift sooner or later!

DrGylfin commented 2 years ago

Another thought: would it be easier to implement something like Spotify with a defined API?

kartik-venugopal commented 2 years ago

You mean use Aural as a Spotify client ? Yeah, I guess that could be a viable option with a well-defined API.

I might be wrong, but I think that the bulk of the work to implement streams wouldn't vary much with the source of the stream.

In other words, whether I implement general streaming or Spotify or anything else, the amount of work required should be about the same ... unless Spotify has a specialized C / Objective-C / Swift client library for decoding their stream, which I don't think they do (I might be wrong).

DrGylfin commented 2 years ago

Spotify turns out to be a bad example, because the only way to do playback is through their web API.

I did some digging, and there is a built-in Swift interface for handling streamed audio called, appropriately enough, Audo File Stream Services. I also found where someone used this framework to create a library for streaming audio in Swift. I hope these are helpful!

kartik-venugopal commented 2 years ago

Thanks. Yeah, I had a brief look at Audio File Stream Services a while ago. That is probably going to be required in some capacity. And ffmpeg for non-native formats.

There is also this project (Swift): https://github.com/syedhali/AudioStreamer.

As I said, I may not get around to doing this for a while, as I'm busy with other stuff at the moment. But I'm noting down your suggestions. A Spotify integration might be something a lot of users value / enjoy.

tobbioleg commented 1 year ago

СПАСИБО ТЕБЕ ЗА ПЛЕЕР. ПРОДОЛЖАЙ РАЗВИВАТЬ. ЕСЛИ ЕСТЬ У ТЕБЯ ВОЗМОЖНОСТЬ ТО ДОБАВИЛ БЫ РУССКИЙ ЯЗЫК. ОЧЕНЬ БЛАГОДАРЕН ТЕБЕ ЗА ПРОДЕЛАННУЮ РАБОТУ. ПРОДОЛЖАЙ РАЗВИВАТЬ ПЛЕЕР. А ПРО НАСТРОЙКИ НА РУССКОМ ЯЗЫКЕ ПОДУМАЙ. БЛАГОДАРЕН ТЕБЕ БЫЛ БЫ НЕ ТОЛЬКО Я НО И МНОГИЕ ДРУГИЕ. СПАСИБО ЗА ПРОЕКТ.

kartik-venugopal commented 1 year ago

СПАСИБО ТЕБЕ ЗА ПЛЕЕР. ПРОДОЛЖАЙ РАЗВИВАТЬ. ЕСЛИ ЕСТЬ У ТЕБЯ ВОЗМОЖНОСТЬ ТО ДОБАВИЛ БЫ РУССКИЙ ЯЗЫК. ОЧЕНЬ БЛАГОДАРЕН ТЕБЕ ЗА ПРОДЕЛАННУЮ РАБОТУ. ПРОДОЛЖАЙ РАЗВИВАТЬ ПЛЕЕР. А ПРО НАСТРОЙКИ НА РУССКОМ ЯЗЫКЕ ПОДУМАЙ. БЛАГОДАРЕН ТЕБЕ БЫЛ БЫ НЕ ТОЛЬКО Я НО И МНОГИЕ ДРУГИЕ. СПАСИБО ЗА ПРОЕКТ.

Hello, thank you for the kind words. Unfortunately, I don't have any collaborators who speak Russian, so I am not able to provide app text in Russian or other languages.

zampanos-cats commented 1 year ago

Я нехорошо говорю по-русский, но не знаю (наверное лучше сказат, что не думаю) если достаточно, чтобы перевести целый интерфейс програмы на русском. Может быть, что ты согласный откорректировать?

tobbioleg commented 1 year ago

СПАСИБО ЗА ОТВЕТ. ЕЩЕ РАЗ БЛАГОДАРЮ ЗА ПЛЕЕР. ПОКА.