Jump to the specified playlist item

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
Antr
New Cone
New Cone
Posts: 4
Joined: 25 Oct 2012 14:48

Jump to the specified playlist item

Postby Antr » 25 Oct 2012 14:53

It's possible from VLC command line ?

Thanks.

Rémi Denis-Courmont
Developer
Developer
Posts: 15323
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Jump to the specified playlist item

Postby Rémi Denis-Courmont » 25 Oct 2012 17:16

For an existing instance? It depends. You can use MPRIS if your VLC build has D-Bus support.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Antr
New Cone
New Cone
Posts: 4
Joined: 25 Oct 2012 14:48

Re: Jump to the specified playlist item

Postby Antr » 25 Oct 2012 21:32

For an existing instance? It depends. You can use MPRIS if your VLC build has D-Bus support.
No, start VLC with playlist (any type) and specified playlist item (preferably in the same command line)

Rémi Denis-Courmont
Developer
Developer
Posts: 15323
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Jump to the specified playlist item

Postby Rémi Denis-Courmont » 26 Oct 2012 11:02

Oh of course that is supported.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Antr
New Cone
New Cone
Posts: 4
Joined: 25 Oct 2012 14:48

Re: Jump to the specified playlist item

Postby Antr » 26 Oct 2012 11:16

Oh of course that is supported.
Wow, can you provide the command line parameters ?

Thanks.

Antr
New Cone
New Cone
Posts: 4
Joined: 25 Oct 2012 14:48

Re: Jump to the specified playlist item

Postby Antr » 30 Oct 2012 09:48

My current solution with lua script

Code: Select all

vlc.playlist.clear (); vlc.playlist.add ({{path=config.playlist}}) local bPlaylistExists = 1; while (bPlaylistExists == 1) and not vlc.misc.should_die() do bPlaylistExists = 0; PlaylistItem = vlc.playlist.get("playlist") for i = 1, #PlaylistItem.children do if (PlaylistItem.children[i].path == config.playlist) then bPlaylistExists = 1 end end if (bPlaylistExists == 0) and (config.playlistitem <= #PlaylistItem.children) then i = #PlaylistItem.children; while i > 0 do if (i ~= config.playlistitem) then vlc.playlist.delete(PlaylistItem.children[i].id) end i = i - 1 end end vlc.misc.mwait ( vlc.misc.mdate() + 10000 ) end vlc.var.create(vlc.object.libvlc(), "demuxdump-file", "C:\\Test1\\test.mp3") vlc.var.create(vlc.object.libvlc(), "demux", "dump") vlc.playlist.play()
VLC command line:

Code: Select all

vlc --play-and-exit --no-playlist-autostart --extraintf=dummy -Iluaintf --lua-intf=test --lua-config "test={playlist='file:///C:\\Test1\\test.pls',playlistitem=5}"
Probably exists a simpler solution or lua-code ?

Thanks.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 63 guests