0

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?

6
  • What do you mean by "the elapsed seconds for the video"? Do you mean the countdown in seconds of the duration of the video? Commented Aug 7, 2020 at 13:57
  • 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. Commented Aug 7, 2020 at 14:28
  • What the extension does is actually print on the bottom-right the number of seconds elapsed and total for the video. So basically a countdown on top of the video, like a subtitle. But when I launch it through python-vlc the extension isn't activated and so nothing shows up. Commented Aug 8, 2020 at 8:30
  • Here is a description of the extension: aboutdevice.com/show-vlc-timing-in-millisecond Commented Aug 8, 2020 at 8:36
  • As far as I'm aware because extensions are not part of vlc the python api knows diddly squat about it. You'll have to code your own time display, thus the remark concerning player.get_time(). Commented Aug 8, 2020 at 16:59

1 Answer 1

0

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.

Docs: https://www.videolan.org/developers/vlc/doc/doxygen/html/group__libvlc__video.html#ga53b271a8a125a351142a32447e243a96

Sign up to request clarification or add additional context in comments.

2 Comments

Please set your question as answered then.
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?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.