1

Is there a way I can run a command in my Terminal to copy the current playing file path in VLC file into a specified location?

e.g. the current file /user/imran/example.mp3 would be copied to /user/imran/desktop/example.mp3?

I am using VLC on Mac OS X

1 Answer 1

0

In its default configuration, I don't think there is an easy way to do this. However, if you enable the HTTP interface (View -> Add Interface -> Web or -I http) you can query the playlist to get the current playing track information. Query the URL:

http://localhost:8080/requests/playlist_jstree.xml

This will return an XML document with the playlist information. The current playing <item> will have the attribute current="current". A sample document is below:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<root>
    <item id="plid_2" name="Playlist" ro="ro">
        <content>
            <name>Playlist</name>
        </content>
        <item id="plid_4" uri="file:///<PATH_TO_MEDIA_FILE>.mp4" name="<MEDIA_FILE>.mp4" ro="rw" duration ="10" current="current" >
            <content>
                <name><MEDIA_FILE>.mp4</name>
            </content>
        </item>
    </item>
</root>
1
  • Could you add some information on how I could then use the xml to parse the now playing URI from a CLI?
    – Imran
    Commented Oct 25, 2015 at 3:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .