Convert m3u, m3u8 or xspf to jellyfin's XML - Printable Version +- Jellyfin Forum (https://forum.jellyfin.org) +-- Forum: Support (https://forum.jellyfin.org/f-support) +--- Forum: General Questions (https://forum.jellyfin.org/f-general-questions) +--- Thread: Convert m3u, m3u8 or xspf to jellyfin's XML (/t-convert-m3u-m3u8-or-xspf-to-jellyfin-s-xml) |
Convert m3u, m3u8 or xspf to jellyfin's XML - johnson - 2025-01-23 Does anyone know of an automated way to turn an xspf, m3u or any other playlist from VLC into Jellyfin's XML format? I can create folders & images manually but the playlist conversion is a PITA to do manually. Looking for a script, website, or other automated way of doing this. xspf uses full filepaths of media files so it shouldn't be an issue... just can't find the right tool. RE: Convert m3u, m3u8 or xspf to jellyfin's XML - TheDreadPirate - 2025-01-23 If the M3U is using absolute paths, you can just put it in Jellyfin and it will read the M3U. If you then want it to be in a proper Jellyfin playlist, you can click on the "..." context menu for the playlist and then "Add to playlist" and create a new one. It will add the entire contents of the M3U playlist into a Jellyfin playlist. XSPF MIGHT be supported. I see xspf in one of the mimetype files, but I don't see references to it in other parts of Jellyfin's code. RE: Convert m3u, m3u8 or xspf to jellyfin's XML - johnson - 2025-01-23 (2025-01-23, 06:30 PM)TheDreadPirate Wrote: If the M3U is using absolute paths, you can just put it in Jellyfin and it will read the M3U. If you then want it to be in a proper Jellyfin playlist, you can click on the "..." context menu for the playlist and then "Add to playlist" and create a new one. It will add the entire contents of the M3U playlist into a Jellyfin playlist. Hmm. This is the format of my m3u playlist: Code: #EXTM3U Jellyfin recognizes that there is a playlist but it is empty, even after re-scanning both the playlist and music libraries for new metadata. Even restarted JF, but the playlists are still empty. Edit to add: That is the absolute path, beginning with /media/me....
RE: Convert m3u, m3u8 or xspf to jellyfin's XML - TheDreadPirate - 2025-01-23 If you are using Docker to run Jellyfin, do those absolute paths match the same path from within the container's reference frame? RE: Convert m3u, m3u8 or xspf to jellyfin's XML - johnson - 2025-01-23 (2025-01-23, 07:12 PM)TheDreadPirate Wrote: If you are using Docker to run Jellyfin, do those absolute paths match the same path from within the container's reference frame? I'm not using docker, installed on Ubuntu 24.04 LTS, bare metal. Paths are accurate. RE: Convert m3u, m3u8 or xspf to jellyfin's XML - TheDreadPirate - 2025-01-23 Remove all the URL encoded characters and replace them with what they should be in plain text. Looks like theyre all %20 in the example (spaces). And remove "file: //" So it is just a plain absolute path. You also don't need any of the #EXT lines. I recall another user had better results with M3U playlists once they removed all the extraneous #EXT tags. RE: Convert m3u, m3u8 or xspf to jellyfin's XML - johnson - 2025-01-23 For anyone else who does a search, I wrote my own little python script. This gets you 90% of the way and the last 10% is manual. All steps are below. 1. Export playlist from VLC in xspf format. Name it input.xspf 2. Run the script below in the terminal $ python3 convert_xspf_to_xml.py . It will create a file called output.xml 3. In output.xml, manually change the url encoded characters to spaces, apostrophes, etc. Do a search for % (the percent sign). Use "Find & Replace All" to do replace these out quickly. file: // Again, "Find & Replace All" does this in one shot /var/lib/jellyfin/data/playlists/ and find your playlist folder, in that folder there will be a playlist.xml file. Open it and add in the extra songs from your output.xml file. Then save it. convert_xspf_to_xml.py
|