vlcj

Launch VLC Player through Java

混江龙づ霸主 提交于 2019-12-12 12:14:01
问题 I want to launch my VLC player through a Java program, can any one help me? Thanks in advance. 回答1: Vlc is located on different places depending on your system, but this is for 64 bit ProcessBuilder pb = new ProcessBuilder("C:\\Program Files (x86)\\VideoLAN\\VLC\\vlc.exe", "file to start with vlc"); Process start = pb.start(); and this should work for x86: ProcessBuilder pb = new ProcessBuilder("C:\\Program Files\\VideoLAN\\VLC\\vlc.exe", "file to start with vlc"); Process start = pb.start();

Transparent JPanel over Canvas (VLCJ)

北慕城南 提交于 2019-12-12 12:08:03
问题 I know that a similar question was posted before, but there was no answer or example code. I need a transparent JPanel on top of a canvas. The code posted below is not working import java.awt.BorderLayout; import java.awt.Canvas; import java.awt.Color; import java.awt.Graphics; import javax.swing.JFrame; import javax.swing.JLayeredPane; import javax.swing.JPanel; public class Main { private static class Background extends Canvas{ @Override public void paint(Graphics g) { super.paint(g); g

How to use SDP-File with VLCJ

我怕爱的太早我们不能终老 提交于 2019-12-11 12:50:39
问题 i try to implement an application with java which displays a video stream. Actually i'am using VLCJ: https://github.com/caprica/vlcj The Problem i get an error when i try to connect to a video stream of a webcam: [052989d4] rtp demux error: unspecified payload format (type 96) [052989d4] rtp demux: A valid SDP is needed to parse this RTP stream. [052989d4] core demux error: SDP required [052989d4] core demux error: A description in SDP format is required to receive the RTP stream. Note that

Setting Classpath Still Can't Find External Jar

一笑奈何 提交于 2019-12-11 07:14:14
问题 I am attempting to run VLCJ test jar from command line. VLCJ requires two external JARs jna.jar platform.jar If I put those jars in the same directory as the executable jar I am attempting to run, I can run it successfully. However if I put them in their own directory and do the following: java -classpath "C:\Users\Constantin\workspace\Java Libraries\JNA" -jar executable.jar It cannot find a class from the JNA libraries. I am very new to Java, and my searches are not revealing a possible

Failed to play video by vlcj in java

只愿长相守 提交于 2019-12-11 06:33:48
问题 I wants to use vlcj to play video in a JPanel. This JPanel is one of six JPanels in a JFrame. I used the code below to display the video, but failed to make it. The JPanel does not display the video.I would be really appreciated if anyone could give me some suggestions. The code in JPanel is listed below: public class VideoPanel extends JPanel { private EmbeddedMediaPlayerComponent mymediaPlayer; private String vlcPath = "d:/Program Files/VideoLAN/VLC"; private String mediaPath = "d:

Capturing with vlcj only gives a corrupt video file

醉酒当歌 提交于 2019-12-10 22:36:58
问题 I am using vlcj to capture the screen in my Java program. Therefore I use the following code: public static void main(final String[] args) { NativeLibrary.addSearchPath("vlc", "/Applications/VLC.app/Contents/MacOS/lib/"); SwingUtilities.invokeLater(new Runnable() { @Override public void run() { new CaptureTest().start("screen://"); } }); } public CaptureTest() { factory = new MediaPlayerFactory(); mediaPlayer = (HeadlessMediaPlayer) factory.newMediaPlayer(); } private void start(String mrl) {

vlcj:: Unable to load library 'libvlc' in 64bit OS

◇◆丶佛笑我妖孽 提交于 2019-12-10 18:44:32
问题 I am using 64 bit OS Windows 7 and i have 32 bit VLC versioned 1.1.8. I have added these libraries jna.jar platform.jar vlcj-1.1.5.1.jar I am not able to stream using jVlc public class HelloVLC { /** * @param args * @throws IOException */ public static void main(String[] args) throws IOException { // TODO Auto-generated method stub System.out.println( WindowsRuntimeUtil.getVlcInstallDir()); NativeLibrary.addSearchPath("libvlc", "C:\\Program Files (x86)\\VideoLAN\\VLC"); String media = "dshow:

Display VlcJ in JavaFX using SwingNode

只谈情不闲聊 提交于 2019-12-08 03:24:17
问题 FXMLController initialize method: @FXML private VBox vbContainer; MediaPlayerVLC m_mediaPlayer; public void initialize(URL url, ResourceBundle rb) { final SwingNode swingNode = new SwingNode(); m_mediaPlayer = new MediaPlayerVLC(); createAndSetSwingContent(swingNode, m_mediaPlayer); vbContainer.getChildren().add(0, swingNode); } And createAndSetSwingContent(): private void createAndSetSwingContent(final SwingNode swingNode, JComponent jComponent) { SwingUtilities.invokeLater(new Runnable() {

how to get/set frame position in vlcj?

为君一笑 提交于 2019-12-08 01:36:14
问题 How to - 1.get the current frame position of an audio/video track ?? 2.how to go to a specific frame position of a track ?? using vlcj sdk . any code snippets would be highly appreciated ! 回答1: Actually you can do this with a little math. It's not the cleanest way but it is kind of easy to understand. VLCj allows you to get the length of your media using .getLength() . However, note that this returns the length of the media in milliseconds. Moreover, you can get the frames/second of your

Display VlcJ in JavaFX using SwingNode

本小妞迷上赌 提交于 2019-12-07 12:00:30
FXMLController initialize method: @FXML private VBox vbContainer; MediaPlayerVLC m_mediaPlayer; public void initialize(URL url, ResourceBundle rb) { final SwingNode swingNode = new SwingNode(); m_mediaPlayer = new MediaPlayerVLC(); createAndSetSwingContent(swingNode, m_mediaPlayer); vbContainer.getChildren().add(0, swingNode); } And createAndSetSwingContent(): private void createAndSetSwingContent(final SwingNode swingNode, JComponent jComponent) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { swingNode.setContent(jComponent); } }); } MediaPlayerVLC class: package