Created
January 2, 2017 21:20
-
-
Save jthmiranda/bad65c67416d842b566878129d9183f5 to your computer and use it in GitHub Desktop.
Get the time lenght from video files using the next repo https://github.com/caprica/vlcj-info
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import uk.co.caprica.vlcjinfo.MediaInfo; | |
import uk.co.caprica.vlcjinfo.Section; | |
import uk.co.caprica.vlcjinfo.Sections; | |
public class Ejemplo { | |
public static void main(String[] args) { | |
System.setProperty("jna.library.path", "C:\\Program Files\\MediaInfo"); //windows path | |
MediaInfo media = MediaInfo.mediaInfo("C:\\Videos\\yourVideo.mp4"); | |
Sections sections = media.sections("Video"); | |
Section section = sections.first(); | |
System.out.println(section.value("Duration")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment