DBus interface provides a wide range of remote controls for players that are using it, I've attached a patch where tcl is used to execute dbus-send command lines for controlling vlc
and get song position to synchronize with Gem frame players.


pat

Le 07/10/2015 09:28, Max a écrit :
A while back I've tried to document different methods, mostly they are
suitable for short clips.
https://github.com/mxa/AudioVideoPatches
If you have something to contribute there, it's welcome.

m.


On 2015년 10월 07일 16:23, Jim Ruxton wrote:
I am currently using the shell object to run mplayer to play video
files  that have sound  . It works however I don't have much control
over the video playback. Just wondering what methods other people use?
Would I need to strip the soundtrack from the video and synchronize them
to use Gem?
Thanks.
Jim


_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list

_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

#N canvas 702 108 746 299 10;
#X obj 17 235 sys_gui;
#X obj 17 256 print;
#X obj 629 215 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#N canvas 29 51 450 300 Setproperties 0;
#X obj 27 46 inlet;
#X msg 27 114 org.freedesktop.DBus.Properties.Set string:org.mpris.MediaPlayer2.Player
string:\$1 variant:double:\$2;
#X obj 27 168 s dbus-send;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X restore 589 111 pd Setproperties;
#X obj 589 47 hradio 15 1 0 8 empty empty empty 0 -8 0 10 -262144 -1
-1 7;
#X obj 17 214 r SYS_GUI;
#N canvas 29 131 441 220 dbus-send 0;
#X obj 19 144 list trim;
#X obj 19 52 r dbus-send;
#X obj 19 168 s SYS_GUI;
#X obj 19 94 list prepend exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.vlc
/org/mpris/MediaPlayer2;
#X connect 0 0 2 0;
#X connect 1 0 3 0;
#X connect 3 0 0 0;
#X restore 149 215 pd dbus-send;
#X obj 17 142 s SYS_GUI;
#X msg 29 117 exec vlc -I dummy --control dbus &;
#X obj 589 89 list prepend Volume;
#X msg 17 72 exec vlc --control dbus &;
#X text 15 16 patko2015;
#X text 16 53 launch VLC with GUI;
#X text 52 101 no GUI;
#N canvas 516 102 517 300 introspect 0;
#X obj 60 194 s SYS_GUI;
#X msg 60 129 exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.vlc
/org/mpris/MediaPlayer2 org.freedesktop.DBus.Introspectable.Introspect
> /dev/tty;
#X text 121 77 this outputs all parameters in tty console;
#X connect 1 0 0 0;
#X restore 140 271 pd introspect;
#X obj 358 48 openpanel;
#X obj 358 31 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X text 8 196 tcl interpreter;
#N canvas 29 51 507 300 trackList 0;
#X obj 46 36 openpanel;
#X obj 46 13 inlet;
#X obj 44 95 s dbus-send;
#X msg 45 61 org.mpris.MediaPlayer2.TrackList.AddTrack string:file://\$1
objpath:/org/mpris/MediaPlayer2/AddTrack boolean:true;
#X connect 0 0 3 0;
#X connect 1 0 0 0;
#X connect 3 0 2 0;
#X restore 629 241 pd trackList;
#X obj 589 67 / 7;
#X msg 358 67 OpenUri string:file://\$1;
#X msg 384 112 Play;
#X msg 377 88 Pause;
#X text 129 195 dbus message prepend;
#X text 95 252 get interface methods and properties;
#X text 380 30 open media file;
#X text 586 28 set volume;
#N canvas 522 106 495 299 position 0;
#X obj 29 15 inlet;
#X obj 298 200 r vlc-pos;
#X obj 178 250 print;
#X obj 29 206 s SYS_GUI;
#X msg 29 114 set pos [exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.vlc
/org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:org.mpris.MediaPlayer2.Player
string:Position] \, pdsend [list vlc-pos [lindex $pos end]];
#X obj 29 53 metro 100;
#X obj 298 226 / 1e+06;
#X obj 298 262 outlet;
#X connect 0 0 5 0;
#X connect 1 0 6 0;
#X connect 4 0 3 0;
#X connect 5 0 4 0;
#X connect 6 0 7 0;
#X restore 497 228 pd position;
#X text 16 0 DBUS interfacing with hc/sys_gui tcl interpreter;
#X msg 371 218 Quit;
#X msg 361 194 Raise;
#N canvas 29 51 450 300 player.methods 0;
#X obj 85 46 inlet;
#X msg 172 128 org.mpris.MediaPlayer2.Player.\$1;
#X obj 103 193 s dbus-send;
#X obj 104 163 list append;
#X obj 85 100 list split 1;
#X connect 0 0 4 0;
#X connect 1 0 3 0;
#X connect 3 0 2 0;
#X connect 4 0 1 0;
#X connect 4 1 3 1;
#X restore 358 146 pd player.methods;
#N canvas 29 51 450 300 methods 0;
#X obj 85 46 inlet;
#X obj 103 193 s dbus-send;
#X obj 104 163 list append;
#X obj 85 100 list split 1;
#X msg 171 127 org.mpris.MediaPlayer2.\$1;
#X connect 0 0 3 0;
#X connect 2 0 1 0;
#X connect 3 0 4 0;
#X connect 3 1 2 1;
#X connect 4 0 2 0;
#X restore 361 253 pd methods;
#X text 17 31;
#X text 241 270 or use d-feet;
#X floatatom 497 251 5 0 0 0 - - -, f 5;
#X obj 497 203 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
1;
#X text 514 201 get position;
#X text 536 251 in seconds;
#X msg 432 125 Seek int64:\$1;
#X floatatom 432 107 5 0 0 0 - - -, f 5;
#X connect 0 0 1 0;
#X connect 2 0 18 0;
#X connect 4 0 19 0;
#X connect 5 0 0 0;
#X connect 9 0 3 0;
#X connect 10 0 7 0;
#X connect 15 0 20 0;
#X connect 16 0 15 0;
#X connect 19 0 9 0;
#X connect 20 0 31 0;
#X connect 21 0 31 0;
#X connect 22 0 31 0;
#X connect 27 0 35 0;
#X connect 29 0 32 0;
#X connect 30 0 32 0;
#X connect 36 0 27 0;
#X connect 39 0 31 0;
#X connect 40 0 39 0;
_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to