PDA

View Full Version : Question about NTSC to PAL in avisynth script..


Schultz
15th June 2002, 13:28
Allright i have been dealing with editing the avisynth script to add SSA subs via TextSub plugin for avisynth by editing it and adding the appropiate commands. During the the editin i am wondering when i put the TextSub command before the AssumeFPS command the subs are on time.. if i put it after the AssumeFPS then they progressivly get off time. since the video is now shorter from chaning the 23.97 to 25 fps. I am wanting to add the subs in the black border so i need to plave the subs after the Resize & Add borders command. But this is after the AssumeFPS command.. Is there anything wrong with moving the AssumeFPS command to after the frameResize and add borders? I don't belive it will effect it but i am just wanting to make sure.. thanks again..

chainsaw135
19th June 2002, 06:41
Well i dont use subs so i can't be 100% sure of my answer 2 you, but since no one else has answered you i would just say that is should not matter. Why not do a chapter and test it see if it does and get back with us on it.

Schultz
19th June 2002, 09:06
Yea a few days after i posted this i did some tests myself.. And in my testing i didn't notice speed drop or anything wrong with the final video so it does work on my tests.. And solves some problems with people having certain subtitles..

Clixo
19th June 2002, 11:06
i am doing this also for some time as you are shultz, i am using avis with 23.97 , and also the subs with 23.97 time code, i always set the subs after the assume comend so i get them in the right pace but the result is 100 % correct ! i get no delays nor front times ! ahe you checked if the subs are correctly displayed with bssplayer ?

Schultz
19th June 2002, 12:46
I was doing some tests for a friends.. I actually Had ripped a section from a dvd and converted the dvd subs to ssa script.. which is also time based.. Then used dvd2svcd to convert the dvd video over to a mpeg2 and adding the subs using the TextSub command.. I did it all three ways with the ssa
If i put the TextSub() command before the AssumeFPS it was timed correctly..
If i put it after the AddBorders and AssumeFPS it would graduly go off.. Since the # of frames wasn't change but just the framerate.. So you are playing hte same amount of video just faster (thats why i understand the time is off.)

So if i put the TextSub after the Addborders and moved the AssumeFPS after the textsub command.. it worked out correctly.. I was just checkin here about the AssumeFPS because generally dvd2svcd knows his stuff and i though he had a reason to put the AssumeFPS before the Resize and addborders command.. and i haven't tried with a avi but i don't think it would be any different. but you never know..

Clixo
19th June 2002, 13:07
this is a good working script

LoadPlugin("C:\PROGRA~1\DVD2SVCD\SIMPLE~1\SIMPLE~1.DLL")
LoadPlugin("C:\PROGRA~1\DVD2SVCD\MPEG2Dec\MPEG2D~1.DLL")
LoadPlugin("C:\PROGRA~1\DVD2SVCD\Avisynth\textsub.vdf")
AVISource("C:\AVI\THELOR~1.AVI")
AssumeFPS(25,1,true)
ConvertToYUY2()
SimpleResize(720,272)
AddBorders(0,104,0,104)
TextSub("c:\1.sub")
ResampleAudio(44100)

i dont use ssa scripts that might be the diference ?

Schultz
19th June 2002, 13:20
Well i am not fully sure why your subs that are framerate based work. but they do.. ;o) So thats a good thing.. I know ssa don't.. You might try just to confirm it if you would.. since SubResync will convert .sub to .ssa if you want.. or i could go the other direction.. But don't really have time to do that now.. but will report back if i find anything else..

Clixo
19th June 2002, 22:18
if i have time i will make some tests but now i am kind busy with other tests regarding 5.1 sound , but at leat next saturday i will report back to this

titvs
2nd July 2002, 03:21
Hi ppl.

I'm able to convert AVI files which are in NTSC to PAL with the subtitles in place. This is how I do it.
First, you need to undestand that there are 2 kinds of SUB files

MicroDVD, which is framerate dependent. The aspect is like this:

{2063}{2181}-Três fotógrafos, $250 cada um
{2186}{2242}Aceitas ou não?
(...)

And SubRip format (SUB or SRT extension) which are time dependent. They look like this:

1
00:01:25,000 --> 00:01:26,100
Oopsie.
(...)

I use the program SUB2SSA to convert the above files to SubStation Alfa and then i dont need to worry about framerates.
SUB2SSA asks you for the framerate if it is converting a MicroDVD file. I always select 25 and it adjusts the times correctly.
Keep also in mind that SubStation Alfa is a very powerfull subtitle editor. Thats why i use it very often.
After revising all the settings (margins, styles, etc.) and subtitles, I then start up DVD2SVCD with the AVI2SVCD module and edit the Avisynth file putting the TextSub statement after the AssumeFPS statement. Here is my last working script:

LoadPlugin("C:\DVD2SVCD\MPEG2Dec\mpeg2dec.dll")
LoadPlugin("c:\dvd2svcd\textsub.vdf")
AVISource("C:\DIVX_S~1\Roler00.avi")
ConvertToYUY2()
AssumeFPS(25,1,True)
BicubicResize(480,334,0,0.75)
AddBorders(0,121,0,121)
TextSub("c:\divx_svcd\rollerball.ssa")
ResampleAudio(44100)

Hope this helps for you guys because for me as helped a lot. No more multiplexed subtitle streams :p

Titvs

Schultz
2nd July 2002, 04:08
Originally posted by titvs
Hi ppl.

I'm able to convert AVI files which are in NTSC to PAL with the subtitles in place. This is how I do it.
First, you need to undestand that there are 2 kinds of SUB files

MicroDVD, which is framerate dependent. The aspect is like this:

{2063}{2181}-Três fotógrafos, $250 cada um
{2186}{2242}Aceitas ou não?
(...)

And SubRip format (SUB or SRT extension) which are time dependent. They look like this:

1
00:01:25,000 --> 00:01:26,100
Oopsie.
(...)

I use the program SUB2SSA to convert the above files to SubStation Alfa and then i dont need to worry about framerates.
SUB2SSA asks you for the framerate if it is converting a MicroDVD file. I always select 25 and it adjusts the times correctly.
Keep also in mind that SubStation Alfa is a very powerfull subtitle editor. Thats why i use it very often.
After revising all the settings (margins, styles, etc.) and subtitles, I then start up DVD2SVCD with the AVI2SVCD module and edit the Avisynth file putting the TextSub statement after the AssumeFPS statement. Here is my last working script:

LoadPlugin("C:\DVD2SVCD\MPEG2Dec\mpeg2dec.dll")
LoadPlugin("c:\dvd2svcd\textsub.vdf")
AVISource("C:\DIVX_S~1\Roler00.avi")
ConvertToYUY2()
AssumeFPS(25,1,True)
BicubicResize(480,334,0,0.75)
AddBorders(0,121,0,121)
TextSub("c:\divx_svcd\rollerball.ssa")
ResampleAudio(44100)

Hope this helps for you guys because for me as helped a lot. No more multiplexed subtitle streams :p

Titvs

Yes this does help and i think i have a full understanding of what is/was going on. And you get around this problem by doing the time change when saying its 25fps (your destination) if you used the fps of the same as your source avi. Then you would have to do what i did and move the AssumeFPS to after your AddBorders and TextSub statement to get the times correctly..

Clixo
6th July 2002, 09:39
i made some tests using ssa scripts to add subs but at the end no good results, so in the end frame based subs are my choice !

titvs
7th July 2002, 20:38
Clixomano

What was the problem? I've encoded a DivX with SSA with no problem. You must make sure you convert the framerate dependent SUB to 25 fps using SUB2SSA and choosing 25 when prompted.
If its best for you i'll post an explanation in portuguese ;)

See ya

Titvs

Clixo
8th July 2002, 12:19
@titvs: what i mean is that the final result of the subs for me ( only me) is not as good as the freame based ones, the rest is ok !. thaks for all the input titvs