Subtitler lite mod v1.3 Original

VLC Extensions

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

3
6 .6
Description:

"Subtitler (lite) mod.lua" - A semiautomatic workaround for VLC-2.1+ with [Refresh] button in the dialog box that should be pressed periodically during playback. Just use it with some button presser / key sender (see USAGE below).
"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.

DOWNLOAD:
- 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
Last changelog:

v1.3 (14.5.2018) 2 years ago

- VLC 3 microseconds fix.

francalba

6 years ago

Hello Mederi, congratulations for your app: \"Subtitler (lite) mod.lua\"

I would very pleased if you could tell me what lines of your program do I have to change for keeping always the subtitle on the screen.

Thanks in advance.
F. Alba.

Report

C

mederi

6 years ago

What do you mean by "keeping always the subtitle on the screen"?

Report

francalba

6 years ago

I mean that the subtitles is enabled on screen always, without the need of pushing Refresh button.
Thank you.

Report

C

mederi

6 years ago

There is not any better solution for VLC-2.1+. The "add_callback()" has been removed from Lua extensions.
You just need to use some "keypresser" or "keysender", an external application that is able to send "Enter" keystrokes to "Subtitler (lite) mod" window in certain time interval (about 100 ms) automatically. I have written and included a simple VBScript for Windows users. Linux users could find some application on the Internet and share their recommendation right here.

Report

haroldcruzortiz

5 years ago

Working nicely on my Mac :-)
I wrote this applescript "to Keep always the subtitle on screen"
(it could be useful for someone):

tell application "System Events"
tell process "VLC"
repeat
try
click button "Refresh" of window "Subtitler (lite) mod"
end try
delay 0.1
end repeat
end tell
end tell

Report

C

mederi

5 years ago

Thanks! I will put it in the description of the extension.
Now only Linux remains without similar simple solution for automatic pressing of the button.

Report

KqdK2J4K

5 years ago

http://wikiwiki.jp/disklessfun/?misc1#e976f4fa

Report

francalba

6 years ago

Hello Mederi, congratulations for your app: \"Subtitler (lite) mod.lua\"

I would very pleased if you could tell me what lines of your program do I have to change for keeping always the subtitle on the screen.

Thanks in advance.
F. Alba.

Report

francalba

6 years ago

Hello Mederi, congratulations for your app: \"Subtitler (lite) mod.lua\"

I would very pleased if you could tell me what lines of your program do I have to change for keeping always the subtitle on the screen.

Thanks in advance.
F. Alba.

Report

conehead

6 years ago

VLC 2.1.4, OS X 10.8.5

Does any one know how to make it work in OS X?

Report

C

mederi

6 years ago

Are there any extensions that works in OS X? Please try "Animated ASCII Art" extension as the "Subtitler (lite) mod" is based on the same principle. Please try also "Sampler (PG)", "VLSub" and some others if you can. Thanks.

Report

conehead

6 years ago

http://addons.videolan.org/content/show.php/VLSub+0.9.11?content=148752

"VLSub is not working with Vlc 2.1.x on any platform because the lua "net" module needed to interact with opensubtitles has been removed in this release for the extensions.
Works with Vlc 2.2 on mac and linux."

VLC 2.2 for OS X has yet not been release.

Report

conehead

6 years ago

http://addons.videolan.org/content/show.php/VLSub+0.9.11?content=148752

"VLSub is not working with Vlc 2.1.x on any platform because the lua "net" module needed to interact with opensubtitles has been removed in this release for the extensions.
Works with Vlc 2.2 on mac and linux."

VLC 2.2 for OS X has yet not been release.

Report

C

mederi

6 years ago

Is the "Subtitler (lite) mod.lua" file in the right place: "/Applications/VLC.app/Contents/MacOS/share/lua/extensions/" or "/Users/%your_name%/Library/Application Support/org.videolan.vlc/lua/extensions/"? Does the extension appear in VLC > Extensions > Subtitler (lite) mod? If you activate the extension, does the dialog box appear on the screen? I need a feedback from OS X users as I am on Windows.

Then the extension works as described in the screenshot: play a media first, activate the extension, press and hold Enter key or use an application that sends the presses of the Enter key automatically in the dialog box. The activated extension should automatically load SRT subtitle file with the same name and place as a playing media file when activating the extension or you can specify the path to SRT file directly in the script (edit the Lua script in a text editor). The path should not contain any special characters. It can contain only ASCII characters (Basic Latin range in Unicode charset), but this is probably only Windows related problem.

Report

conehead

6 years ago

This is what I've done.

1. Put the file 'Subtitler (lite) mod.lua' in /Applications/VLC.app/Contents/MacOS/share/lua/extensions/
2. Play a media
3. Activate the extension VLC > Extensions > Subtitler (lite) mod
4. Don't know what you mean by 'press and hold enter'. Sometimes the extension window shows, sometimes it crashes - here's the report

Process: VLC [51277]
Path: /Applications/VLC.app/Contents/MacOS/VLC
Identifier: org.videolan.vlc
Version: 2.1.4 (2.1.4)
Code Type: X86-64 (Native)
Parent Process: launchd [204]
User ID: 501

Date/Time: 2014-05-31 08:18:37.561 +0200
OS Version: Mac OS X 10.8.5 (12F45)
Report Version: 10

Crashed Thread: 18

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: EXC_I386_GPFLT

Thread 18 Crashed:
0 liblua_plugin.dylib 0x00000001007b740c lua_replace + 204
1 liblua_plugin.dylib 0x00000001007d0a58 gmatch_aux + 168
2 liblua_plugin.dylib 0x00000001007bbda4 luaD_precall + 1316
3 liblua_plugin.dylib 0x00000001007bbe3e luaD_call + 94
4 liblua_plugin.dylib 0x00000001007c6933 luaV_execute + 1139
5 liblua_plugin.dylib 0x00000001007bbe4f luaD_call + 111
6 liblua_plugin.dylib 0x00000001007bb295 luaD_rawrunprotected + 85
7 liblua_plugin.dylib 0x00000001007bb309 luaD_pcall + 73
8 liblua_plugin.dylib 0x00000001007b5b03 lua_pcall + 275
9 liblua_plugin.dylib 0x00000001007a39e1 lua_ExecuteFunctionVa + 417
10 liblua_plugin.dylib 0x00000001007a349d lua_ExecuteFunction + 157
11 liblua_plugin.dylib 0x00000001007a4e9a Run + 314
12 libsystem_c.dylib 0x00007fff91ae2772 _pthread_start + 327
13 libsystem_c.dylib 0x00007fff91acf1a1 thread_start + 13

Report

C

mederi

6 years ago

https://trac.videolan.org/vlc/ticket/11566

Report

syndicate01

6 years ago

I want to load up the sub titling software for my use with your vlc
player, but can, as i don;t know what the hell it is that i'm looking
at on the one page, supposedly with all of the information regarding it!!!!..
how am i going to use, what's not there, and what i can't understand, even
if it is there?!?!?!?!?!?!?..

Report

9

calonix

6 years ago

Hi Mederi
you can write that solution in a lua extension?
If you got it upload it, please.

Report

9

calonix

6 years ago

thank you! Mederi.
You got it.
It's really usefull.

Report

C

mederi

6 years ago

It is possible to modify the script and add a Refresh button in the dialog box. Then you could keep Enter key pressed down to keep updating subtitles on the screen. It is possible to use some "keypresser", an external application, to automatically send presses of Enter key in the dialog box window of this extension.
You can test this method on Animated ASCII Art extension: http://addons.videolan.org/content/show.php?content=162229
Interested?

Report

9

calonix

6 years ago

thank you! You got it!
it's really usefull.

Report

9

calonix

6 years ago

Could you fix that issue, please.

Report

C

mederi

6 years ago

Ticket #8097
Lua Extensions, VLC2.1: var.add_callback( ), var.del_callback( ) do not work
http://trac.videolan.org/vlc/ticket/8097
Some willing C++ developer could help.

Report

C

mederi

7 years ago

http://forum.videolan.org/viewtopic.php?f=29&t=112220#p382214

* find line 134> if actual_time>=v[1] and actual_time<=v[2] then
* insert next new lines>
Quote: if string.match(v[3], "It's been a long road")~=nil then
local duration = vlc.var.get(input,"length")
vlc.var.set(input,"position", (v[1]+80) / duration)
break
endJumps 80 seconds ahead if subtitle text "It's been a long road" should appear.

Report

9

calonix

7 years ago

Tips to load subtitle in VLC with subtitler:
- Your subtitle should get same video's name
- subtitle codification should be UTF-8 not UNICODE, UCS-2 Little Indian, etc.

thanks mederi!

Report

v1.3 (14.5.2018) 2 years ago

- VLC 3 microseconds fix.

5 years ago

Subtitler (lite) mod 1.2 (2.11.2014) 33650
- support for [SKIP] and [MUTE] commands at the beginning of subtitle text
- autodetection of UTF-8 charset of loaded subtitles
- different method of loading subtitles (URI) now should not have any problem to load subtitle files with paths containing also other than Basic Latin (non-ASCII) characters

Subtitler (lite) mod 1.1 (29.3.2014)
- a workaround for VLC-2.1+ with [Refresh] button in the dialog box that should be pressed periodically during playback. Some software button presser or key sender is recommended. A simple VBS script for Windows users is included in the package.

Subtitler (lite) 1.0 (13.7.2012)
- initial release based on vlc.var.add_callback() function removed since VLC-2.1

12345678910
1121
product-maker homayoon Sep 16 2020 8 great
8 great
product-maker gabzil Dec 28 2019 10 the best
10 the best
product-maker darvishrishi Jan 27 2015 9 excellent
product-maker calonix May 14 2013 9 excellent
product-maker diegocarrera Apr 20 2013 3 bad
product-maker Base: 4 x 5.0 Ratings
Be the first to comment
alesmuc
May 25 2020
gabzil
Dec 28 2019
sneetsher
Oct 10 2019
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
GPLv2 or later
version
updated Aug 28 2018
added Jul 13 2012
downloads 24h
19
mediaviews 24h 0
pageviews 24h 214
System Tags addon gplv2-later