A way to read currently shown subtitle from an external app

Feature requests for VLC.
Kirrrr
New Cone
New Cone
Posts: 9
Joined: 05 Oct 2016 11:07

A way to read currently shown subtitle from an external app

Postby Kirrrr » 11 Oct 2016 16:52

Hey there!

I don't know if this question a real Feature Request. I just can't find an appropriate solution among existing programmatic interface options.

:?:
Are there any means to expose currently shown subtitle string via some programmatic inteface (http, RC/telnet, tcp, SendMessage) so it can be processed by other apps?

If there are no such option I guess it is pretty natural to implement it at least by one of possible ways (e.g. as an http subpage). :idea:

Best regards!

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: A way to read currently shown subtitle from an external app

Postby Jean-Baptiste Kempf » 11 Oct 2016 23:28

So far, no there is no way to do that. It would require a custom subtitle renderer
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Kirrrr
New Cone
New Cone
Posts: 9
Joined: 05 Oct 2016 11:07

Re: A way to read currently shown subtitle from an external app

Postby Kirrrr » 11 Oct 2016 23:41

Thank you for quick reply, Jean-Baptiste!

So, if I understood correctly the only way to have current subtitle string in the external app is to get current playing video, get playing position and parse appropriate subtitles file? (obviously this can be done both in Lua extention or in external app) Thus a double work are done: once subtitles are decoded by player itself and second time they are decoded by extension or external app. Non elegant and pity. =(
Ok. Will try to deal with it. :)

Kirrrr
New Cone
New Cone
Posts: 9
Joined: 05 Oct 2016 11:07

Re: A way to read currently shown subtitle from an external app

Postby Kirrrr » 31 Oct 2016 09:52

Well... I would up this topic.

Tossing around in many manners I can't find any erm... humane approach to implement showing of subtitles in externall app. All ways lead to duct-taped solutions with one basic defective element: independent parsing of raw subtitles text, in fact it is a rewriting of subtitling algorythm of the player. Bummer... And there is NO ONE way to EXACTLY get currently displayed subtitle text, despite of the fact that this text is ALREADY AVAILABLE in some form inside the subtitling algorythm.

Just one string variable, but it is concealed inside player's "black box". I can't believe that exposing of this string is unreal. =(

Best regards!

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: A way to read currently shown subtitle from an external app

Postby Rémi Denis-Courmont » 31 Oct 2016 11:42

As J-B already wrote, you could get the subtitle text with a custom text rendering VLC plug-in. There are no needs to duplicate the subtitle file parser nor to second-guess the correct timing here.

Obviously, that will only work if the subtitle is actually text; some subtitles are pixel maps with alpha channel (e.g. DVD).
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Kirrrr
New Cone
New Cone
Posts: 9
Joined: 05 Oct 2016 11:07

Re: A way to read currently shown subtitle from an external app

Postby Kirrrr » 31 Oct 2016 11:47

As J-B already wrote, you could get the subtitle text with a custom text rendering VLC plug-in.
Oops... My bad. I misunderstood that point.
Thank you!
Will try to lurk further on this subject.

Kirrrr
New Cone
New Cone
Posts: 9
Joined: 05 Oct 2016 11:07

Re: A way to read currently shown subtitle from an external app

Postby Kirrrr » 01 Nov 2016 11:46

Rémi, could you please point me to appropriate dev docs which are better to start with? Maybe some suitable examples.

I have some experience in programming with VC++ so I hope it have a sence for me to try to develop such a gizmo (I hope I'm not too presumptuous =) ).

Best regards!

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: A way to read currently shown subtitle from an external app

Postby mederi » 01 Nov 2016 12:37

You could find some useful information here: https://wiki.videolan.org/Developers_Corner
Perhaps the TTS plugin could be a suitable subtitles related example for you: https://trac.videolan.org/vlc/ticket/11893
Could you please compile the win32 sapi plugin for me (sapi.dll)?

Kirrrr
New Cone
New Cone
Posts: 9
Joined: 05 Oct 2016 11:07

Re: A way to read currently shown subtitle from an external app

Postby Kirrrr » 01 Nov 2016 12:42

Thank you, mederi!
Could you please compile the win32 sapi plugin for me (sapi.dll)?
Sorry, but not now. I haven't opened MSVS for a very long time. Need some time for recovery. =)


Return to “VLC media player Feature Requests”

Who is online

Users browsing this forum: No registered users and 13 guests