"Subtitler (lite).lua" - The extension works only in VLC-2.0.x. The automatic solution should not be forgotten. VLC archive: http://download.videolan.org/vlc/
Subtitler (lite) is VLC extension that displays subtitles on the screen in a playing video and/or in a dialog box. Now you can watch your film with 2 different subtitles. Subtitler (lite) mod now can SKIP unwanted scenes (intro, credits, commercials, unimportant scenes, ...) or MUTE selected scenes.
DOWNLOA

- save the .zip file
INSTALLATION:
- extract (unzip) the .lua file and put it in the VLC subdir /lua/extensions, by default:
* Windows (all users): %ProgramFiles%\VideoLAN\VLC\lua\extensions\
* Windows (current user): %APPDATA%\VLC\lua\extensions\
* Linux (all users): /usr/lib/vlc/lua/extensions/
* Linux (current user): ~/.local/share/vlc/lua/extensions/
* Mac OS X (all users): /Applications/VLC.app/Contents/MacOS/share/lua/extensions/
* Mac OS X (current user): /Users/%your_name%/Library/Application Support/org.videolan.vlc/lua/extensions/
(create directories if they don't exist)
- Restart VLC or just reload extensions (Tools > Plugins and extensions > Active Extensions tab: Reload extensions button).
USAGE:
Then you simply start the extension in VLC menu "View" or "Vlc > Extensions" on Mac OS.
The extension will try to load SRT subtitle file of the same name and location as a playing media ("d:\films\film.avi" --> "d:\films\film.srt").
Subtitler (lite) mod: Then you need to keep pressing the [Refresh] button in the dialog box. You rather use some button presser / key sender. Following ones are included in the package:
- "keypresser(Windows).vbs", a simple VBScript for Windows users;
- "buttonpresser(Mac).applescript", a simple AppleScript for Mac OS X users
http://addons.videolan.org/content/show.php?content=152364&forumpage=1#c473169
- "keeping-press-enter(Linux).sh" - Linux, xdotool - A shell script:
http://wikiwiki.jp/disklessfun/?misc1#e976f4fa
"sleep 0.1" or "usleep 100000" instead of "sleep 1"?
- "subtitlerlite.ahk" - AutoHotkey script for Windows:
https://forum.videolan.org/viewtopic.php?f=29&t=97791&start=40#p407054
To set up the Subtitler (lite), please edit global variables at the beginning of the script:
http://forum.videolan.org/viewtopic.php?f=29&t=97791#p346506
subtitles_uri = nil
The default value nil means, that the variable subtitles_uri is not defined and the script automatically looks for a SubRip (SRT) subtitle file of the same name and location as a playing media ("d:\films\film.avi" --> "d:\films\film.srt"). You can customize the "srt" extension in filename_extension variable (see below).
You can set your custom uri ("file:///D:/films/subtitles.srt"). A web browser can help you to encode a path in uri format (Firefox: open a file (drag&drop) in the browser, right-click, show info).
output_dialogbox = false
Set the value true or false. If it is true, then it displays subtitles in the dialog window.
output_osd = true
It displays subtitles in a playing video. If a video is not available (audio files), then it automatically displays subtitles (lyrics) in the dialog box.
osd_position = "top"
You can place subtitles in a playing video on "top", "top-left", "top-right", "left", "center", "right", "bottom", "bottom-left", "bottom-right".
charset = "Windows-1250"
Set an appropriate code page of your subtitle files (Western European subtitles "Windows-1252"). UTF-8 charset is automatically detected, but you can force it if you want. nil value also means "UTF-8" charset.
filename_extension = "srt"
You can set your custom extension for your subtitles dedicated to Subtitler. You can set a language code ("eng.srt") or you can set some other extension ("srt-vlc") as a subtitle file now can contain commands for Subtitler (lite) mod.
execute_commands = true
The default value executes commands [SKIP], [MUTE] found at the beginning of a subtitle text. You can use any subtitle editor with SRT support (Subtitle Edit http://www.nikse.dk/subtitleedit/ , Aegisub http://www.aegisub.org/ ) or just any ordinary text editor (Notepad) to create/edit SRT subtitles/scripts/cutlists for Subtitler (lite) mod.
Forum location: http://forum.videolan.org/viewtopic.php?f=29&t=97791
Donation:
If you find this extension interesting, your donation is welcome at http://www.videolan.org/ to encourage developers to do some maintenance and improvements of Lua Extensions support in VLC.
https://trac.videolan.org/vlc/ticket/8097
https://trac.videolan.org/vlc/ticket/3883
Ratings & Comments
64 Comments
8 8 great
Hi, I tried to use the plugin on ubuntu 20.04. I discovered that, in order to make "Subtitler (lite) mod" appear in the vlc view menu, I have to copy the file "Subtitler (lite) mod.lua" in ~/snap/vlc/1620/.local/share/vlc/lua/extensions and not in ~/.local/share/vlc/lua/extensions/ as written up in this guide. I discovered it locating the VLsub (a plugin that comes by default in vlc) folder with the Nautilus search. Anyway the plugin still doesn't work. Activating the plugin from the view vlc menu it works only opening video with no subtitles file (giving the instructions), while opening video with same name srt subtitles file nothing happens at all. Then I tried to install on windows 10, discovering that the right folder to place the file "Subtitler (lite) mod.lua" is %APPDATA%\Roaming\vlc\lua\extensions\ and not %APPDATA%\VLC\lua\extensions\ as written in this guide. In this way the plugin works properly on windows 10, while still I don't get it to work on ubuntu 20.04. Can please anybody help?
Some Linux users have discussed and shared their experience in comments for Time: https://addons.videolan.org/p/1154032/
Hello thanks a lot for this programm *_* i would like to change the condition to display the subtitle when the player is in "pause" but it doesn't work yet :'( maybe it is not possible but if it is can somebody help me ? thanks for your answer :)
So do you want to display subtitles only when you pause a playback and do not show them during normal playback?
Hi,first I'm glad you aswer me, I'm veryhappy, thanks a lot to take time to answer me. Yes that's it. I would like to do this to improve my English. So I would to always display the first subtitle [easy I have nothing to do :)] but when i don't understant i would like to display a second subtitle as you do with this plugin when i stop the movie. Then i do play and then the second subtitle disappear . I think it should be not so hard you've already done the script but I failed to understand the all script well. It could help a lot of people who are learning foreign language :) thanks again
Find the following line: if subtitle==nil then Then try to add the condition there: if subtitle==nil and vlc.playlist.status()=="paused" then
Also edit related "else" command in line 136 (v1.3) to: elseif subtitle~=nil then
thanks I forgot to do that but it is not enough to do it :( Thanks to help me :) I keep working on this :)
When I tried I change the wrong condition (line 69 instead of 103) but it's still not working :( I tried with an "or" instead of "and" but it's not better. I ask myself if the problem is not linked with the dialogue box
But I think I don't understand well the program, beaucause when I replace the condition line 103 ("if subtitle==nil then") by "if true then" i thought it should always display the subtitle but no. so if I add here vlc.playlist.status()=="paused" it doesn't work. What do suggest me ? Th
thanks for your answer*
[2] Following solution does not need pressings of the button in the dialog box (v1.3). Line 28> capabilities = {"playing-listener"} Line 42> --Define a callback function here by inserting following new lines: function playing_changed() input_events_handler() subtitle=nil end Really not a bad idea I could add in the future version.
Hi, It is working wonders *_* (I couldn't do it alone, I absolutely not thought about this. You know VLC script very well 0_o ) Thanks a lot for your work, I was thiking to this for long time but I couldn't find it on the net. You should release it, you'll probably have a lot of success :) [it's indeed so helpful to learn a foreign language and very adapted] Congratulation for your amazing work and thanks a lot again. you make me so happy and I'll think to you each time I'll use VLC. I wish you a lot of success :)
10 10 the best
I would suggest you to use PlayerXtreme. A couple of times, it was difficult for everyone to understand the vocals. So people need a player that support subtitles with proper stability. I discovered PlayerXtreme in this category, the best app till now. It allows you to restyle and resize the subtitles. You can also download new subtitles by using its download subtitles feature. It also supports all popular formats of subtitles. It allows Closed Captioned (CC), SRT, SMI, TXT and more. It has also the capability to play approximately 40 formats without any conversion
Quote:http://addons.videolan.org/content/show.php?content=152364&forumpage=1#c477914
On Linux
by KqdK2J4K on: 12 hours ago
http://wikiwiki.jp/disklessfun/?misc1#e976f4fa
Thank you for sharing your script. I will put it in description and package of the extension.
Quote:sleep 1 This command waits 1 second that might be too long. Try to use "sleep 0.1" instead of "sleep 1" or use "usleep 100000" with microseconds. I cannot test it as I am on Windows XP. Please somebody let me know the best solution.
locate the string in "Subtitler (lite) mod.lua" file data = file:read(500000) and add after data = string.gsub(data, "\r", "")
What OS?
Pretty much any since the regular expression which used to parse the srt file does not take in mind that in windows line endings are \r\n not just \n . That means any srt file made under windows will not work.
Well, the script works well for me on my system Windows XP, VLC 32-bit. The "\r\n" EOLs are automatically converted to "\n"s by the file:read() function. Please confirm conditions when is the different behavior. VLC 64-bit? Linux or Mac? I cannot test it, but it is really possible that you are true and additional line of code is necessary there.
Did not work on MAC OS
Was it the same crash as was already reported here by conehead on May 31, 2014, and the additional line of code is the solution? http://addons.videolan.org/content/show.php?content=152364&forumpage=1#c465569 The script should not crash. It just should not find any subtitles in the file. I can pass all necessary information to VLC developers to fix this crashing issue and I can update the script. Is there any method to send "Enter" keystrokes automatically and periodically into the "Subtitler (lite) mod" dialog box on Mac OSX? Any script or application? Thank you for your report and solution.
Hi, surferau! Please confirm whether the new version (1.2) of Subtitler (lite) mod works on Mac OS X. Thanks.