How to select second stream on command line

*nix specific usage questions
ajaaskel
New Cone
New Cone
Posts: 2
Joined: 26 Oct 2011 19:49

How to select second stream on command line

Postby ajaaskel » 26 Oct 2011 20:12

I'm receiving two streams from the same mms link. First one is encrypted, another one is open. What I do right now is open first the link and VLC starts to show colour mess. I select second stream on playlist, wait 10..15 seconds and everyting is ok.
My problem is how to avoid need for pressing that "wind" button (or selecting second line from playlist) i.e. I want to automate it. I started VLC in terminal and tested some command line options in order to select the second stream but no success so far.

ajaaskel
New Cone
New Cone
Posts: 2
Joined: 26 Oct 2011 19:49

Re: How to select second stream on command line

Postby ajaaskel » 28 Oct 2011 23:43

I got an answer from Ubuntu Forum Finland. You can use "dbus" to control VLC this way in a script:

#!/bin/bash
/usr/bin/vlc --control dbus $1 &
sleep 3 && dbus-send --print-reply --session --dest=org.mpris.vlc /Player org.freedesktop.MediaPlayer.Next

That works. I guess the same thing can be found here at VLC forum --- provided you know what to look for. :)


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 18 guests