Page 1 of 1

Error in playing a mp4 video

Posted: 04 Mar 2015 07:03
by powerohit
Hello Everyone,

In my project am trying to play a mp4 video, but in the video player the different options like play, pause and stop are not visible.
I got this error.

[06941e4c] main vout display error: Failed to set on top
[06941e4c] main vout display error: Failed to resize display

My code is from the tutorial website:

Code: Select all

import javax.swing.JFrame; import javax.swing.SwingUtilities; import uk.co.caprica.vlcj.component.EmbeddedMediaPlayerComponent; import uk.co.caprica.vlcj.discovery.NativeDiscovery; public class Tutorial { private final JFrame frame; private final EmbeddedMediaPlayerComponent mediaPlayerComponent; public static void main(final String[] args) { new NativeDiscovery().discover(); SwingUtilities.invokeLater(new Runnable() { @Override public void run() { new Tutorial(args); } }); } public Tutorial(String[] args) { frame = new JFrame("My First Media Player"); frame.setBounds(100, 100, 600, 400); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); mediaPlayerComponent = new EmbeddedMediaPlayerComponent(); frame.setContentPane(mediaPlayerComponent); frame.setVisible(true); //mediaPlayerComponent.getMediaPlayer().playMedia(args[0]); mediaPlayerComponent.getMediaPlayer().playMedia("C:\\myvideo.mp4"); } }
What's missing in this??

Re: Error in playing a mp4 video

Posted: 04 Mar 2015 09:54
by RĂ©mi Denis-Courmont
vlcj is not going to draw the controls for you. If you want controls, you draw them.