You just need to give the window ID, which you get using 'xwininfo'.
Here is an example script 'vlc_embed'. It embeds playback of the given into a gtkdialog window:
Code: Select all
#!/bin/bash
# save this code as vlc_embed
gtkdialog -s <<< '<window title="VLC Playback" width-request="640" height-request="480">
<vbox>
<button><action>killall vlc</action><action type="exit">EXIT_NOW</action></button>
</vbox>
</window>' &
sleep 2
OSC_WID="$(xwininfo -name "VLC Playback" | grep -m1 'Window id: ' | cut -f4 -d' ')"
vlc -I dummy --drawable-xid $OSC_WID "$@" &
exit 0
vlc_embed /path/to/file.avi
EDIT: No idea how to send playback control to VLC once its embedded thoough...
If anyone knows how I can send play/stop/next/prev/fullscreen/etc commands to VLC when it's embedded, I will be VERY grateful!