SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2012-02-25 10:49:04

vlahonick
Banned
From: Universe
Registered: 2011-12-03
Posts: 347

Tutorial on how to create a VLC Subtitles Toggler (Windows & Linux)

hi all,

here is a small tut on how u create 2 launchers (u can use the tut below to do it for more subs ofc) that will allow
you to chance subtitles (encoding) in vlc by 2ble clicking on them instead of having to go
vlc => tools => prefs => subs & osd => change encoding

(i will use as an example greek and romanian -if u have greek encoding u cant see romanian subs and the other way around-)


For this to work you have to change the paths according to your settings!!!

======================================================================================

Linux


1. create gr_to_ro.sh with the following code:

#!/bin/bash
sed -i 's/subsdec-encoding=Windows-1253/subsdec-encoding=ISO-8859-16/g' /home/vlahonick/.config/vlc/vlcrc

2. create ro_to_gr.sh with the following code:

#!/bin/bash
sed -i 's/subsdec-encoding=ISO-8859-16/subsdec-encoding=Windows-1253/g' /home/vlahonick/.config/vlc/vlcrc

3. put some this two scripts (for example in your home or the .vlc folder in my case)
and create two launcers (in the desktop or in the panel) that will run the scripts from
the location u puted them. ofc u can run directly the scripts instead of making shortcuts.
i just created launchers in my panel so i can add on them the flags of the languages above smile

the code a launcher should contain will be something like:

gr to ro

gksu sh /home/vlahonick/.config/vlc/el_to_ro.sh

ro to gr

gksu sh /home/vlahonick/.config/vlc/ro_to_el.sh


make sure the scripts are executables.

chmod +x path/to/script/el_to_ro.sh
chmod +x path/to/script/ro_to_el.sh

======================================================================================

Windows

Doing the same thing in windows is pretty simple.

1. Download FART (Finad And Replace Text) from here http://sourceforge.net/projects/fart-it/
2. Place it in your System32 folder
3. Create on your Desktop or where u want the el_to_ro.bat with the following code:

fart -c -r -i %appdata%\vlc\vlcrc Windows-1253 ISO-8859-16

4. Create on your Desktop or where u want the ro_to_el.bat with the following code:

fart -c -r -i %appdata%\vlc\vlcrc ISO-8859-16 Windows-1253

======================================================================================

and that's all... hope someone find this usefull, at least i did smile

Last edited by vlahonick (2012-03-10 12:58:00)


"I do not fear computers. I fear the lack of them."
Isaac Asimov

Offline

Help fund CrunchBang, donate to the project!

#2 2012-02-28 18:00:49

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 9,739
Website

Re: Tutorial on how to create a VLC Subtitles Toggler (Windows & Linux)

Nice tutorial...

Won't the files need to be made executable?

chmod +x el_to_ro.sh

chmod +x ro_to_el.sh

VSIDO
If you build it, they will come...
Words That Build Or Destroy

Offline

#3 2012-03-02 00:45:20

vlahonick
Banned
From: Universe
Registered: 2011-12-03
Posts: 347

Re: Tutorial on how to create a VLC Subtitles Toggler (Windows & Linux)

@VastOne

y they do. thanks for mention it, i forgot it smile  i will add the commands in the main post.


"I do not fear computers. I fear the lack of them."
Isaac Asimov

Offline

#4 2012-03-02 01:01:07

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 9,739
Website

Re: Tutorial on how to create a VLC Subtitles Toggler (Windows & Linux)

^ Excellent.  I added it to the Quick References

Nice Job vlahonick!  big_smile


VSIDO
If you build it, they will come...
Words That Build Or Destroy

Offline

#5 2012-03-03 11:37:03

vlahonick
Banned
From: Universe
Registered: 2011-12-03
Posts: 347

Re: Tutorial on how to create a VLC Subtitles Toggler (Windows & Linux)

ty man smile

i have also make a version for windows (using batch + fart.exe). do u want to post it too?
i am asking because i am not rly sure if a windows script has place here...


"I do not fear computers. I fear the lack of them."
Isaac Asimov

Offline

#6 2012-03-03 19:07:09

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 9,739
Website

Re: Tutorial on how to create a VLC Subtitles Toggler (Windows & Linux)

^ If you make them part of the first post, they obviously would be there.  smile

You might want to host them on Dropbox or a pastebin and just have a link to them

It is up to you..


VSIDO
If you build it, they will come...
Words That Build Or Destroy

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo