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

FR: support m3u playlists #476

Open
RedAuburn opened this issue Jul 22, 2024 · 12 comments
Open

FR: support m3u playlists #476

RedAuburn opened this issue Jul 22, 2024 · 12 comments

Comments

@RedAuburn
Copy link

RedAuburn commented Jul 22, 2024

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
Copy link
Owner

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

@RedAuburn
Copy link
Author

RedAuburn commented Jul 22, 2024

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
Copy link
Owner

Rafostar commented Jul 22, 2024

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
Copy link
Author

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 :)

@RedAuburn RedAuburn closed this as not planned Won't fix, can't repro, duplicate, stale Aug 4, 2024
@Rafostar
Copy link
Owner

Rafostar commented Aug 6, 2024

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

@Rafostar Rafostar reopened this Aug 6, 2024
@Rafostar Rafostar changed the title support opening m3u playlist from stremio FR: support m3u playlists Aug 6, 2024
@Rafostar
Copy link
Owner

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:

  • playlist parser/reader that returns a list of ClapperMediaItem objects
  • a base class for creating more parsers
  • playlist parser can be expanded with modules (needs to be initialized! - to decide if it should be done as part of clapper_init() or separately)
  • works in reverse too (can export/save queue to playlist with media title, etc.) - [Feature Request] save playlist / queue #478

@barolo
Copy link

barolo commented Sep 24, 2024

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]

@Rafostar
Copy link
Owner

Additionally, streams like https://jmp2.uk/sam-USBD12000038K.m3u8 [Portlandia stream channel] are treated very poorly. (...) adaptivedemux2 plugin must be installed

You can use CLAPPER_USE_PLAYBIN3=1 env to force usage of playbin3 and thus adaptivedemux2 inside it.

@barolo
Copy link

barolo commented Feb 24, 2025

Additionally, streams like https://jmp2.uk/sam-USBD12000038K.m3u8 [Portlandia stream channel] are treated very poorly. (...) adaptivedemux2 plugin must be installed

You can use CLAPPER_USE_PLAYBIN3=1 env to force usage of playbin3 and thus adaptivedemux2 inside it.

VTT subs show up now, but cea-608 captions are still missing. I'm sure that they're there [checked with other player and stream analyzer] . Any idea how to fix this?

@barolo
Copy link

barolo commented Feb 24, 2025

Also, opening m3u file [master playlist with hls streams] still doesn't work. Clapper complains that it's a text file.

@Rafostar
Copy link
Owner

Rafostar commented Feb 27, 2025

cea-608 captions are still missing. I'm sure that they're there [checked with other player and stream analyzer] .

Did you check with another GStreamer-based player? From the manifest, it seems these are INSTREAM-ID="CC1" and as far as I see, GStreamer does not support this yet: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/3523ba76ae08193a14467a4cddf008f2bdc3f9ad/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.c?page=3#L2728

So the "fix" would be implementing them in GStreamer, then they should show up and "just work" in Clapper.

Also, opening m3u file [master playlist with hls streams] still doesn't work. Clapper complains that it's a text file.

This issue/feature request is still open after all.

@barolo
Copy link

barolo commented Mar 5, 2025

Did you check with another GStreamer-based player? From the manifest, it seems these are INSTREAM-ID="CC1" and as far as I see, GStreamer does not support this yet: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/3523ba76ae08193a14467a4cddf008f2bdc3f9ad/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.c?page=3#L2728

So the "fix" would be implementing them in GStreamer, then they should show up and "just work" in Clapper.

It's a funny situation, because ffmpeg [via mpv for example] supports eia in adaptive hls, but not vtt, and with gstreamer it's the other way around 😅

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