[MPlayer-users] Embedding Mplayer in a Java Swing JFrame

Giovanni De Stefano giovanni.destefano at gmail.com
Thu Oct 16 16:25:55 CEST 2008


Hello all,

I would like to embed mplayer into a Java JFrame window.

I know this might be an old topic but after searching for a few days I still
didn't figure out how this should work.

I read a few posts and I got mplayer started from some Java code with a
command line like the following:

/usr/bin/mplayer -wid 0x1234567 -quiet -slave -idle -colorkey 0x101010 -vo
xv -nokeepaspect -nojoystick -nomouseinput -noconsolecontrols -nofs
/home/gio/video.avi

The JFrame has a background color as the colorkey in the command line (thus
new Color(0x10, 0x10, 0x10)).

The result is that I can hear the audio, but I don't see the video. The
weird thing is that the video appears in the background of the window but it
is hidden by the window color (I can see the video when I resize the window
very quickly).

I thought that matching the JFrame background with the mplayer colorkey
would have been enough.

Do you guys have any idea on what I might be doing wrong?

Thanks,
Giovanni



More information about the MPlayer-users mailing list