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

This forum is about all development around libVLC.
ivee
New Cone
New Cone
Posts: 6
Joined: 15 Dec 2016 13:30

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

Postby ivee » 03 Aug 2019 20:51

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

chubinou
Developer
Developer
Posts: 521
Joined: 23 Jul 2015 15:19

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

Postby chubinou » 06 Aug 2019 12:38

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()


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 25 guests