134 questions
1
vote
0
answers
56
views
Python-vlc window freezes after 10 mins of playing/stopping videos
I'm having a problem building a kiosk display system using Python, Tkinter and VLC. In my setup, everything is latest version(only got the Pi 2 weeks ago).
-RPI 5 with latest Bookworm 64 bit.
-Python-...
1
vote
0
answers
60
views
stream video from vlc to obs using python
im trying to make a overlay/pngtuber/bot/manager for my stream on twitch, i want so people can request music from youtube to play on stream, i got to get the youtube url with my premium account, but ...
0
votes
1
answer
163
views
Why is my VLC Media Player application leaking GPU memory on Raspberry Pi 4B+ and 5?
We have a Python-based media player application that loops through media files and displays them on a screen.
After running anywhere from ~3-24 hours, the display will sometimes freeze while playing a ...
0
votes
0
answers
57
views
Why is python-vlc playback blanking screen every 5 seconds or so?
I have a python script running on a Raspberry Pi using python-vlc that plays a video when a PIR triggers it.
The video plays back, but there appears to be a black frame inserted every five seconds or ...
0
votes
1
answer
86
views
how to play a wav file in mono mode with python-vlc?
I know how to play a wav file with python_vlc,
e.g (here to play an audio stream)
import vlc
instance=vlc.Instance('--input-repeat=-1','--fullscreen')
player=instance.media_player_new()
url="my ...
0
votes
0
answers
352
views
PyQt window for python-vlc not possible
I tried litarely every code I found on the internet to start a python-vlc player instance in a window frame made with PyQt but it's no working. The vlc player starts in a new window instead of taking ...
0
votes
1
answer
90
views
Trying to make a python exe that works on all computers
Ive been trying to turn my pthon script into a standalone exe with pyinstaller, the problem is I need to include python-vlc and when I run
pyinstaller --add-binary "E:\Documents\Spotify Posters\...
0
votes
0
answers
249
views
How can I make a video restart (loop) after it is done playing?
I'm trying to make a video which will stay pause on the first frame for 5 second, then play until the end, and rewind (then stay on the first frame for 5 sec, then play again)
So far I have this code, ...
0
votes
1
answer
278
views
Can't set_fullscreen for VLC MediaList in Python
I've got a VLC MediaList that is imported from a directory and randomized. I want to set it to fullscreen. I'm doing this on a Raspberry Pi 4 if that makes a difference.
from vlc import Instance
...
1
vote
1
answer
91
views
Type Error - libvlc_video_set_logo_string
I am trying to display a logo using VideLogoOption from python-vlc
vlc.libvlc_video_set_logo_int(pi,vlc.VideoLogoOption.logo_enable,1)
vlc.libvlc_video_set_logo_string(pi,vlc.VideoLogoOption.logo_file,...
0
votes
1
answer
150
views
Python VLC player won't quit
So my code is below
player = vlc.Instance()
player.set_user_agent("https","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 ...
0
votes
1
answer
496
views
Problems using marquee with python-vlc
A complete newbie here…
I’m currently trying to create a video player using python-vlc and PyQt5 (on a Mac) and it’s going pretty well….
My code is way to messy and embarrassing and filled with ...
1
vote
0
answers
42
views
Why is the VLC library binding in Python not acurately measuring marked end times?
I am trying to write a tiny video editor in python. All works just fine, however, the function that establishes an end mark sometimes returns a time which is two or three tenths of a second earlier ...
0
votes
1
answer
376
views
Why does python-vlc (libvlc) drop frames in fullscreen on a Raspberry Pi 4 B?
The fullscreen video is skipping frames and thus the stream was getting corrupted (some I-frames were dropped, leading to incomplete reconstruction of the video). This is with the following setup:
...
0
votes
1
answer
515
views
Why is python-vlc playing a video in its native resolution (not fullscreen) even though I set fullscreen to True? This is on Raspberry Pi
I'm running on
Raspberry Pi 4 B
Python 3.11.2
python-vlc 3.0.20123
The video opens in the left corner of the screen without the frames of a window, but not in fullscreen. I'm not using any GUI ...
0
votes
0
answers
704
views
I need a method to obtain a video file duration in vlc
I am developing a headless application on a Raspberry Pi Zero 2 W, Bullseye OS, and using VLC (Python) to view video files (h264). I have loaded vlc and python-vlc. I am able to view videos using ...
0
votes
1
answer
585
views
Raspberry Pi 4B - VLC player - Pir Sensor - Camera
I'm starting to know Python, so you can say I'm a newby.
For Halloween I'm working with a Python script for a Scare. The idea is to show a nice picture (a paused video) on a tv screen and when motion ...
-1
votes
1
answer
408
views
Switch VLC screens using python-vlc
I have multiple live streams running which I'm playing with python-vlc.
So something like this:
stream1 = vlc.MediaPlayer("rtsp://...")
stream2 = vlc.MediaPlayer("rtsp://...")
...
0
votes
1
answer
225
views
how to play one video after another without time.sleep - python vlc
for title in songs:
media_player = vlc.MediaPlayer()
media = vlc.Media(title + ".mp4")
media.add_option('start-time=' + str(seconds))
media.add_option('stop-...
1
vote
0
answers
135
views
What is the correct way to use tracks_get() function in Python-VLC module?
I'm just trying to get to grips with the VLC Python module and while the documentation is really helpful and the samples over at https://wiki.videolan.org/Python_bindings/ have been great for the ...
0
votes
1
answer
558
views
Running VLC on Raspberry Pi 3 from CLI
First sorry for my English, I'm French.
I'm currently working on this project :
I have a training bike and I'd like to be able to play videos depending on my pedaling speed.
Here is the hardware I ...
0
votes
1
answer
594
views
How to add event and handle playback in vlc-python
In the following code
# python-vlc
from vlc import Media, MediaPlayer, EventType, Event
class MusicPlayer:
def __init__(self) -> None:
self.items = ["/list/of/path/to/audio/file&...
-2
votes
1
answer
82
views
How to fix the pause button? [closed]
I made a program that allows you to choose any audio to play using vlc module and tkinter.
The pause button didn't work.
Even using global variable it didn't work.
#define "select file" ...
0
votes
1
answer
695
views
Why python-vlc mediaplayer doesn't work with url from list?
I tried to build a small webradio with pyhton-vlc. When I directly write the url of the radiostream in the code everything works fine. But I would like to read the urls from the "radiostationen....
1
vote
1
answer
155
views
New playback of another video file in PyQT5 using VLC
I am writing a script that, when launched, plays a video by its number. Then, after the end of playback, the script asks for the video number for the next playback, and so on. I use VLC python in ...
0
votes
1
answer
114
views
How i can disable reopen window on use `set_mrl(...)` function?
When i use set_mrl(...) function sometimes the window is reopen i need to keep the window never closed because i used to make share screen automation app.
the note i use python 3.11 with latest libvlc ...
0
votes
1
answer
124
views
How would i make a Python program to a exe that would work on all devices with a .mp4 file?
I want to convert a .py file to a .exe file that would work on all devices (or just all desktops if all devices isn't possible).
I tried to use py2exe but that doesn't work because it doesnt take the ....
1
vote
0
answers
1k
views
Python-VLC Errors When Opening Video File and Skipping Video Playback Position
I'm working on a project making a semi-randomized video player on the Raspberry Pi 4 (64-bit OS with Desktop) using Python-VLC. I have a proof of concept working, but I get some strange error messages ...
1
vote
0
answers
264
views
VLC MediaPlayer stops after a MediaList element and hangs, how can I restart it seamlessly?
I've got a vlc python program that I'd like load up a media list with multiple elements. If a clip (A) that I've defined as 'primary' is playing, it simply repeats. When I interrupt that with a ...
1
vote
0
answers
180
views
Read binary data of video files & Open it from Google Drive
I tried to read a video store on Google Drive by get the file data content following the code block below, i don't want to download the file to local, just read & load directly from GD.,
...
def ...
2
votes
0
answers
742
views
python-vlc.. output each from dual monitors
using python-vlc in python
I want to display a video on each of the two monitors
2 videos played successfully
But only monitor 1 shows the video
Is there a way to show the video on the second monitor?
...
0
votes
1
answer
266
views
python vlc, how to change a radio channel when button is pressed?
im trying to build a program (using pysimplegui) which contains a few buttons (play, stop, pause, next, previous) as you can see. and when i press "next" its stopping for some time and then ...
1
vote
1
answer
568
views
Change volume before playback in python-vlc
I'm trying to adjust the volume of an instance of vlc.MediaPlayer before playback. Running the below snippet (python3 test.py) plays five seconds of the audio file path/to/file.m4a. It appears that ...
0
votes
1
answer
368
views
Playing media from external device with python-vlc on linux
I'm trying to play a media file. This is the example on the python-vlc repository:
import platform
import os
import sys
from PyQt5 import QtWidgets, QtGui, QtCore
import vlc
class Player(QtWidgets....
0
votes
1
answer
2k
views
How to change VLC-python output device?
In my project, I need to get sound from a radio stream URL and play it. But it needs to be played in a specific output device called "VB-Cable Input (Virtual Audio Cable)".
I couldn't find a ...
0
votes
0
answers
202
views
How to solve vlc playing Youtube video lagging issue?
Hi guys I was facing a lagging issues when using vlc packages for video playing in python. This would effect the time sleep as the duration is no longer the same when lagging occur.
youtubeURL = "...
0
votes
1
answer
1k
views
How to exit fullscreen VLC invoked from Python?
I'm using Python to play a fullscreen video on a Raspberry Pi. This code works, but there's no way for the user watching to exit fullscreen mode.
import vlc
media_player = vlc.MediaPlayer()
...
0
votes
1
answer
1k
views
Getting file path of current track from Python-VLC's MediaListPlayer
I'm using MediaListPlayer from the python-vlc library. I use the following code to create a list of all the songs in a directory and begin them playing as a playlist, so that once one song ends ...
1
vote
1
answer
1k
views
VLC trigger action when media reaches timestamp
I'd like to the ability to run some code when the timestamp of a file has been reached (i.e. trigger an alert)
How can this be achieved?
I was looking at this https://www.geeksforgeeks.org/python-vl .....
0
votes
1
answer
644
views
Seeking in audio playing from a URL in VLC python
I am working on a python project which allows users to stream and download high quality music from the internet and I am using python vlc for that.
As I have a progress bar in my application I want to ...
0
votes
1
answer
536
views
python VLC library only plays some mp3 files and doesn't play others?
I am using the python vlc library to make a music player using pygame. I download all of the songs into mp3 format and then run some vlc code to play it. Here it is:
import pygame, sys
from pygame ...
1
vote
1
answer
488
views
Wrong video size when using python-vlc with Tkinter on MacOS
I am developing a multi-platform application that manipulates VLC through python-vlc and makes it draw in a Tkinter window.
I am using the following simplified code (inspired from the tkvlc.py example ...
1
vote
1
answer
713
views
python-vlc running out of memory after playing multiple songs
I am writing a python program, running on a raspberry pi (PI 3 A+), that plays a song every 10 minutes. I am using python-vlc to play the song through the pi's headphone jack.
PlaySong() is a ...
2
votes
0
answers
1k
views
Detect specific line from output of python-vlc from console while playing video in python pyqt5
when i am trying to play a video with python-vlc in pyqt5 like
import vlc,sys
from PyQt5.QtWidgets import *
app = QApplication([])
window = QWidget()
window.resize(500,500)
window.show()
instance=vlc....
0
votes
0
answers
68
views
Python3 VLC is only playing sound the first time
I have a function, and whenever it is called one of the lines has it run sound.play(), which works fine the first time. as soon as i hit the loop the second time, it doesn't do anything. just passes ...
0
votes
1
answer
666
views
Python window doesn't close after video ended
I'm currently making a code that will do various things such as controlling motors etc but at one point I need to code to popup a video on vlc and exit the window when the video ended, the problem is ...
0
votes
1
answer
327
views
Python-VLC unusually quiet
Edit - I eventually figured out the answer and have posted it below.
Using .audio_set_volume() on a media_player_new() object works fine with values 0-100, but it's much quieter than the ...
2
votes
1
answer
655
views
EXE made with PyInstaller can't load libvlc.dll (python-vlc)
I'm trying to package a python script which uses python-vlc using pyinstaller, but the resulting .exe refuses to recognize the libvlc.dll binary file. I always get the same error:
Traceback (most ...
2
votes
0
answers
272
views
Can you control an already open instance of VLC with the VLC python module?
For my program I need to control an already open instance of VLC (I just want to increase/decrease the volume and make it pause), but I do not know if that is even possible as it seems you have to ...
0
votes
1
answer
69
views
play as many sounds as loop count in python
I want the alarm.play() function to repeat for the number of loops and ring 10 times as in the example, but it just keeps ringing once every time I try or change it. How can I fix this? And does it ...