How to disable preview window when recording video (VLCJ)

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
nhuythuy
Blank Cone
Blank Cone
Posts: 14
Joined: 20 Jun 2012 14:16

How to disable preview window when recording video (VLCJ)

Postby nhuythuy » 02 Jul 2012 14:12

Hi all,

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(); }
If I disable the preview using different sout parameter (":sout=#transcode{vcodec=x264,venc=x264,vb=1000,fps=15,scale=1}:standard{access=file,mux=mp4,dst=c:\\xy.mp4}") then CPU load is double than using previous sout parameter (~ 26% CPU load).

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);
Could you please show me the way to disable preview function when recording?

Many thanks,

Thuy

Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Google [Bot] and 39 guests