Page 1 of 1

Disable the creation of new window with MediaPlayer.play()

Posted: 03 Aug 2019 20:51
by ivee
Hello
I would like to use libvlc MediaPlayer object to play audio only (sound track in case of video files).
Is it possible using python vlc bindings to prevent the new window from appearing when MediaPlayer.play() is called but hwnd not assigned?

Code: Select all

import vlc if __name__ == '__main__': audioPlayer = vlc.MediaPlayer(vlc.Instance()) audioPlayer.set_mrl("D:\\SCEXIB\\1.mp4") audioPlayer.play() # new window VLC (Direct3D3) is created
As I understand there is a --novideo option for vlc instance but the use of parameters is not recommended as I understand. And besides I would like to use the same vlc instance for parallel and independent playing of video+audio and audio (for the multimedia installation).

Thank you

Re: Disable the creation of new window with MediaPlayer.play()

Posted: 06 Aug 2019 12:38
by chubinou
Hi, you can pass the "no-video" as an option of your media

audioPlayer = vlc.MediaPlayer(vlc.Instance())
audioPlayer.set_mrl("D:\\SCEXIB\\1.mp4", ":no-video")
audioPlayer.play()