Error in playing a mp4 video

This forum is about all development around libVLC.
powerohit
New Cone
New Cone
Posts: 1
Joined: 04 Mar 2015 06:53

Error in playing a mp4 video

Postby powerohit » 04 Mar 2015 07:03

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??

Rémi Denis-Courmont
Developer
Developer
Posts: 15268
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Error in playing a mp4 video

Postby Rémi Denis-Courmont » 04 Mar 2015 09:54

vlcj is not going to draw the controls for you. If you want controls, you draw them.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 48 guests