Rafostar / clapper

Level up your video experience with a modern and user-friendly media player.
https://rafostar.github.io/clapper/
GNU General Public License v3.0
784 stars 37 forks source link

FR: support m3u playlists #476

Open RedAuburn opened 2 months ago

RedAuburn commented 2 months ago

stremio web allows to use an external player via an m3u playlist, which contains URLs to videos. it'd be nice to support m3us to watch these streams via clapper.

https://web.stremio.com (enable external m3u player in settings)

example attached (remove .txt) playlist.m3u.txt

Rafostar commented 2 months ago

This seems to be a normal HLS master playlist manifest, ergo should be working as-is. What is the error you are getting?

RedAuburn commented 2 months ago

ah great :)

image

I get this, it's the flatpak version so maybe the gstreamer plugin isn't bundled?

Clapper version: 0.6.1

Debug info: GLib 2.78.6 GTK 4.12.5 Adwaita 1.4.5 GStreamer 1.22.8

Rafostar commented 2 months ago

I get this, it's the flatpak version so maybe the gstreamer plugin isn't bundled?

This seems like a typefind issue. GStreamer should parse content of this playlist text file and determine that this is a HLS playlist. Instead, it seems to think its a plain text file with uri-list (one URI per line). So it makes a mistake and asks for a wrong plugin.

You can try playing it with your local GStreamer installation via to check if same problem happens:

 gst-play-1.0 URI/FILE

Ideally, this should be confirmed whether the same problem still occurs in latest GStreamer version (1.24) and it does, reported upstream.

RedAuburn commented 2 months ago

can confirm the same issue happens:

harry@fedora-desktop:~$ gst-play-1.0 '/home/harry/Downloads/playlist.m3u' 
Press 'k' to see a list of keyboard shortcuts.
Now playing /home/harry/Downloads/playlist.m3u
ERROR Your GStreamer installation is missing a plug-in. for file:///home/harry/Downloads/playlist.m3u
ERROR debug information: ../gst/playback/gstdecodebin3.c(3309): mq_slot_check_reconfiguration (): /GstPlayBin3:playbin/GstURIDecodeBin3:uridecodebin3/GstDecodebin3:decodebin3-0:
No suitable plugins found
Reached end of play list.

will report upstream, thanks :)

Rafostar commented 2 months ago

Well, guess they suggested having playlist parser on the application side. So reopening as FR.

Rafostar commented 2 months ago

If we are doing special playlist handling as part of Clapper APIs, it would be beneficial if we could make some sort of "expandable parser", so more custom playlist formats can be handled too. A common request is for supporting YT playlist URIs.

Some rough/early ideas for this, so I will not forget:

barolo commented 3 weeks ago

Additionally, streams like https://jmp2.uk/sam-USBD12000038K.m3u8 [Portlandia stream channel] are treated very poorly. The lowest res track is picked, and there are no subs [eia and vtt are avaiable]

gst-launch-1.0 playbin3 uri="https://jmp2.uk/sam-USBD12000038K.m3u8" flags=0x17 subtitle-font-desc="Sans, 22" plays it properly [adaptivedemux2 plugin must be installed]