Q: Video is not Playable and black screen while using VLCJ to create MediaPlayer I am trying to add a MediaPlayer to a JPanel by using VLCJ. When I run the code, the frame opens up but there is no displayed video and no sound. I don't get any compile-runtime errors. I checked out the outputs of isPlayable and isPlaying methods it says videos are not playable. But I tried every video format possible. 
import java.io.*;
import java.net.*;
import javax.media.CannotRealizeException;
import javax.media.Manager;
import javax.media.NoPlayerException;
import javax.media.Player;
import com.sun.jna.Native;
import com.sun.jna.NativeLibrary;
import uk.co.caprica.vlcj.binding.LibVlc;
import uk.co.caprica.vlcj.player.embedded.EmbeddedMediaPlayer;
import uk.co.caprica.vlcj.runtime.RuntimeUtil;
import uk.co.caprica.vlcj.player.MediaPlayerFactory;
import java.awt.*;
import javax.swing.*;
import uk.co.caprica.vlcj.player.embedded.videosurface.CanvasVideoSurface;

public class VideoUpload extends JPanel 
{

static String VLCLIBPATH = "C:\\Program Files\\VideoLAN\\VLC";
private MediaPlayerFactory mediaPlayerFactory;
private EmbeddedMediaPlayer mediaPlayer;
private Canvas c;
private JPanel p;
private JFrame frame;
static String url="C:/Users/M.C.Ş/Pictures/video/uwe.3gp";
public static void main( String[] args) {

    NativeLibrary.addSearchPath(RuntimeUtil.getLibVlcLibraryName(), VLCLIBPATH);
    Native.loadLibrary(RuntimeUtil.getLibVlcLibraryName(), LibVlc.class);
    JFrame frame = new JFrame();      
    VideoUpload video = new VideoUpload(url);
    frame.add( video );
    frame.setSize( 1300,750 );
    frame.setVisible(true);
    video.play();      

}
public VideoUpload( String url ) {

    url = this.url;  
    c = new Canvas();
    c.setSize(500,500);
    c.setBackground(Color.black);   
    setLayout(new BorderLayout());
    add(c, BorderLayout.CENTER);
    c.setVisible(true);
    setVisible(true);

    mediaPlayerFactory = new MediaPlayerFactory();
    mediaPlayer = mediaPlayerFactory.newEmbeddedMediaPlayer();
    mediaPlayer.setVideoSurface(mediaPlayerFactory.newVideoSurface(c));  

    System.out.println("is playable " + mediaPlayer.isPlayable() );

}

public void play()
{
    mediaPlayer.playMedia(url);

    System.out.println("is playing " + mediaPlayer.isPlaying() );
}


}


A: You can't use forward slashes in the filename that you pass via playMedia().
The filename is passed directly to a native API method in LibVLC, it is that native method that tries to open the filename exactly as you specified it.
Using forward slashes is a Java convention, and it will not work with native API calls (at least not on Windows).
