vlcj

how to get/set frame position in vlcj?

笑着哭i 提交于 2019-12-06 08:19:51
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 ! 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 media using .getFPS() . So now you can get the total number of frames as: total_frames = .getFPS * .getLength()

How to play mp4 video in JAVA (swing) jframe using vlcj?Is there any other way to play mp4 in JAVA?

扶醉桌前 提交于 2019-12-06 07:18:27
问题 I want to play video file in JAVA(java swing). I have used JMF(java media framework). But it support .mpg format only. I want to play .mp4 format video file. How to do this? I could play mpg video using this code mediaPlayer1.setMediaLocation("file:///C:/mpgvdo/Best_Song2.mpg"); mediaPlayer1.start(); I want to know how i could use vlcj to play mp4 files.I need complete steps.starting from vlcj installation. I have included vlcj jar file in netbeans library also added to palette but I did not

VLCJ not working on Mac - plugin libvlccore.5.dylib

狂风中的少年 提交于 2019-12-05 11:33:45
I am trying to get VLCJ working on Mac and PC. It works fine under Windows 7 (64bit) but when I try to run it on my Mac it crashes. I am pointing to the correct directory for the VLC dylib files but I get an "...quit unexpectedly while using the libvlccore.5.dylib plugin" message. The details are: Process: java [48664] Path: /usr/bin/java Identifier: com.apple.javajdk16.cmd Version: 1.0 (1.0) Code Type: X86-64 (Native) Parent Process: java [48543] PlugIn Path: /Applications/VLC.app/Contents/MacOS/lib/libvlccore.5.dylib PlugIn Identifier: libvlccore.5.dylib PlugIn Version: 7.0.0 (compatibility

Playing Video in Java FX using vlcj api

亡梦爱人 提交于 2019-12-03 20:54:26
I am trying to play a video on Java FX components but not able to play. I know how to play a video in swing using vlcj but when I am trying the same I am not able to do so in javafx @Override public void start(Stage primaryStage) { File f = new File("Video.mp4"); new NativeDiscovery().discover(); EmbeddedMediaPlayerComponent playerComponent = new EmbeddedMediaPlayerComponent(); /*I dont know where to add the playerComponent as we do in swing*/ MediaPlayer mp=playerComponent.getMediaPlayer(); StackPane root = new StackPane(); Scene scene = new Scene(root, 700, 700); primaryStage.setTitle("Hello

VLCJ Creating Multiple video panels

白昼怎懂夜的黑 提交于 2019-12-03 17:18:41
I am creating multiple video panels using vlcj. For each video window I should add code: factory0 = new MediaPlayerFactory(); mediaPlayer0 = factory0.newEmbeddedMediaPlayer(); mediaPlayer0.setVideoSurface(factory0.newVideoSurface(videoCanvas[0])); mediaPlayer0.setPlaySubItems(true); ... If I want to have 8 video panels then I will have to repeat these codes (not dynamic). My Question is: I'd like to have MediaPlayerFactory and MediaPlayerFactory as arrays so that I can shorten my code and then this will behave dynamically by just changing Num_Video. My complete code is as follows. I am

Playing a video from an array of vlcj player

大城市里の小女人 提交于 2019-12-02 08:37:51
I am trying to play a video from the lists of MRL provided as a String. The problem is when I try to run the class, a list of panels shows with button, with only one panel working, but the play button does not work and that of other panels. Although I intentionally left the stop button out because I have not added action listeners to them. What I want to achieve is, when I run the class, a single video plays, and when I click on the play button of another video, the current video stops and moves to the next video. I don't know where I have gone wrong. Here is my code: public class MediaPlayer

VLCJ - playing a video from the “res” folder works great in eclipse, but not from the executable JAR file

和自甴很熟 提交于 2019-12-02 03:18:46
问题 i have an .MP4 video placed in the "res/media" folder inside my project. I can easily play this video in my application from eclipse using this piece of code: String url = getClass().getResource("/media/video.mp4").getFile(); url = new File(url).getPath(); showMedia(url); //the method that plays the video i had to use this code because using only URL url = getClass().getResource("/media/video.mp4"); makes VLCJ can't access the video using this URL. When creating the executable JAR file, i get

VLCJ - playing a video from the “res” folder works great in eclipse, but not from the executable JAR file

情到浓时终转凉″ 提交于 2019-12-02 02:37:10
i have an .MP4 video placed in the "res/media" folder inside my project. I can easily play this video in my application from eclipse using this piece of code: String url = getClass().getResource("/media/video.mp4").getFile(); url = new File(url).getPath(); showMedia(url); //the method that plays the video i had to use this code because using only URL url = getClass().getResource("/media/video.mp4"); makes VLCJ can't access the video using this URL. When creating the executable JAR file, i get these errors in the console: libdvdnav: Using dvdnav version 5.0.0 libdvdread: Could not open D:

mac os jdk 1.8 problems vlc control JAWT not load

人盡茶涼 提交于 2019-12-02 02:22:25
JavaVM WARNING: JAWT_GetAWT must be called after loading a JVM Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: Can't load JAWT at com.sun.jna.Native.getWindowHandle0(Native Method) at com.sun.jna.Native$AWT.getComponentID(Native.java:1879) at com.sun.jna.Native.getComponentID(Native.java:253) at uk.co.caprica.vlcj.player.embedded.videosurface.CanvasVideoSurface.attach(CanvasVideoSurface.java:69) at uk.co.caprica.vlcj.player.embedded.DefaultEmbeddedMediaPlayer.attachVideoSurface(DefaultEmbeddedMediaPlayer.java:156) at uk.co.caprica.vlcj.player.embedded

Play video using libVLC from memory in python

烂漫一生 提交于 2019-11-29 08:39:39
I am trying to make use of libVLC python bindings to play files after reading them into memory. I have the following code that reads a valid video file into the memory. I need to now play the video directly from the memory. import vlc File1 = open('vid.webm','rb') Axel = File1.read() Now i need to play the contents in Axel, how can I do this. Information on how to do this in C, Java etc too can help. Edit: Understood I will have to use the imem module but can't find any help regarding how to get it done. to do this you have to use the imem module of libvlc. This can be really confusing since