INDEX  F.A.Q.  SEARCH  LATEST POSTS     Rules  Register  Profile  Private messages  Login


Search all forums or this forum: Advanced search
How to add permanent subtitles with VobSub

Forum Index -> How to's -> User guides Printer-friendly version
Goto page 1, 2  Next
Reply to topic
Author Message
Truman
Moderator


Joined: 19 Feb 2001
Location: Berlin, Germany

Post Posted: Apr 13, 2002 15:16 Posts Comp View users profile Send private message Reply with quote

How to add permanent subtitles with VobSub /VirtualDub / Avisynth

There are several ways to add permanent subs. This is only one solution. Usual subtitle formats are *.srt (subrip), *.sub (microDVD), *.sub (subviewer), *.ssa (Sub Station Alpha), *.sub (vobsub, requires a *.idx too).

Used tools:

VirtualDub 1.4.10
vobsub 2.13
Avisynth 1.0 beta 5
any MPEG encoder

Installation hints:

Extract VirtualDub to any dir and double click on AuxSetup.exe, install the handler.Leave the proxy mode alone unless you know what you are doing.

Copy Avisynth to any dir. Copy Avisynth.dll to c:\winnt\system32\ resp. c:\windows\system\. Then run Install.reg.



VobSub now comes with an installer. In the options dialog check "vobsub for VirtualDub" and "TextSub for VirtualDub" too.



If you are unsure which subtitle format you have, just open it with a text editor. All the mentioned formats above are txt files, except .sub (vobsub). It looks like this:
Code:

  DTĔ  쁁! U8q`:& f        <8,ADhA   
#2BH<kg8KKp8C0h46o < ֳۋi>Dܶ


Let me start with a short description how to rip subtitles off a DVD.
Start VobSub Configure, press "open" and select the *.ifo file.



Select an output directory and press OK.





Select the subtitle streams, that you want to save clicking the and buttons.
After that press the button.
Vobsub writes a new index now.



After that the configuration dialog will appear. Select one language[1], select time offset[2] if you need, fade in and out[3] if you like and define the exact position of the subtitles[4]. then press OK.



Now you are ready to proceed.

Add subtitles with...
1. VirtualDub and Vobsub
2. VirtualDub and Textsub
3. Avisynth and VobSub
4. Avisynth and TextSub

off topic: Mux avi and subs (Direct VobSub)

Scenario 1 --VIRTUAL DUB--
Your subtitles are ripped by vobsub and you have a *.idx file, written by vobsub as well.

Let's start VirtualDub, select file > open the video file.
Select video > filters > add vobsub
A configuration dialog will pop up,



press open, select the *.sub (.sub and .idx must have the same filename)






As you can see, you have several options to change the properties of the subtitles, select a language.
Close the configuration dialog by pressing OK, then close the VD filter dialog by pressing OK. Now you are back to the main VD window, select file > preview or just hit F5.



If you want to change position or background color or whatever, abort the preview, select video > filters again. The filter dialog appears, doubleclick on vobsub and you can change whatever you want. Then preview again. If you are happy, select file > Start frameserver.



Frameserve to your favorite MPEG encoder.

>>back

Scenario 2 --VIRTUAL DUB--
Your subtitles are ripped by subrip or you wrote your own subs with Sub Station Alpha.

Let's start VirtualDub, select file > open the video file.
Select video > filters > add TextSub
A configuration dialog will pop up, press open, select the *.sub, *.srt or *.ssa



Press STYLE to open the configuration dialog.



As you can see, you have several options to change the properties of the subtitles.

Close the configuration dialog by pressing OK, close the TextSub setting dialog by pressing OK, then close the VD filter dialog by pressing OK. Now you are back to the main VD window, select file > preview or just hit F5.



If you want to change position or color or whatever, abort the preview, select video > filters again. The filter dialog appears, doubleclick on TextSub and you can change whatever you want. Then preview again. If you are happy, select file > Start frameserver.



Frameserve to your favorite MPEG encoder.

>>back

Scenario 3 --AVISYNTH--
Your subtitles are ripped by vobsub and you have a *.idx file, written by vobsub as well.

Go to the VobSub directory and start VobSub Configure.
A configuration dialog will pop up,



press open, select the *.sub (.sub and .idx must have the same filename)






As you can see, you have several options to change the properties of the subtitles, select a language.
Close the configuration dialog by pressing OK.
Open notepad, write your Avisynth script. Make sure, that you type the real pathes to the *.dll and the source files.
Code:
LoadPlugin("c:\winnt\system32\vobsub.dll")
AVISource("d:\divx\matrix\matrix.avi")
#[filter]
#[filter]
#[filter]
#[filter]
VobSub("d:\divx\matrix\subs\matrix")

The last line refers to the *.sub and *.idx, do not type any extension into that line.
Save it as *.avs. Make sure that the filetype field in the save dialog box says All Files (*.*) and NOT Textfile (*.txt). Now right click on *.avs in explorer, select open-with and select the Media Player from the list. Preview.
If you want to change position or background color or whatever, stop windows media player and start VobSub Configure again. The configuration dialog appears, open the *.sub again and you can change whatever you want. Then preview again. If you are happy,
frameserve to your favorite MPEG encoder.

>>back

Scenario 4 --AVISYNTH--
Your subtitles are ripped by subrip or you wrote your own subs with Sub Station Alpha.

Go to the VobSub directory and start SubResync.
A configuration dialog will pop up, press open, select the *.sub, *.srt or *.ssa





Press EDIT to open the configuration dialog.



As you can see, you have several options to change the properties of the subtitles.

Close the configuration dialog by pressing OK, and save as *_new.srt, *_new.ssa, *_new.sub, etc.

Write your Avisynth script.
Code:
LoadPlugin("c:\Program Files\Virtualdub\plugins\TextSub.vdf")
LoadPlugin("c:\winnt\system32\mpeg2dec.dll")
mpeg2source("d:\dvd\matrix\matrix.d2v")
#[filter]
#[filter]
#[filter]
#[filter]
TextSub(d:\dvd\matrix\subs\matrix.srt")

Make sure you typed the proper extension of your subtitle file into the last line.
Save it as *.avs. Make sure that the filetype field in the save dialog box says All Files (*.*) and NOT Textfile (*.txt). Now right click on *.avs in explorer, select open-with and select the Media Player from the list. Preview.
If you want to change position, color, style or whatever, stop windows media player and start SubResync again. The configuration dialog appears, open the subtitle file again and you can change whatever you want. Then preview again. If you are happy,
frameserve to your favorite MPEG encoder.

>>back

off topic: --Multiplex subtitles to a AVI--(playback using Direct VobSub)

Go to the VobSub directory and start SubMux. Supported formats are .avi, .wav, .wma and as subtitle file .ssa (SUB Station Alpha). If you have a different subtitle format, you have to convert it to *.ssa.
Go to the VobSub directory and start SubResync. Open your subtitle file. If the subtitle file is one of the text formats, you can edit it if you like, then save as *.ssa.



If the subtitle file is ripped by vobsub (*.sub and *.idx)...



... the program has to "learn" which Image represents which character. Answer everyone of these question boxes very carefully. You may know that procedure if you ripped subtitles with SubRip once.



After that save as *.ssa.
Finally start SubMux and drag and drop the AVI and the *.ssa into the window.



Press "MUX" and save as new *.avi.

What is it good for? DirectVobSub is a direct show filter, which can be used to display subtitle files during playback in a software player. To display the muxed subtitle(s) you need to install Vobsub for DirectShow. The subtitles are not hardencoded to the video file. The advantage of submux is, that you don't need to carry arround a whole lot of single files. All you need to display the muxed subs is DirectVobSub. Open explorer, search for the *.avi, double click on it, usually Windows media player starts and DirectVobSub starts in the background.
If you want to select a different language, right-click on wmp or doubleclick on the Dvobsub symbol on the task bar. Also there is a very detailed Dvobsub configuration dialog.
Why the submux part of the guide is rather off topic? The subtitles are not hardencoded. So you can not simply load the *.avi as videosource and proceed. Well, it is possible. Start TMPGEnc, select option > enviromental settings > VFAPI plugins. Disable all plugins except directshow multimedia file reader. Then load the *.avi as video source, audio and subtitle will be loaded as well. You can even change the subtitle languages after you started the conversion. Anyway, this is very experimental and not recommended. Use Submux and DirectVobSub to playback only.


>>back


Last edited by Truman on Nov 14, 2002 11:55, edited 5 times in total


Distorti0
Member


Joined: 04 May 2002

Post Posted: May 04, 2002 05:35 Posts Comp View users profile Send private message Reply with quote

I have tried this meathod now for the past 5 hours with no success. TMPGEnc will not open the *.vdr file. and neither will any other encoder. I have restarted windows and i have followed your instructions perfectly. I am using the filter that opens sub station alpha script, it loads fine and i can see the result of the subtitle program on the second screen within virtualdub. I then go to file-> start frame server. after i name the file something i want it to be saved as, it comes up fine and says AVIFileonly in the fileclients installed place. then i try to open the file that i name right after clicking on the frame server and in TMPGEnc it says it 'cannot open or it is unsupported'. I tried boosting the priority level of one of the plugins in TMPGEnc per your suggestion in your document. this changed nothing. Please help me out. by the way i have tried two different formats of this movie within virtualdub....avi and mpg. both result in the same errors.

Truman
Moderator


Joined: 19 Feb 2001
Location: Berlin, Germany

Post Posted: May 04, 2002 09:46 Posts Comp View users profile Send private message Reply with quote

So actually you have a frameserve problem. Then continue here.
Make sure, that the proxy mode is turned off.
Also have a look at this topic
http://www.vcdhelp.com/forum/viewtopic.php?t=87293&highlight=msvcr70+dll


gircobain
Member


Joined: 04 May 2002
Location: So Paulo, Brasil

Post Posted: May 04, 2002 17:34 Posts View users profile Send private message Reply with quote

I had the same problem when trying to encode some divx's to vcd. Then i noticed those divx's had some strange audio bitrate like 138 kbps. So i ripped the whole audio track (PCM, no compression) and the video only to a separate file. Applied my filters and frameserved the now video only divx thru VirtualDub, fed TMPGenc's video input with the .vdr and audio with the .wav i ripped, and voil. It worked great :)

P.S.: you might wanna use an external encoder for audio (like tooLAME), as TMPGEnc one isn't that superb


jinnau
Member


Joined: 25 May 2002

Post Posted: May 25, 2002 15:59 Posts View users profile Send private message Reply with quote

I am having trouble with subtitling a clip. The subtitle file is SSA type and I used SubMux to link the subtitle to the clip. The clip type is a divx file. The problem I am experiencing is that the clip is upside down after the subtitle is linked to the clip. Any help would greatly be appreciated.

strangestribe
Member


Joined: 02 Jul 2002

Post Posted: Jul 04, 2002 13:23 Posts View users profile Send private message Reply with quote

i have a problem... i sub muxed a subtitle srt to the avi... and playing the avi the subtitles are good but when converting on tmpg or virtual dub the subtitles aren't showing...

can u help me?

p.s. i've allready deleted the srt, sub files so all i got is the multiplexed avi with the subtitles...


chrs
Member


Joined: 18 Feb 2002
Location: USA

Post Posted: Jul 04, 2002 16:07 Posts Comp View users profile Send private message Reply with quote

What about...well..."graphical" subtitles? On the Not Another Teen Movie DVD, there's a subtitle channel with tidbits about the movie that I ripped to bitmaps. I'm clueless...what do I do now? :-\

Truman
Moderator


Joined: 19 Feb 2001
Location: Berlin, Germany

Post Posted: Jul 05, 2002 04:48 Posts Comp View users profile Send private message Reply with quote

@ chrs, usually one creates .bmp subtitles to create selectable SVCD subs. However, you can add it permanently to the MPEG with Avisynth.

LoadPlugin("C:\dir\AVISYNTH SUBTITLER.DLL")
AVIsource("C:\dir\filename.avi")
AvisynthSubtitler("D:\subs","permsubs.txt")


@strangestribe, At the moment I have installed vobsub 2.16 and I have problems with submux too. I am still working on it, maybe I go back to vobsub 2.13.
There should be a way to extract the muxed subtitles. Read the vobsub(submux) docs.


strangestribe
Member


Joined: 02 Jul 2002

Post Posted: Jul 06, 2002 10:36 Posts View users profile Send private message Reply with quote

hey... i quit on those multiplexed avi's... i made all the sync again with the srt file. I used the text sub filter with virtual dub and frameserved it to tmpg, but its incredible the loss of quality with this method... The subtitles in virtual are quite fine but in the encoded VCD made by Tmpg, the subtitles are allready blured... Incredible...

^GeX^
Member


Joined: 14 Jul 2002
Location: NoWhere

Post Posted: Jul 14, 2002 19:33 Posts View users profile Send private message Reply with quote

Well, how i make a *.vdx file?

^GeX^
Member


Joined: 14 Jul 2002
Location: NoWhere

Post Posted: Jul 14, 2002 19:35 Posts View users profile Send private message Reply with quote

*.idx file no *.vdx excuse me.

Truman
Moderator


Joined: 19 Feb 2001
Location: Berlin, Germany

Post Posted: Jul 15, 2002 15:44 Posts Comp View users profile Send private message Reply with quote

^GeX^ wrote:
*.idx file no *.vdx excuse me.

You can rip dvd subtitles with vobsub. Start vobsub config, open the *.ifo, select the language and press the wide buttom in the middle of the configuration window. Vobsub will write a new *.idx and a binary *.sub file.


Bosi
Member


Joined: 17 Jul 2002

Post Posted: Jul 17, 2002 06:59 Posts View users profile Send private message Reply with quote

rolleyes.gif Hello!

I have only one question. How can I simply add an .srt subtitle to an .avi without quality destruction? Wich program can do this?? Or how can I save (in VirtualDub) the subtitled (with the filter) avi file to get the same avi as the input? Or (I'm stupid I know) how can I use the SubMux? Because I dragged the subtitle(.ssa) and the avi and i pressed the "Mux" button and i saved to a new avi file and nothing is happend! I get a 1.5Mb avi wich was nothing. So please help me ASAP!!!!

Thank you!
(Sorry for the grammar, I'm from Hungary)


Truman
Moderator


Joined: 19 Feb 2001
Location: Berlin, Germany

Post Posted: Jul 17, 2002 13:40 Posts Comp View users profile Send private message Reply with quote

The latest submux should work with *.srt too. As mentioned above a had problems with that new submux version and I still did not have the time to test it. Definitely submux (vobsub 2.13) work fine with *.ssa.
Submux do not reencode, so it is quite fast and it does not decrease the quality of the video.


Bosi
Member


Joined: 17 Jul 2002

Post Posted: Jul 18, 2002 17:21 Posts View users profile Send private message Reply with quote

tongue.gif Thank you!

Another question. Where can I find this VobSub 2.13? Because this is an old program. Could you send me it in email? I'd be very glad! janosy.csaba@chello.hu


gtanime
Member


Joined: 19 Jul 2002

Post Posted: Jul 19, 2002 11:59 Posts View users profile Send private message Reply with quote

umm i am trying to add my subs that are in srt format, but dont worry i can make it anything i want so anyways i add the 2 files to sub mux and i press mux save the avi and it gives me a damn 326K file and plays just the begining and makes the backround of the movie green! it did same thing for .ssa files either, and for vitual dub i cant get that filter thing to work u said add subtext or what ever and i press add and nothing what u told me to add is in there, all i want is subs in my avi, where do i find this text sub filter?

Truman
Moderator


Joined: 19 Feb 2001
Location: Berlin, Germany

Post Posted: Jul 21, 2002 15:24 Posts Comp View users profile Send private message Reply with quote

@ Bosi, today I worked on vobsub. I uninstalled it completely (incl. registry keys) and reinstalled vobsub 2.16.
I don't know, what went wrong the past days, however, now it is working again.
Also I reread the entire topic once again and I believe the submux part is somewhat confusing. I am going to change or delete that part completely soon.
What is submux? No, what is DirectVobSub? DirectVobSub is a direct show filter, which can be used to display subtitle files during playback in a software player. You put the file.avi, file_lang1.srt, file_lang2.ssa into
the same directory. If you want to autoload the proper subtitle files, all files must have the same filename.
Submux is a "shortcut". Drag and drop file.avi, file_lang1.srt, file_lang2.ssa etc. etc. into the submux window, press "mux" and select an output filename. To display the muxed subtitle(s) you need a working DirectVobSub.
The subtitles are not hardencoded to the video file. The advantage of submux is, that you don't need to carry arround a whole lot of single files. All you need to display the muxed subs is DirectVobSub.
Open explorer, search for the *.avi, double click on it, usually Windows media player starts and DirectVobSub starts in the background. If you want to select a different language, right-click on wmp or doubleclick on the Dvobsub symbol on the task bar. Also there is a very detailed Dvobsub configuration dialog.
Why the submux part of the guide is rather off topic? The subtitles are not hardencoded. So you can not simply load the *.avi as videosource and proceed. Well, it is possible. Start TMPGEnc, select option > enviromental
settings > VFAPI plugins. Disable all plugins except directshow multimedia file reader. Then load the *.avi as video source, audio and subtitles will be loaded as well. You can even change the subtitle languages after you started the conversion. Anyway, this is very experimental and not recommended. Use Submux and DirectVobSub to playback only.
Hope it helps.


Truman
Moderator


Joined: 19 Feb 2001
Location: Berlin, Germany

Post Posted: Jul 21, 2002 15:29 Posts Comp View users profile Send private message Reply with quote

@gtanime, the following is from the submux dokumentation:
!!!WARNING!!!
Submux will not be able to remultiplex the followings correctly:
- VBR mp3 audio ==> desynced output
- Nandub multiplexed mp3 using the "mp3 source" (mp3 without the wave header) ==> Submux will only output a few hundered KB long avi

If you want to use textsub, you have to install it. Have a look at the installation hints above.


israel
Member


Joined: 30 Jul 2002

Post Posted: Jul 31, 2002 12:05 Posts Comp View users profile Send private message Reply with quote

Hello people!!

I have a doubt here: I have a movie divided in 4 SVCDs, and I wanna add permanent subtitles to it. BUT, the .SUB file I have is only one, is there a way to divide this .SUB for fitting perfectly the four videos?

Thanks in advance!!


Truman
Moderator


Joined: 19 Feb 2001
Location: Berlin, Germany

Post Posted: Jul 31, 2002 12:13 Posts Comp View users profile Send private message Reply with quote

It should be possible, but you have to figure out which subtitle format it is. As mentioned above many tools use the *.sub extension. If you are unsure, open the file in notepad and post a couple of lines here.

bm2002
Member


Joined: 01 Aug 2002

Post Posted: Aug 01, 2002 04:32 Posts View users profile Send private message Reply with quote

Hi Truman !
I tryed to use vobsub with avisynth as u suggested in guide and got an error message : " VobSub not avisynth filter " ( or something like this )
What could the problem ?
THX for help
bm2002


Truman
Moderator


Joined: 19 Feb 2001
Location: Berlin, Germany

Post Posted: Aug 01, 2002 08:51 Posts Comp View users profile Send private message Reply with quote

That is an unusual error message. Which video application did you use (vdub, tmpg....)? Also please post the script.
Indeed Vobsub is not an Avisynth filter. It is an external plugin.


midnight artist
Member


Joined: 21 Aug 2002

Post Posted: Aug 21, 2002 13:14 Posts Comp View users profile Send private message Reply with quote

ok, i'm having problems frameserving...

i'm using scenario 1 with vdub and vobsub to retain the subtitles from a dvd...i couldn't figure out how to rip the subtitles to one of the other formats, but when i used the vobsub filter i just selected the .ifo format and it seemed to work...in my preview window i had the subtitles i needed...then i went to add these to the mpg file i'd made the original dvd into...but i went to file and start frameserving, the status window comes up but all the values remain at 0...help?


AmoK
Member


Joined: 21 Sep 2002

Post Posted: Sep 21, 2002 17:04 Posts View users profile Send private message Reply with quote

HEEEEELP.

When I want to add my subtitles with the above methods, using .ssa files with Virtual Dub+Filter, it works fine. But when i encode it with virtual dub or frameserver it, the subtitles are blurred and look like crap, can't read them anymore. I tried all the compression methods, it's no use. It worked with 2 compression methods without crapping my subtitles, but then my .avi got over 4 GB. And Frameserve doesn't work.

What to do????


jimA
Member


Joined: 23 Sep 2001
Location: Denmark

Post Posted: Oct 29, 2002 09:08 Posts View users profile Send private message Reply with quote

"if you are unsure which subtitle format you have, just open it with a text editor. "

And do what ?

{1218}{1270}Frste gang, du giver blod?
{1307}{1354}Ja
{1383}{1430}De betaler kontant her

the links to avisynth is incorrect. And it's now version 10b7d, with only 2 files (avisynth.dll and msvcr70.dll) no install.reg. So after i copy avisynth.dll to c:\winnt\system32 what do I do ?

thx
Jim