Answer the question
In order to leave comments, you need to log in
Is it possible to run VLC player with video link (stream video without download) using Python?
I see 2 possible solutions to this problem:
1) Run the video using the python-vlc library, but in this case, I don't have a video player interface, and I can't rewind or pause because I don't know how to do it.
Here is my video playback code:
import vlc
vlcInstance = vlc.Instance()
player = vlcInstance.media_player_new()
#ссылка на видео
player.set_mrl("https://pe.load.hdrezka-ag.net/tvseries/cb2beeb8822647baa8621766e5a360cc3c7ae16b/83f07fd3a01c3603cdcfacaeec6296fc:2020060217/720.mp4:hls:manifest.m3u8")
#Перемотка видео
player.play()
player.set_time(3899000) # Значение в миллисекундах
#Проигрывание до конца видео
while player.get_time()//10000 != player.get_length()//10000:
player.play()
Answer the question
In order to leave comments, you need to log in
You can start vlc by passing just a link to the video into it.
import subprocess
vlc_path = r'X:\Soft\VLC\vlc.exe'
video_url = 'https://pe.load.hdrezka-ag.net/tvseries/cb2beeb8822647baa8621766e5a360cc3c7ae16b/83f07fd3a01c3603cdcfacaeec6296fc:2020060217/720.mp4:hls:manifest.m3u8'
subprocess.Popen([vlc_patch, video_url])
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question