Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow playback of URL streams #73

Open
4 tasks done
summersab opened this issue Jul 20, 2024 · 4 comments
Open
4 tasks done

Allow playback of URL streams #73

summersab opened this issue Jul 20, 2024 · 4 comments

Comments

@summersab
Copy link

summersab commented Jul 20, 2024

Checklist

  • I have used the search function for OPEN issues to see if someone else has already submitted the same feature request.
  • I have also used the search function for CLOSED issues to see if the feature was already implemented and is just waiting to be released, or if the feature was rejected.
  • I will describe the problem with as much detail as possible.
  • This request contains only one single feature, not a list of multiple (related) features.

App version

6.1.0

Where did you get the app from

F-Droid

Problem you may be having, or feature you want

Podcini cannot play m3u files URL media streams. Sometimes (like when I am at the gym), I play all of the podcasts I have in the queue, and I need to stop what I am doing, open my radio app (I use RadioDroid), and play a station.

Suggested solution

It would be nice if Podcini could open and play streams stored in m3u files URL media streams. True, this is a bit out of the wheelhouse of what Podcini is designed to do (it is a podcast player, not a media or radio player), but it would be a handy addition to add to the end of queues. This may need to have some limitations (only one stream per m3u file, for example).

Screenshots / Drawings / Technical details

No response

@XilinJia
Copy link
Owner

Hum, not sure. Can you provide a sample file?

@summersab summersab changed the title Allow m3u playback from local folder Allow playback of URL streams Jul 22, 2024
@summersab
Copy link
Author

I changed the subject and content of this feature request. Opening m3u files might be beyond the scope of Podcini because these files store multiple URL streams, and you would need to include a m3u parser. However, it MIGHT be a viable and elegant solution (see point 2 a the end of this comment).

Instead, perhaps Podcini could simply open URL media streams that are added as episodes. These could then be added to queues and played just like a normal podcast episode.

From a technical perspective, I am not sure of the best way to implement this. Here are a few ideas for how to add URL streams (maybe you can think of a better alternative):

  1. Under the "Add podcast" > "Advanced" section, add a "Add URL Stream" option. This would open a popup (similar to the "Add Podcast by RSS address" popup) for the user to add the stream's URL. The stream would then be accessible in one of two ways:

    • Add all streams to a single subscription called "Streams." Each stream would be a separate "episode." (This would probably be easiest approach).
    • Add each stream as a separate subscription. A single episode would be created under the subscription to play the stream.
  2. Parse m3u files stored in local folders (my original idea). When a m3u file is detected in a local folder:

    • Parse the contents of the file
    • Add each stream in the file as a separate episode inside the local folder episode view
    • Do not actually show the *.m3u file in the local folder episode view

    This would probably be the most elegant solution, but it would require a parser and handling the details of the file format.

Below is an example m3u file I created by exporting my stations from RadioDroid. You can find more documentation of this format online - Wikipedia has an article with some examples. Also, I found a m3u parser written in Kotlin if you wanted to go that direction: https://github.com/BjoernPetersen/m3u-parser

#EXTM3U

#EXTINF:-1,http://natrix.sugarrivermedia.com:8000/wntk
http://natrix.sugarrivermedia.com:8000/wntk
sugarrivermedia.com:8000/wntk

#RADIOBROWSERUUID:8b78046f-2a55-4a50-a210-e6706669ff0b
#EXTINF:-1,105.9 FM WMAL
https://playerservices.streamtheworld.com/api/livestream-redirect/WMALFMAAC.aac

#RADIOBROWSERUUID:e62e1b9a-6d33-4c3f-9ea3-2626816f621e
#EXTINF:-1,WBAP News Talk
http://playerservices.streamtheworld.com/pls/WBAPAMAAC.pls

#RADIOBROWSERUUID:c6cfe25d-6f18-4b61-90a4-c74b941f440b
#EXTINF:-1,WRKO-AM 680
https://stream.revma.ihrhls.com/zc7750

#RADIOBROWSERUUID:0ade1609-b619-42e4-920d-b4bda670708d
#EXTINF:-1,WKIP 1450 & 98.5 FM Newstalk
http://stream.revma.ihrhls.com/zc5877/hls.m3u8

Let me know if you have questions or if my explanations didn't make sense. I am happy to provide more details!

@summersab
Copy link
Author

I thought of a really cool way to add this functionality to Podcini. It would be a massive addition to the app, so this is a long-term idea that will require a lot of thought and planning (fixing bugs in 6.x is obviously more important, right now).

I listen to a lot of podcasts and radio shows. For podcasts, I use Podcini; for radio, I use RadioDroid. A lot of podcasts are in fact radio shows - they are simply rebroadcasts of the show in podcast form. I wish I could treat URL streams in RadioDroid like they were podcast episodes, seamlessly switch stations once one show stops and another starts (usually at the top of the hour), or switch to a radio stream from a podcast (or vice versa).

I think a case could be made for adding radio streaming support to Podcini. Here are a few use cases I have:

  • Often when I listen to a station in RadioDroid, the current show ends, but the next show doesn't interest me. I decide to play a podcast instead, but I have to unlock my phone, switch to Podcini, and play a podcast.
  • When I am waiting for a radio show to start broadcasting, I sometimes listen to a podcast in Podcini just to fill the time. However, I have to watch the clock to make sure to switch to RadioDroid in time for the show to start.
  • Many of the radio shows I listen to are on different stations. Once one show ends, I have to unlock my phone and switch stations in RadioDroid.

If I am at the gym, have my hands dirty from working on my car, am in the kitchen cooking, etc, accessing my phone may be difficult. It would be great if I could create a queue that contains both podcasts and radio stations (URL streams).

However, since URL radio streams are continuous, there is no way to automatically switch playback once a show stops and another one starts. To solve this, any item in the queue could have a "automatically advance to next episode" setting where the user can add a time (either exact time or a countdown) allowing the playback to automatically advance once the time is reached. This way, I can treat radio shows as if they were podcast episodes, have them automatically advance once the show ends based on a timer, and listen to both radio streams and podcasts from a single queue.

At the very minimum, the following two features would provide Podcini with this capability:

  • Add support for URL stream playback. Under the "Advanced" section of the "Add podcast" view, provide an "Add URL stream" option. New streams will be added to a separate "Streams" subscription.
  • Add the ability to set timers on items in a queue so playback automatically advances once a time (specific or countdown) has been reached.

Much later down the road, perhaps the following could be added:

  • Parse m3u files stored in local folders. Instead of showing the m3u files themselves in the folder view, add the streams stored inside the m3u files as separate "episodes" within the local folder.
  • Add a "Search radio stations" box under the "Add podcast" view so users can search for radio stations and add them directly within Podcini. RadioDroid uses the https://radio-browser.info database which has a pretty flexible API.

Again, this is a pretty radical idea that will take a lot of work, but I don't know of another app that can do this sort of thing. It would really make Podcini unique and help it stand out from other podcast apps out there.

@dyeray
Copy link

dyeray commented Aug 21, 2024

Hmm, I'm intrigued by this, but I don't see how your use case could make sense on a podcasts app. My logic tells me that if you add radio support it would go on a different section and not on the queue. Seems a bit confusing for a user to mix episodes of podcasts, which by definition end at some point and playback go to the next item, with streams, which never end. Would all radios be on the queue forever? A radio station would be a podcast or an episode of a podcast?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants