我想在python中编写一个片段/模块,它在特定的显示器/监视器上打开VLC播放器,并播放特定的文件。
我使用了python包,并成功地使用该包播放了一个视频文件:
import vlc
vlc_options = "--embedded-video --no-audio --fullscreen"
vlc_instance = vlc.Instance(vlc_options)
# vlc.Instance.url = filepath
player = vlc_instance.media_player_new()
player.set_mrl(filepath)
player.set_fullscreen(True)
player.play()
while True:
pass我搜索了文档中的任何地方,但没有发现任何有用的信息,比如如何选择一个特定的显示来启动媒体实例。
https://www.olivieraubert.net/vlc/python-ctypes/doc/
https://wiki.videolan.org/python_bindings
而且都没有使用CLI命令成功:
发布于 2020-08-07 14:11:37
我发现了以下几点:在某种程度上,您可以通过在VLC软件中使用Tools --> Preference --> Video --> Fullscreen Video Device --> Here you choose the display you want来控制这一点。这也取决于输出模式。你得试试。
https://stackoverflow.com/questions/62341460
复制相似问题