I guess you know VLC, there is also a JAVA binding for Java available to download.
Edit 2.11.10 // the jvlc repo can be found here: http://code.google.com/p/vlcj/
You can download the jvlc-core-1.0.0-SNAPSHOT.jar - or download the source from the git tree. I did two simple examples:
Example 1:
DvbRip: connect to a Dreambox receiver and download a snapshot image.
Example 2:
MovieSnap: create screenshots from a Movie.

Here is a closeup of the scene above, a movie poster mosaic created with movie screenshots:

Download the java source and bin files here. Hint: you need a installed VLC to use this tool!
DvbRip parameter:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #neophob.com DvbRip v0.1 parameter: url: filesource (needed argument) snapshotSize: size of snapshot image, 0 means no resize snapshotDir: snapshot directory noVerbose: disable vlc verbose messages vlcPluginPath: path to vlc plugin directory snapshotPrefix: prefix for snapshot files noVideoOut: disable video output crop: crop video, aspect ration 1:1 noSnapshotPreview: do not display snapshot preview initWaitTime: wait until connection is established, default 3000ms</code> example: java –classpath .;%classpath%;jvlc-core-1.0.0-SNAPSHOT.jar;jna.jar DvbRip snapshotPrefix=p1 url=http://192.168.111.15:8001/1:0:1:3:45:1:FFFF018A:0:0:0: snapshotDir=C: initWaitTime=5000 |
MovieSnap parameters:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #neophob.com MovieSnap v0.1 parameter: url: filesource (needed argument) snapshotSize: size of snapshot image (128) picsPerMovie: get # of snapshot per file (1500) snapshotDir: path where to save the snapshots noVerbose: disable vlc verbose messages vlcPluginPath: path to vlc plugin directory snapshotPrefix: prefix for snapshot files noVideoOut: disable video output crop: crop video, aspect ration 1:1 noSnapshotPreview: do not display snapshot preview</code> example: java –classpath .;%classpath%;jvlc-core-1.0.0-SNAPSHOT.jar;jna.jar MovieSnap snapshotSize=256 noVerbose noVideoOut crop vlcPluginPath=c:ProgrammeVideoLANVLCplugins url=c:movie.avi |
Last hint for Java devs: jVLC needs the JNA (Java Native Access) to work.
2 Comments
1 Conan wrote:
I just tried to use your code with vlc 1.01 but failed to run:-
E:tempjvlc3>java –classpath .;%classpath%;jvlc-core-1.0.0-SNAPSHOT.jar;jna.jar
MovieSnap snapshotSize=256 noVerbose noVideoOut crop vlcPluginPath=D:Program F
ilesVideoLANVLCplugins url=e:temptemp1.mp4
#neophob.com MovieSnap v0.1
## init jvlc
[0x3f4a3c] main libvlc error: no memcpy module matched “any“
[0x31824bc] main access error: no access module matched “file“
[0x3185d4c] main input error: open of ‘file/xspf-open:///C:/Documents%20and%20Se
ttings/Administrator/Application%20Data/vlc/ml.xspf’ failed: no access module ma
tched “file“
[0x3185d4c] main input error: Your input can’t be opened
[0x3185d4c] main input error: VLC is unable to open the MRL ‘file/xspf-open:///C
:/Documents%20and%20Settings/Administrator/Application%20Data/vlc/ml.xspf’. Chec
k the log for details.
[0x318193c] main interface error: no interface module matched “hotkeys,none“
[0x318193c] main interface error: no suitable interface module
[0x3f4a3c] main libvlc error: interface “hotkeys,none” initialization failed
[0x3f4a3c] main libvlc error: option drawable-xid does not exist
## play file
[0x31824bc] main access error: no access module matched “any“
[0x3185d4c] main input error: open of ‘e:temptemp1.mp4’ failed: no access modu
le matched “any“
[0x3185d4c] main input error: Your input can’t be opened
[0x3185d4c] main input error: VLC is unable to open the MRL ‘e:temptemp1.mp4’.
Check the log for details.
Error, could not play file
BTW, may you share the source for jvlc? Thanks
2 michu wrote:
conan, did you install vlc itself? the java parts needs the vlc dll files