Save playlist using relative path

Feature requests for VLC.
goa103
Blank Cone
Blank Cone
Posts: 31
Joined: 07 Jun 2004 23:19

Save playlist using relative path

Postby goa103 » 28 Sep 2004 12:24

Hello,

We should be able to choose between absolute and relative paths. VLC just saves the playlist using absolute paths. It means playlists are broken if you move the songs from one drive to an other, C: to D: or hard disk to CD/DVD reader/burner. It means you can't burn a valid playlist, all paths are broken on burning.

A solution would be to add a Save playlist using relative path checkbox to the Settings > Preferences > Playlist tab. By default I think VLC should ask for it first to the user, the dialog should present a don't ask anymore checkbox to avoid future intrusions and of course a help message like You can change it later from the... Playlist tab.

JM

The DJ
Cone Master
Cone Master
Posts: 5987
Joined: 22 Nov 2003 21:52
VLC version: git
Operating System: Mac OS X
Location: Enschede, Holland
Contact:

Postby The DJ » 28 Sep 2004 16:18

well this isn't really the intention of the VLC playlist routine. Usually it is to save the location of streams etc.

besides you can easily edit/create a playlist file by hand.

at the moment the work required to get the playlist writer that smart might just be a little too much.
Don't use PMs for support questions.

goa103
Blank Cone
Blank Cone
Posts: 31
Joined: 07 Jun 2004 23:19

Postby goa103 » 29 Sep 2004 09:14

well this isn't really the intention of the VLC playlist routine. Usually it is to save the location of streams etc.

besides you can easily edit/create a playlist file by hand.

at the moment the work required to get the playlist writer that smart might just be a little too much.
I didn't know that :). I thought VLC was a media player like MPC or Zoom Player, but VLC is a Free Software and Open Source video streaming solution for every OS!. Now I better understand why it saves the files using an absolute path.

Any plan to make VLC a classic media player ?

Sigmund
Big Cone-huna
Big Cone-huna
Posts: 893
Joined: 26 Nov 2003 09:38

Postby Sigmund » 03 Oct 2004 16:38

I think your suggestion is good. VLC started off as a classic media player (mainly intended for network streams) and have moved on to a broader solution. The playlist saving code in vlc is still quite imature though, so this would be a nice feature.

markfm
Big Cone-huna
Big Cone-huna
Posts: 1536
Joined: 22 Feb 2004 17:42

Postby markfm » 04 Oct 2004 02:23

Turns out that VLC already works fine with a relative playlist, just doesn't have the option to store the paths that way. I created a videos folder in vlc, parked a few films in it, creeated a playlist and also stored it there. Hand-edited the m3u file to delete the c:\vlc\videos part of the paths. Relaunched vlc, opened the playlist and the videos played fine.

(VLC created the full path, necessary to actually play the movies, based on the relative path info in the m3u file.

Sounds like the code is really pretty much there, just need that one switch, to be able to select relative.

Teetow
New Cone
New Cone
Posts: 9
Joined: 04 Jan 2004 06:26
Contact:

Postby Teetow » 04 Oct 2004 02:42

I'd venture a guess to say that it's not thanks to VLC, I imagine the file API:s in windows / *X can tolerate relative paths. So, as *cough* the developer says, it's not that easy to do. Personally, I'd write a cute little shellscript or two to handle my problems.

Sigmund
Big Cone-huna
Big Cone-huna
Posts: 893
Joined: 26 Nov 2003 09:38

Postby Sigmund » 04 Oct 2004 09:19

VLC do support relative paths when _reading_ playlists. Oh, and if you add the items to the vlc playlist with relative paths before saving the playlist, the playlist will end up having relative paths (note that the file-open dialog and drag'n drop puts absolute paths in the playlist).

goa103
Blank Cone
Blank Cone
Posts: 31
Joined: 07 Jun 2004 23:19

Postby goa103 » 04 Oct 2004 15:05

Hello,
well this isn't really the intention of the VLC playlist routine. Usually it is to save the location of streams etc.

besides you can easily edit/create a playlist file by hand.

at the moment the work required to get the playlist writer that smart might just be a little too much.
Well I just checked it out how it would be possible to quickly fix this. I found a Export_M3U function in the m3u.c file.

One line is used to export the playlist item to the playlist file :

Code: Select all

fprintf( p_export->p_file, "#EXTINF:%i,%s,%s\n", (int)(p_playlist->pp_items[i]->input.i_duration/1000000), psz_author ? psz_author : "", p_playlist->pp_items[i]->input.psz_name );
So one checkbox in the UI, one condition in this loop and voilà, it would be fix. So I don't think it's that hard to do.

However it all depends of what VideoLAN/VLC really is. On the main page we can read that VideoLAN is a Free Software and Open Source video streaming solution for every OS! but VLC media player is a cross-platform media player and streaming server. I never thought VideoLAN and VLC were two different softwares. Are they ?

JM

The DJ
Cone Master
Cone Master
Posts: 5987
Joined: 22 Nov 2003 21:52
VLC version: git
Operating System: Mac OS X
Location: Enschede, Holland
Contact:

Postby The DJ » 04 Oct 2004 15:17

VideoLAN is a group name, VLC a product name.
For me this is of no importance, i find m3u's more a problem than useful. (if you open an album you get all the songs twice, because vlc opens the playlist AND the songs).
Don't use PMs for support questions.

goa103
Blank Cone
Blank Cone
Posts: 31
Joined: 07 Jun 2004 23:19

Postby goa103 » 29 Sep 2006 18:55

Any news on this matter ? I'm using version 0.8.5 and playlist items are still saved using absolute paths. I wonder why other users never complained about that behaviour as it really makes playlist management using VLC a nightmare, IMHO. In fact I have decided not to use Winamp as my audio player anymore and I'm looking for an open source media player both to play audio and video files.

As I have some spare time these days (looking for a job) I plan to implement that basic feature myself (as a fork to VLC if needed).

Does anyone would be interested by such a feature ?
What options would you like it to support ? I'm thinking of new options in the preferences, automatic relative paths saving for local files (not streams)...

wtfuar
New Cone
New Cone
Posts: 2
Joined: 03 May 2009 18:53

Re: Save playlist using relative path

Postby wtfuar » 03 May 2009 19:04

Hello,

I am highly interested in that feature @goa103! VLC messes up all my old relative path playlists when I add new items. It is very user unfriendly. I think of using different player for video and soundfiles.
Personally I cant understand why not making VLC a "On-For-All Multimedia Application".

If someone can support this relative path feature for saving playlists with an add-/on/in please reply.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Save playlist using relative path

Postby Jean-Baptiste Kempf » 04 May 2009 02:05

Why not coding it?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

wtfuar
New Cone
New Cone
Posts: 2
Joined: 03 May 2009 18:53

Re: Save playlist using relative path

Postby wtfuar » 04 May 2009 21:05

If I only could program. But in this field I am just a user.

Besides deleting entries from the playlist on occasion freezes VLC, also crashes VLC. Would be wise to acquire someone capable of these skills.

CAOgdin
Blank Cone
Blank Cone
Posts: 11
Joined: 10 May 2009 18:46

Re: Save playlist using relative path (My Wishlist)

Postby CAOgdin » 10 May 2009 19:18

Before I propose improvements, I want to report that VLC 0.9.9 is my preferred means for listening to Internet Radio. It is the highest-quality product for that purpose. Other options have their own flaws: RealPlayer can't maintain a reliable connection (due to it's buffering bugs) more than about an hour, then it stops. Windows Media Player (V10 or V11) make everything sound like it's coming from a 2" speaker; no bass at all. QuickTime won't connect to many Internet Radion stations (especially the one's I listen to regularly). So, before I gripe, know this: VLC Rocks!

Now, to my thoughts for your consideration:

Back in 2004 (viewtopic.php?f=7&t=4658&p=14765&hilit= ... ure#p14765), Sigmund wrote "The playlist saving code in vlc is still quite imature..." Now, five years later, it's evident it hasn't improved much. So, here are my recommendations for improvement of the PlayList feature:

1. Provide a preference for where the Playlist file(s) are expected to reside; this solves the need for a "relative" path.

2. Provide a command-line option to Load the (specified) Playlist, irrespective of what other commands may also be issued. Specifically, requiring navigation of the menus to load a playlist, then have to open that list and select from it, is not a very friendly GUI.

3. Integrate the Playlist into the menus, much like a Favorites menu. The independent window for the Playlist isn't really necessary if one can open a default file name at program launch. What is currently in the separate window as a list of entries from the XSPF file could be integrated into the Playlist menu, showing the most-recently-loaded Playlist.

4. Fix the bug that crashes v0.9.9 after Playlist loading: If you click "Show Playlist" too soon, a fatal error is reported (which I'll separately post at trac.videolan.org). If the user waits long enough (usually 15-20 seconds), the error does not occur. Perhaps when the PlayList is Loaded (whether by menu, or my wish-listed command-line specification), why not just automatically show the list of entries at the end of the Playlist menu as "Favorites," and get rid of "Show Playlist" altogether.

Thanks for a great product, and for letting me offer ideas for how to make it better.

--Carol Anne

schnorginator
Cone that earned his stripes
Cone that earned his stripes
Posts: 114
Joined: 16 Oct 2008 12:57

Re: Save playlist using relative path

Postby schnorginator » 19 Jul 2009 18:47

Any news here?
I also would like to have the relative path option.

Mister_Magoo
New Cone
New Cone
Posts: 1
Joined: 12 May 2012 00:35

Re: Save playlist using relative path

Postby Mister_Magoo » 12 May 2012 00:48

Just in case this helps anyone, I figured out that if I open the .xspf (playlist) file in a text editor after I create it and edit the absolute path to...

file:///./

I can move my folder of music that includes the playlist and it will still open even if I move the folder somewhere else.

All my songs were saved to the same folder and I saved the playlist to that same folder. Now I can share the folder with someone and the playlist is already there.

Hint: While in your text editor...

- First copy the path from "file:///" up to (including) the / (backslash) BEFORE the song name.
- Hit Ctrl+H (for Search and Replace)
- Paste your (long) path in the "Find what" field.
- Type "file:///./" (without the quotes) in the "Replace with" field.
- Click "Replace all".
- Save
- Listen to your playlist

Thanks for VLC!

cookiezulu
New Cone
New Cone
Posts: 1
Joined: 29 Jul 2012 16:55

Re: Save playlist using relative path

Postby cookiezulu » 29 Jul 2012 18:21

As I've accumulated devices on various platforms (Windows 7, Mac OSX, iOS, Android) this has become a masive issue for me. I have a NAS where I keep all my files (including tons of educational videos) and I use VLC on every device/computer I'm on (except for iOS of course) so having the ability to create the playlist once and then use it (even if it needs converting) onto any other device I chose to drag&drop the respective folder into would be fantastic.
So to add to the posts above:
- M3U files - removing everything in front of the file name makes this playlist work if the folder containing the files and the playlist is moved onto another Windows/MAC machine or if the playlist is opened from another Windows/MAC machine (so over the network). For example X:\npt\npt-g\GI Motility 1.flv (absolute path) becomes jut GI Motility 1.flv (relative path)
- replacing with "file:///./" as Mister_Magoo showed above in the XSPF file makes the playlist work on another Windows machine but not on a MAC. I'm yet to understand why. I'm new to MAC so have some reading to do regarding relative paths, VLC on MAC but any help would be appreciated in the meantime. (on this note, I must say that from my limited experience, m3u files seem to fare better on MAC even though XSPF are xml so MAC should like them more)
- VLC on Adroid (Nexus 7) doesn't want to play either the m3u or the xspf file either from the app or from choosing VLC to open it with from file explorer. However VLC on Android is beta so in development (maybe now that Android tablets are becoming more popular this development will kick up a gear - here's hoping).
I'm new to Android as well so I still need to read about m3u files on Android. But I suspect that it won't be complicated to find a program that will open a m3u file on Adroid.
- there's no VLC app on iOS and haven't yer tried the VLC streamer app. Also, I need to find an app that plays m3u files (tried AVPlayer, GoodPlayer, Azul, Flex, Buzz, OPlayer). I've also tried copying the folder with FileApp Pro and trying to open the m3u file from there (which should prompt a pop up asking which program it should use for that) but unfortunately it just says it's a music file and it can't play it
If anybody has ideas / experience with using m3u playlists on iOS i'd be grateful if they could share them.

Thanks,
Cookie

Paradox64
New Cone
New Cone
Posts: 4
Joined: 01 Dec 2012 02:02

Re: Save playlist using relative path

Postby Paradox64 » 01 Dec 2012 02:10

I have just reinstalled the latest version (2.0.4) of VLC and nothing I do, including adding ile:///./ to each file name, will work. The player locks up every time so I can't even get a log report. I'm sure the Videolan staff have gotten numerous bug reports about their player being the only one out there that doesn't recognize relative file paths but they just got another one.

I'm really amazed that they have seemingly done nothing about this problem.

ed44
New Cone
New Cone
Posts: 1
Joined: 18 Oct 2013 15:05

Re: Save playlist using relative path

Postby ed44 » 18 Oct 2013 15:40

Any news on this? Obviously not. I get this funny behaviour now with 2.0.8.

What makes most sense would be the relative path as deafult - which in most cases will be none because the m3u file is in the same folder with the mp3s.
Or, if we want to leave the current behaviour as default, add an option
[ ] relative path
to the Playlist save dialog.

The current handling is simply irritating to all users, works opposite to what one expects, and IMO a plain bug.

baptx
New Cone
New Cone
Posts: 1
Joined: 17 Jan 2014 18:02

Re: Save playlist using relative path

Postby baptx » 17 Jan 2014 18:42

So, 10 years after and the problem is not fixed, no @ed44 I don't think there is hope for any news on this. Like @Paradox64, I'm amazed too. How many new versions of VLC have been released since 2004? Developers don't think relative path in playlist is important and just ignore it. Don't ask me why I am not sending a patch, if I had time I would do it. At least I will share a solution, by using the "search and replace" function of a text editor, like @Mister_Magoo said but easier and that will work everywhere (@cookiezulu had problems on a Mac with file:///./). Why make it complicated? Just replace with NOTHING ("") the file path up to and including the slash or backslash (depending on your operating system) before the song name and voilà! You need to have the playlist file in the same folder of music files to work but then you will be able to copy playlist on other drives without modifications.
Last edited by baptx on 17 Jan 2014 18:58, edited 1 time in total.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Save playlist using relative path

Postby Jean-Baptiste Kempf » 17 Jan 2014 18:55

If this is soo important, just fix it...
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

xroxro
New Cone
New Cone
Posts: 1
Joined: 21 Jan 2014 16:53

Re: Save playlist using relative path

Postby xroxro » 21 Jan 2014 17:03

I'd see such functionality as very well welcomed. And I tell you all why (from my own point of view). You saving your playlist but you want to use them on different devices: like on your NAS (which doesn't care what were the absolute paths on your PC), on your mp3 player or any DLNA playing device (they care only about relative path visible to themselves). Hope it's reason good enough to put it on some list todo for next 10years or so also hoping there will be soon more voices like mine here. Thanks.

kylescousin
New Cone
New Cone
Posts: 7
Joined: 29 Apr 2014 17:14

Re: Save playlist using relative path

Postby kylescousin » 29 Apr 2014 17:19

Can you PLEASE PLEASE add this feature? Just a setting!
I just moved around 100 playlist to a NAS drive and now I need to manually edit all of them because the paths are absolute paths!

If we could just save playlists with the filename only, so the playlist looks only in the current directory, it would make all your playlists portable.
VLC can already READ the playlist that way, but not save it.

Please please add this feature.

realish
New Cone
New Cone
Posts: 2
Joined: 03 Nov 2009 08:23

Re: Save playlist using relative path

Postby realish » 25 Dec 2014 01:28

Yes, please add this! It's killing me.

anechoic
New Cone
New Cone
Posts: 4
Joined: 05 Mar 2006 21:14
Location: San Francisco
Contact:

Re: Save playlist using relative path

Postby anechoic » 17 Jun 2016 19:42

it seems to me that if the devs at VLC support a playlist format called XSPF (XML *Shareable* Playlist Format) that it should be transportable from one machine to the next without relative vs absolute filepath issues.

I don't know if this has been fixed in the latest version as I'm still working on an older version but if it hasn't please please please make it so you can write a XSPF or m3u playlist using a relative filepath?

thanks! been using VLC for many years now - the best media player out there!

kc


Return to “VLC media player Feature Requests”

Who is online

Users browsing this forum: No registered users and 19 guests