I am working with recording video from a webcam based on example in test: uk.co.caprica.vlcj.test.visualisation (downloaded from here http://code.google.com/p/vlcj/source/br ... vn%2Ftrunk). Below is my code for recording (~13% CPU load):
Code: Select all
private void doRecord() {
String[] options = {
":dshow-adev=none",
":dshow-vdev=",
":dshow-aspect-ratio=4\\:3",
":live-caching=300",
":sout-mp4-faststart",
":dshow-size=640x480",
":sout=#duplicate{dst=display,dst='transcode{vcodec=x264,venc=x264,vb=1000,fps=1,scale=1,width=640,height=480}:standard{access=file,mux=mp4,dst=C:\\xy.mp4}'}"
};
mediaPlayer.prepareMedia("dshow://", options);
mediaPlayer.play();
}
I try to disable preview by commenting out below lines (setting canvas for mediaPlayer in the VisualisationPlayer() constructor) but a "VLC (Direct3D output)" preview window was still available so no CPU load improvement was achieved.
Code: Select all
// videoSurface = factory.newVideoSurface(canvas);
// mediaPlayer.setVideoSurface(videoSurface);
Many thanks,
Thuy