Page 1 of 1

Video getting launched in Direct3D window

Posted: 25 Aug 2016 06:33
by gnshdxt@gmail.com
Hi all,

I am trying to launch a video using libvlc and python interface.
Every time I execute the code, Video is getting launched in Direct3D window from where I cannot pause or stop manually.
How to make it launch in the main window?

Below is the code I used to launch VLC

Code: Select all

import vlc filepath = "test.mp4" movie = os.path.expanduser(filepath) instance = vlc.Instance() media = instance.media_new(movie) player = instance.media_player_new() player.set_media(media) player.set_fullscreen(1) player.play()

Re: Video getting launched in Direct3D window

Posted: 25 Aug 2016 09:08
by coderXY
In C or C++, you have to call libvlc_media_player_set_hwnd with your window handle (HNWD) to tell libvlc where to render the media.
And to pause or stop the playback, call libvlc_media_player_play, libvlc_media_player_pause or libvlc_media_player_stop.