Python - 在完成视频文件之前退出 vlc
Python - quit vlc before completing video file
以下调用在完成视频后退出 vlc 播放器。
subprocess.call([vlc_path, video_path, '--play-and-exit', '--fullscreen'], shell=False)
如果我想在1小时内退出vlc,不管视频是否完整,我该怎么办?
一种可能的解决方案是指定 --stop-time <seconds>
:
subprocess.call([vlc_path, video_path, '--play-and-exit',
'--fullscreen', '--stop-time','3600'], shell=False)
来自长帮助(vlc -H
):
Playback control:
--input-repeat <integer [-2147483648 .. 2147483647]>
Input repetitions
Number of time the same input will be repeated
--start-time <float> Start time
The stream will start at this position (in seconds).
--stop-time <float> Stop time
The stream will stop at this position (in seconds).
--run-time <float> Run time
The stream will run this duration (in seconds).
以下调用在完成视频后退出 vlc 播放器。
subprocess.call([vlc_path, video_path, '--play-and-exit', '--fullscreen'], shell=False)
如果我想在1小时内退出vlc,不管视频是否完整,我该怎么办?
一种可能的解决方案是指定 --stop-time <seconds>
:
subprocess.call([vlc_path, video_path, '--play-and-exit',
'--fullscreen', '--stop-time','3600'], shell=False)
来自长帮助(vlc -H
):
Playback control:
--input-repeat <integer [-2147483648 .. 2147483647]>
Input repetitions
Number of time the same input will be repeated
--start-time <float> Start time
The stream will start at this position (in seconds).
--stop-time <float> Stop time
The stream will stop at this position (in seconds).
--run-time <float> Run time
The stream will run this duration (in seconds).