Page 1 of 1

Previous/Next Function with VLC RC Interface

Posted: 06 Sep 2009 07:42
by h347
Hi everyone!

I'm searching a way to use next/prev function with a playlist using the VLC RC interface. I haven't seen any way to solve this problem as I need to do it in a single batch file for each function.

I have a script (.bat) to boot VLC in remote control interface, and another one to add a playlist. Everything is okay, but I just can't find a way to implement a prev/next function to the current track. I read everything I found on the net about the rc interface, but haven't seen documentation about that. I know you can set the TCP command input, but I don't know how to use it. I think it might be the solution, but I don't know how it works.

If someone could help me, I would be very grateful!
Thanks!

Re: Previous/Next Function with VLC RC Interface

Posted: 06 Sep 2009 09:42
by NiN^_^NiN
Hey

Sorry im not familiar with this RC control but im guessing the functions next and prev aren't working?

Can you show me a sample of these bat scripts you are running and i'll have a play around with it for you :)

Re: Previous/Next Function with VLC RC Interface

Posted: 06 Sep 2009 22:36
by h347
Thanks for your quick answer!

Here's the few scripts concerned:

remoteControlInterface.bat
start /min vlc\vlc.exe --intf rc
exit

launch.bat
"\vlc\vlc.exe" add "C:\Music\Artist\Album"

Based on what I read on the RC interface, you can skip the track using simpy "next" or "previous"

| add XYZ . . . . . . . . . .. add XYZ to playlist
| playlist . . . show items currently in playlist
| play . . . . . . . . . . . . . . . . . . play stream
| stop . . . . . . . . . . . . . . . . . .stop stream
| next . . . . . . . . . . . . . next playlist item
| prev . . . . . . . . . . . previous playlist item

But I just can't specify it simply to another batch file!

["\vlc\vlc.exe" next "C:\Music\Artist\Album"] Does not work as it reload the playlist and restart it.
["\vlc\vlc.exe" next] Does not work either
[fscommand\vlc\VLCportable.exe --intf rc next] Does not work too

*Some hours later*
I've postponed this message and saw something really interesting! In order to use the telnet command to control VLC, you need to activate VLM remote control interface and setting the address/port. Now i can control it with telnet with next/prev!

But now I don't know how to put my telnet command in a batch file...
I can connect to it, but can't send informations to it afterwards.

[telnet localhost 1234]
[next]

It would be like it, but I can't find a way to bind the 2 functions to the same command window...

Thanks for your help!

Re: Previous/Next Function with VLC RC Interface

Posted: 07 Sep 2009 06:14
by NiN^_^NiN
I tried to do what u have done but i get another command prompt open up in VLC and i can type next and prev and that works.

I did find some more options for command line

Try

--global-key-next=1
--key-next=1

and replace next with prev for previous see how that goes but i haven't been able to get it to work like you have

Re: Previous/Next Function with VLC RC Interface

Posted: 07 Sep 2009 20:34
by h347
I just found how to do it!

Based on what I learned about telnet, I used a telnet scripting tool called TST10.exe Then, I wrote a script with it like this one:

[localhost 1234
SEND "next"
QUIT]

And it worked!

It's more difficult than it should be. Having the rc controls to the regular VLC interface would be nice!

Anyway, now it's working and I'm happy with it.

Thanks for your help!