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

m3u playlist parsing #408

Closed
GeorgeBroughton opened this issue Apr 8, 2021 · 6 comments
Closed

m3u playlist parsing #408

GeorgeBroughton opened this issue Apr 8, 2021 · 6 comments

Comments

@GeorgeBroughton
Copy link

GeorgeBroughton commented Apr 8, 2021

I've noticed when i create an m3u8 playlist, Syncplay doesn't parse metadata in the list. Not a huge deal, but it can make things more readable when your username and passwords that are in those links are 128 character randomly generated strings lol

Example.m3u8:

#EXTM3U
#EXTINF:123, Movie1
https://username:[email protected]/Movies/some_movie.mp4
#EXTINF:123, Movie2
https://username:[email protected]/Movies/some_other_movie.mp4

VLC media player will display the names of the movies as "Movie1" and "Movie2" that are 2 minutes and 3 seconds long (123 seconds) rather than the URL, if i open it directly. However syncplay does this:
image

It's treating the comments/metadata in the file as though it's a movie to play, rather than the title info & other metadata.

So, i have some suggestions. Either:
A: Make the playlist a "DataGridView Control" or at least that's what it's called in winforms, though i see you're using qt, so whatever the equivalent is in there. Add columns for Artist, Album, Title, Track number, URL, Duration, etc. Have it populate that list from the metadata/URLs.

B: Make it ignore empty lines and metadata. It'll still pull the links through though and it'll work. It just won't be purdy.

I'm willing to put in a herculian effort to add this myself someday, but i have a lot on my plate right now, and probably will for a while. Any questions on implementation, I'm happy to answer though.

There's some documentation here on the subject:
https://docs.fileformat.com/audio/m3u/

@Et0h
Copy link
Contributor

Et0h commented Apr 9, 2021

I am not in favour of making the playlist more complex as per the principles set out at #315 so don't want to see a DataGridView. Getting a playlist system with easy dragging and dropping with the current list was actually quite difficult and adding information from metadata brings us into a whole new area because at present Syncplay just gets this information from the media player itself and doesn't ever need to directly load a media file (or track metadata for items in the playlist which are not currently playing).

However, I think it would be an improvement to strip comments etc from m3u files at would be happy to see someone make a PR for this. I think that to properly parse arbitrary m3u files Syncplay might also need to strip out local full and relative paths (if it doesn't already do this). At present Syncplay is only really designed to parse the m3u8 files created through the Save Playlist option (so only a subset of what the format allows).

@Et0h
Copy link
Contributor

Et0h commented Apr 9, 2021

Okay, the more I look into the details of the .m3u format the more I want Syncplay to simply support txt files with one filename/character per line. Issue include handling filenames starting with a # and handling items using special characters. I'm now in favour of just changing the default file format for loading/saving playlists to .txt and making it clear in our documentation that Syncplay does not provide full m3u support.

Et0h added a commit that referenced this issue Oct 27, 2021
* Create pythonpackage.yml

* Update pythonpackage.yml

* Update pythonpackage.yml

* Update pythonpackage.yml

* Update pythonpackage.yml

* Update pythonpackage.yml

* Update pythonpackage.yml

* Update pythonpackage.yml

* Update pythonpackage.yml

* Update pythonpackage.yml

* Update pythonpackage.yml

* Update pythonpackage.yml

* Update pythonpackage.yml

* Update pythonpackage.yml

* Update pythonpackage.yml

* add libxcb manually

* Add missing libxcb-util to build environment

* Remove references to IRC (#430)

* Add reference to GitHub discussions

* Update issue templates

* Revert "Merge branch 'master' into master"

This reverts commit 173007e, reversing
changes made to 6105da8.

* Make Windows build 32-bit

* Support for LAV Filters Megamix (#457)

* Upver to 1.7.0 (r100)

* Refactor MPC-HC player path code (#453)

* Add LANG Parameter (#460)

If LANG parameter set, don't show language dialog.
Example usage: .\Syncplay-X.X.X-Setup.exe /S /LANG=1033

* Trusted Domains: Allow trusting a domain regardless of HTTP basic auth credentials (#437)

* Trusted Domains: don't consider HTTP basic auth credentials part of the domain name

* Trusted Domains: hide "add as trusted domain" menu item if entry does not contain domain

* Trusted Domains: strip HTTP basic auth credentials also when adding as trusted domain via context menu

* Allow .m3u/.m3u8 files to be played from network (#419)

* Fix room name case sensitivity UI issue (#403)

* Remove redundant help button from dialogs (#403)

* darkdetect: update vendor copy to 0.5.0

* macOS build: upgrade to Python 3.9 and PySide2 5.15.2

* Remove Encoding from .desktop files as it's depreciated now.

* Add Keywords entry to .desktop files.

* Console: Document setting offset in help (#435)

* Add deprecation notice for offset help (#435)

* Begin move from m3u/m3u8 to txt for playlist (#408)

Co-authored-by: Daniel Wróbel <[email protected]>
Co-authored-by: daniel-123 <[email protected]>
Co-authored-by: Assistant <[email protected]>
Co-authored-by: ImportTaste <[email protected]>
Co-authored-by: Ata Gülalan <[email protected]>
Co-authored-by: Tremolo4 <[email protected]>
Co-authored-by: Ridan Vandenbergh <[email protected]>
Co-authored-by: Alberto Sottile <[email protected]>
Co-authored-by: Luke Dashjr <[email protected]>
@Et0h
Copy link
Contributor

Et0h commented Jan 2, 2022

Okay, I've now added a note to https://syncplay.pl/guide/trouble/ to make it clear that Syncplay does not provide full m3u support and that you need to provide one filename per line and nothing else.

@Et0h Et0h closed this as completed Jan 2, 2022
@JordanPlayz158
Copy link

I'm aware SyncPlay does not support m3u fully but I am trying to play a m3u8 playlist from a website and only have 1 filename per line and have tried 1 url per line and it works fine with mpv normally but not through syncplay, is there any reason syncplay has it's own m3u parsing when mpv can handle m3u fully?

@Et0h
Copy link
Contributor

Et0h commented Feb 24, 2022

  1. Syncplay is not simply for mpv.
  2. Syncplay does not have M3U or M3U8 parsing it has parsing for its one file per line system for locally storing playlists.
  3. Playing playlists from a website is not a Syncplay feature.

@JordanPlayz158
Copy link

  1. True, although not sure how many clients officially supported by SyncPlay don't have M3U/8 support
  2. Yeah, that's what I meant (and used your wording from the previous comment)
  3. Oh alright, might be a good feature though as most players should support it if they support M3U/8. I could attempt to add playlist from website support unless this is not a feature or vision you wish to be in SyncPlay

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