Quantcast How to Mux Subtitles from SRT File into Final MPG? - digitalFAQ.com Forums [Archives]
  #1  
01-15-2004, 04:39 PM
andybno1 andybno1 is offline
Free Member
 
Join Date: Jul 2002
Location: Liverpool, UK
Posts: 832
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to andybno1 Send a message via Yahoo to andybno1
well I moved on from doin a kvcd to doin LOTR into a dvd, I;ve encoded movie and muxed it with ac3 file as a reg DVD but I got subtitles to be added to it as permanent subs where there is elvish language spoken, so how do I get them subs from a srt file to be showin up in the final mpg file I muxed??

also I've done lotr from 2 dvds to one dvd and where the first part finishes and second part starts the audio goes out of sync how can I fix it??
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
01-15-2004, 05:21 PM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
1. Did you try Vobsub via Avisynth? In case of your forced subs?

2. How did you merge (if you did that) the two sources? Maybe there already you did something wrong.

BTW: Doing the 2 DVDs of LOTRII on one DVD-R is a hard Job! Jellygoose did that and you should contact him as he did his experiences on that special case.
Reply With Quote
  #3  
01-15-2004, 05:27 PM
andybno1 andybno1 is offline
Free Member
 
Join Date: Jul 2002
Location: Liverpool, UK
Posts: 832
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to andybno1 Send a message via Yahoo to andybno1
well when I ripped I chose to do each disc as one whole vob file instead of havin about 16 vob files, then renamed the second vob file to coinside with the first one so when loaded in dvd2avi it would auto add the second vob file then I ran the d2v project file to produce the ac3 file, linked it in the avs script.

and as for the subs bit in the script u wouldn't by chance know what line to put in for vobsub??

I'll send a msg to jellygoose an ask him how he tackled that prob.

Thanx once again for helpin me oput with doin this complicated project
Reply With Quote
  #4  
01-15-2004, 05:45 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by andybno1
and as for the subs bit in the script u wouldn't by chance know what line to put in for vobsub??
You have first to open vobsub configure and load the IFO in it. It will create two files (a .idx and a .sub).
You can then open even of the in avisynth script by "Vobsub("xxx.sub")" or "vobsub("xxx.idx")". Use it exactly as you would have used a textsub line.
Reply With Quote
  #5  
01-15-2004, 06:07 PM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
Quote:
Originally Posted by andybno1
well when I ripped I chose to do each disc as one whole vob file instead of havin about 16 vob files, then renamed the second vob file to coinside with the first one so when loaded in dvd2avi it would auto add the second vob file then I ran the d2v project file to produce the ac3 file, linked it in the avs script.
Ouch!

Nope, thats not the way!

Please do rip both disks separately! so that you obtain 2 d2v files!
In that case I would first "decompress" both ac3 files as 48000khz WAVs (normally we wouldn't do that, but maintaining the 48000 will do avoid a bit the rounding errors).

After this treat your "splits" as followed:

Video=mpeg2source("First.d2v")++mpeg2source("Secon d.d2v")
Audio=Wavsource("First.wav")++wavsource("Second.wa v")
Audiodub(Video,Audio)

By doing this you can see/hear if everything will be in sync.

Also you can try ac3source instead of wavsource where the path will point to your both ac3s but I recognised that in Case of Audiodub() the reference of ac3source gives an error ("wrong arguments to ac3 source")
And thats why you should try the wav way (or Dialhot knows a solution) where again you should use Vdub to save the appended streams as ONE wav back to your HD which can be treated by Besweet/HeadAC3he in the known way.

@ Dialhot
Does there exist an appl. which "joins" correctly 2 AC3s ?
Reply With Quote
  #6  
01-15-2004, 06:12 PM
andybno1 andybno1 is offline
Free Member
 
Join Date: Jul 2002
Location: Liverpool, UK
Posts: 832
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to andybno1 Send a message via Yahoo to andybno1
well I'm gonna have to ask u to dumb that all down for me lol, I think I get what u mean u want me to first process both disc through as seperate d2v files but instead of demux u want me to chose decode and do a trst with wav files to see if they will be in sync after encode and muxin??

also I have this script:
Code:
##DLL Section ##
#
LoadPlugin("C:\Program Files\MovieStacker\Filters\MPEG2Dec3.dll")
LoadPlugin("C:\Program Files\MovieStacker\Filters\STMedianFilter.dll")
LoadPlugin("C:\Program Files\MovieStacker\Filters\asharp.dll")
LoadPlugin("C:\Program Files\MovieStacker\Filters\undot.dll")
LoadPlugin("C:\Program Files\MovieStacker\Filters\vsfilter.dll")
LoadPlugin("C:\Program Files\MovieStacker\Filters\blockbuster.dll")
#

##Defined Variables and Constants ##
#
MaxTreshold = 1.55 
scd_trigger = 30 #Scene change trigger value.
nf =  0 #Current frame.
#
####

Mpeg2Source("D:\LOTR-FOTR.d2v")

Undot()
Limiter()
asharp(1.5,4)

BilinearResize(720,576,0,0,720,576)
STMedianFilter(8, 32, 0, 0 )

MergeChroma(blur(1.55))
MergeLuma(blur(0.025))

##Dynamic Linear Adaptive Filtering and Scene Change Detection ##
#
#( Portions from AviSynth's manual )- This will apply temporalsoften to
#very static scenes, and apply variable blur on moving scenes.
#We also assign a variable - and this is why a line break is inserted:

ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf > 2.5 ? asharp( -(fmin((nf/30), 1)), 0 ): \
TemporalSoften(2,7,7,5,2)")

#
#Scene change detection ( kwag )- If a scene change is detected, we
#blur heavily.This affects the scene before and the one after the
#scene change, thus providing a softer transition for the encoder instead
#of a sharp "spike".
#If it's not a scene change, then we just blur dynamically, depending on
#the action.

ScriptClip("nf > scd_trigger ? asharp( -2,0): asharp(0,0)")

#
#
#
BlockBuster(method="noise", detail_min=1, detail_max=10, variance=0.6, seed=5823 )

Letterbox(0,0,14,14)
AddBorders(0, 32, 0, 32)#Depends on situation.Use MovieStacker!

Limiter()
VobSub("D:\LOTR_SEE_D1\VIDEO_TS\vts_01_0")

#
#
##Functions ###

function fmin(float f1, float f2){
  return (f1<f2)? f1 : f2
}
#
####
this is taken from jellygooses script when he done lotr to 1 99min cdr, of cause minus the bit u suggested to add in what can u see would need changin with this attempt is 2 dvds to dvd and not 2 dvds to 99min cdr in jellygooses attempt.
Reply With Quote
  #7  
01-15-2004, 07:42 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by incredible
Video=mpeg2source("First.d2v")++mpeg2source("Secon d.d2v")
Audio=Wavsource("First.wav")++wavsource("Second.wa v")
Audiodub(Video,Audio)
It's really not necessary to do that. You lose ac3 this way !
What he did works, don't bother with that.

Perhaps you don't know but you can merge two vobs simply by making a binary merge under dos (copy /b par1.vob + part2.vob final.vob) that works !
The same with ac3 files.

Quote:
@ Dialhot
Does there exist an appl. which "joins" correctly 2 AC3s ?
Lol. I typed what is above before reading this question
Reply With Quote
  #8  
01-16-2004, 03:50 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
And you're right as I was mistaken by thinking the KVCD way, where we do encode 2.0 CH
Reply With Quote
  #9  
01-16-2004, 04:40 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by andybno1
well I'm gonna have to ask u to dumb that all down for me lol, I think I get what u mean u want me to first process both disc through as seperate d2v files but instead of demux u want me to chose decode and do a trst with wav files to see if they will be in sync after encode and muxin??
As explained just above, Incredibla was mistaken KDCD for KCVD. Do not change what you did, it was the correct way.

Quote:
BilinearResize(720,576,0,0,720,576)
You definitely NOT need this line ! It does nothing.

But the problem there is that you do not discard the black borders that are in the picture. And I'm sure there are as the movie is 2.35:1. You must isolate the film area part of the picture and adjust the BilinearResize line to crop only this part (with the help of moviestacker). Or use GripFit to have all this done automatically.

Quote:
ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf > 2.5 ? asharp( -(fmin((nf/30), 1)), 0 ): \
TemporalSoften(2,7,7,5,2)")
You should upgrade to the last version of MA script. Results are better (far less "blurring" effect on action scenes).

Quote:
ScriptClip("nf > scd_trigger ? asharp( -2,0): asharp(0,0)")
WHOW ! You REALLY have to upgrade ! You have there the very first MA script and it changed a lot since this time ! I didn't even remember how it looked like

Quote:
Letterbox(0,0,14,14)
Always use borders that are divisible by 8 or better 16.

Quote:
AddBorders(0, 32, 0, 32)
You can't do that as you do ! Your picture is already 720*576 (see useless resize line above) and you ADD 32 pixels in top and bottom !
you are producing a 720*640 image
Remove this AddbBorders and put a "Letterbox(16,16,16,16) in the previous line.

Quote:
VobSub("D:\LOTR_SEE_D1\VIDEO_TS\vts_01_0")
I guess you have to put ".idx". or ".sub" at the end on the name. But perhaps it is not necessary.
Reply With Quote
  #10  
01-16-2004, 07:16 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
ok andy,

lets do our Workout in right resizing for dvdencoding.

I do prefer the following as it gives to me perfect outputs:

1. Do open DVD2AVI and load your VOBs

2. Choose under Video the resize/crop options

3. Now, just crop at top and bottom that much until all black borders are deleted but be shure to be in mod16 or mod 32 at height and width, this is signed in the upper bar of the preview like [x32][x16] or something like this.
4. Be shure you activated the checkbox in that resizing/cropping dialogue.

5. create your d2v project as known like doing the KVCD way (includes demuxing the AC3 tracks directly, that means NO audio decoding etc.!!

6. open that d2v in Moviestacker

7. choose under cropping "accurate" and "round to" 8!
8. choose under resize "round to" 16!
9. choose under destination "XVCD" as this gives you a 704x576 output = perfect DVD conform and provides a bit more compression
10. Choose in case of 2.35:1 Movies "overlap" Overscan = 2 and in case of 1.85:1 movies "resized" Overscan = 2
11. Switch to the "Avisynth" Tab above of Moviestacker and choose at Alignment "Macroblock aligned"!
12. Get back to Moviestackers resizing options and now you decide if your output still should be anamorph (= better quality at 16:9 TV sets but less compressionability) or not anamorph (= still good quality but even more compression), IF you decide to encode still anamorph: Do choose Overscan NOT 2 but 1

13. Now safe the Avisynth script in moviestacker.

14. Open your just safed xxxx.avs in VdubMod or Zoomplayer (I prefer Vdubmod)
15. Watch under "File Information" the size, is it 704x576?
16. Check the Preview in VdubMod is it ok? Black borders added? If you did choose in MovieSt. anamorph dstination everything should look squeezed the right way and if you did not check the anamorph button in MovieSt. everything should appear well proportional etc.

17. You can do a very accurate final test in VdubMod now by entering the Video FIlter Section and do apply the "resize" filter ... and type in 768x576, In case of anamorph destination in Moviest. unchecked, now everything should look perfect. If you did check anamorph destinantion do enter 1024x576 and NOT 768x576 cause thats the size the anamorph image will be risized on 16:9 TV sets.

This all lets you be shure that everything was done right in Moviest.

Now you can delete the Video-filter settings in VdubMod and enter right above the script editor where you easily can enter the avs code to apply your filters, routines etc. .... after applying you can just hit "F5" and you'll directly see what happens when doing in the AVS script editor. And it also gots a spell/syntax checking, so thats the way I do work, but you also can do the FFdShow way as done by Dialhot to see what happens when modifying the script.

Edit: you don`t need to resize in the Videofilter section of VdubMod, you can just enter the script editor and here also doing that "real world-resizing preview" by applying at the very end of the script a

simpleresize(768,576) # in case of NON-Anamorph output in Moviest. set

or

simplereize (1024,576) # in case of Anamorph output in Moviest. checked

but do not forget to delete that line afterwards!
Cause finally we want to keep encoding at 704x576!

768x576 is just the 1:1 preview which simulates the square pixel size of your PAL TV set (as you come from Liverpool you use PAL, right?)
704x576 or 720x576 are the right full size DVD encoding resolutions at quadra pixels which will be stretched to that mentioned square pixels on TV afterwards.

Q: "Hey Inc., why not doing that just via the simple GripFit way???"

A: "Cause I don't trust Gripfits autom. Border detection especially in case when adding asharp in the cript afterwards .... once shown in a sample by Audioslave and also many times happend to me personally "
Reply With Quote
  #11  
01-17-2004, 04:59 AM
andybno1 andybno1 is offline
Free Member
 
Join Date: Jul 2002
Location: Liverpool, UK
Posts: 832
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to andybno1 Send a message via Yahoo to andybno1
Dialhot - I only used that script cause jellygoose used it for his go at this to a 99min cdr thought I could be cheeky and use his script

incredible - I'll get back to u about what u posted I have limited access to net at min so may be a day ir two before I post again.
Reply With Quote
  #12  
01-17-2004, 08:30 AM
andybno1 andybno1 is offline
Free Member
 
Join Date: Jul 2002
Location: Liverpool, UK
Posts: 832
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to andybno1 Send a message via Yahoo to andybno1
well I tried previewin in vdub and got this. hmmm I seem to be missing a codec on my computer.
Reply With Quote
  #13  
01-17-2004, 10:37 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
That is already many times treated in here, so look for Dialhots YV12 codec advices. I gut just a Xvid Codec onboard which does it all for me.
Reply With Quote
  #14  
01-17-2004, 01:46 PM
andybno1 andybno1 is offline
Free Member
 
Join Date: Jul 2002
Location: Liverpool, UK
Posts: 832
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to andybno1 Send a message via Yahoo to andybno1
how strange I have a xvid codec installed on my computer not sure if its the right one or not have a look on my cpmputer profile link and tell me if its the right one thanx.

EDIT: I just checked I have koepi's build of xvid if that makes any sense to anyone
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
KVCD: How to add subs? password Video Encoding and Conversion 12 09-26-2004 07:23 AM
KVCD: what is the final encoded file size? jiMii Video Encoding and Conversion 5 07-17-2003 06:34 AM
How to add subs to your movie ErikVdS Video Encoding and Conversion 12 02-22-2003 01:49 PM
KVCD final mpeg file size too big to burn? tboeken Authoring VCD, DVD, Blu-ray 2 06-15-2002 06:41 AM
KVCD: Calculator for TMPGEnc, it gives the size of final mpeg file syk2c11 Video Encoding and Conversion 1 06-07-2002 09:11 AM

Thread Tools



 
All times are GMT -5. The time now is 01:17 PM  —  vBulletin © Jelsoft Enterprises Ltd