Page 1 of 1

Setting subtitle file in libvlc python bindings

Posted: 16 Sep 2016 13:44
by nevare
I'm using LibVlc version 2.2, but I think I might have the LibVlc python bindings for 3.0. Anyway, it seemed to work fine but now I want to set a subtitle from a .srt to a media file.

In the documentation there is mention of a function named
video_set_subtitle_file(self, psz_subtitle)

However, this function does not exist in my vlc.py file. Instead it has a AddSlave() function which should be used. My libvlc doesn't have a function AddSlave() though, because it is version 2.2 and AddSlave() is from 3.0.
I tried manually putting back the video_set_subtitle_file function but it always gives the result 0 and doesn't actually add the subtitle.

Is there any place I can get the 2.2 vlc.py file or any workaround for my problem?

Thanks

Re: Setting subtitle file in libvlc python bindings

Posted: 18 Nov 2016 15:47
by OlivierAubert