Page 1 of 1

VLC (Direct 3D Output) Window in Windows

Posted: 17 Apr 2013 12:04
by aneeshsebastian
I get one more window named VLC (Direct 3D Output) Window in addition to normal window which displays/plays video. This happens when I invoke following recording API.

File dir = new File(System.getProperty("user.dir"), "Videos");
dir.mkdirs();
DateFormat df = new SimpleDateFormat("yyyyMMdd-HHmmss");
String fileName = dir.getAbsolutePath() + "/Capture-" + df.format(new Date()) + ".mpg";
String[] options = {
":sout=#transcode{vcodec=h264,vb=4096,scale=1,acodec=mpga,ab=128,channels=2,samplerate=44100}:duplicate{dst=file{dst=" + fileName + "},dst=display}"
};
player = new MediaPlayerFactory().newHeadlessMediaPlayer();
player.playMedia("rtsp://10.252.188.244/axis-media/media.amp?videocodec=h264", options);

Any idea why it happens. I need to turn it off

Re: VLC (Direct 3D Output) Window in Windows

Posted: 17 Apr 2013 13:37
by sherington
You seem to duplicate the output to a file and "display" - well, I think that means it will open a window to display it...

Your headless player is headless in name only, it will still open a window if it needs one, unless you disable the video output explicitly. This is explained already in the Javadoc.

Re: VLC (Direct 3D Output) Window in Windows

Posted: 18 Apr 2013 05:41
by aneeshsebastian
Thanks for the display:

String[] options = {
":sout=#transcode{vcodec=h264,vb=4096,scale=1,acodec=mpga,ab=128,channels=2,samplerate=44100}:duplicate{dst=file{dst=" + fileName + "}}"
};.

I removed dst=display, now this works.

I use new MediaPlayerFactory().newHeadlessMediaPlayer(); which indeed returns a HeadlessPlyer instance. Which player instance is good for recording? I have a separate meidaplayer instance to display media as I specified in one of my other post.

Re: VLC (Direct 3D Output) Window in Windows

Posted: 18 Apr 2013 08:06
by sherington
You picked the right media player, but you still need to disable the video output as is explained already in the Javadoc for that class.