So I am running VLC on a Pi 4 and I have installed an extension to VLC that shows the elapsed seconds for the video. However, when I use python-vlc to launch VLC it does not enable the extension. Is there a way to do this using python-vlc?
1 Answer
I think you're confusing VLC and LibVLC? By "extension", I believe you mean VLC app add-ons. I don't think you can easily have these running when using standard libvlc builds.
However, there is a way to achieve what you want using the LibVLC APIs. Look into the marquee APIs, which is a video filter that allows you to display custom text at custom locations on the video.
2 Comments
mfkl
Please set your question as answered then.
Nikhil Joshi
So I am able to set the marquee to a string, but I can't seem to figure out how to add the elapsed video time to the string. You can use certain variables to show the system time, but I can't figure out how to show just the number of seconds that have passed since the start of the video, i.e. a counter. Any ideas?
player.get_time()will return the current position in thousandths of a second i.e. at the 45 second point, it would return 45000, so dividing by 1000 would give 45 seconds.notpart ofvlcthe python api knows diddly squat about it. You'll have to code your own time display, thus the remark concerningplayer.get_time().