Play video file with VLC, then quit VLC

一个人想着一个人 提交于 2019-12-05 00:31:05

Funnily enough, vlc has a command line option for this:

  --play-and-exit, --no-play-and-exit
                             Play and exit (default disabled)

So, just pass this option to vlc.

Another option would be to pass the dummy item vlc://quit, e.g.:

vlc audio1.mp3 audio2.mp3 vlc://quit

Source: https://wiki.videolan.org/Transcode/#Completely_non-interactive_transcoding

Best way I can think of is killing the process by a separate thread after video length has passed, if you know the length of the video in Python. Elsewhere, it depends on VLC-s command line options. Maybe you can tell him to close after playing the movie.

If nothing works try using the option --ignore-config at the beginning after vlc in addition to http://quit at the end

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!