PDA

View Full Version : 29.970p to 25 fps conversion


Skloten
30th October 2003, 14:21
I've read a lot of threads about conversions. But i'm a little bit confused what i should use now.
My material is 29.970 fps, Progressive, 99% film.


What i already did is:
1) use dvd2avi and select forced film.
2) make avisynth script.


(Assuming i want it 25 fps)
Should i use this script:


LoadPlugin("SmoothDeinterlacer.dll")
AVISource("NTSC-Source.avi")
SeparateFields()
Weave()
SmoothDeinterlace(doublerate=true,lacethresh=1,staticthresh=20)
LanczosResize(720,576)
ChangeFPS(50)
SeparateFields()
SelectEvery(4,1,2)Weave()
ConvertToRGB()


Or am i totaly wrong and mixing things up.
Who can clear this one out.

Mole
30th October 2003, 15:28
Simplest and best result (picture wise) would be:

1. Use force film in DVD2AVI. (You'll get 23.976 fps progressive)

2. Don't use any deinterlace filters at all, but put AssumeFPS(25) at the end of the script.

3. Use Besweet or any other sound editor and load the WAV audio and resample the audio so it'll have the same lenght of the video. The audio will run a tiny bit faster, but it's not really noticeable.
The video and movement on the other hand will be perfectly smooth.

Skloten
30th October 2003, 16:26
Ok, thanks.

The script that i put above, is that for interlaced material ??

And (maybe wrong section) but what to do with the subtitles.

Mole
30th October 2003, 16:50
Yes, that would be for interlaced material.

Subs, you'll have to go at the end of the movie and watch how many seconds the subs lags. For instance, if somebody says something, try to measure how many seconds before the subs show up. Use SubRip time correction function and in the time strech box, tick minus and the amount of time.

scharfis_brain
30th October 2003, 17:15
If no speedup is wanted, you may want to use this script to convert your Film from NTSC to PAL:
xxxsource("video.xxx")
changefps(50)
separatefields()
selectevery(4,0,3)
lanczosresize(720,288)
weave()

with this script, you can reuse the audio without reencoding, but the downside is, that you have to encode interlaced, because the fieldorder is swapping twice per second. But this won't be noticable on TV.

ppera2
30th October 2003, 17:28
Originally posted by scharfis_brain
If no speedup is wanted, you may want to use this script to convert your Film from NTSC to PAL:
xxxsource("video.xxx")
changefps(50)
separatefields()
selectevery(4,0,3)
lanczosresize(720,288)
weave()...


And what about smooth movement? This script will give pretty bad movement, and interlace from telecine will be there still.
Depending on source type, different script is required - one for 100% interlaced, one for telecined and one for progressive NTSC (what in fact should be deinterlaced NTSC video, and isn't typical on DVD's).

scharfis_brain
30th October 2003, 17:34
I assumed 23.976 fps progressive input video.
with this condition, the 24 -> 25 fps conversion gives smooth motion. the two fieldrepeats per second are hardly noticalble (you'll need a looooooong pan and a good eye to detect them on TV)

Skloten
30th October 2003, 17:37
Thanks for all replying.

But i stick to Mole's one, seems to get better quality from the encoding.
But the subs seems to get a problem.
Because i don't think you can get it 100% accurate by guessing how many secs the sub is off.
Can't i change it by 4% slowing down

Skloten
30th October 2003, 17:39
@ scharfis_brain

When i use your script, you won't need to change the subtitles also ??

scharfis_brain
30th October 2003, 17:44
(I am not familar with subtitles, but I try to answer:)

you don't have to change the speed of anything with my script nor audio neither subtitles. But I don't know how to resize subs (480 to 576 lines)

Skloten
30th October 2003, 17:47
Resizing ain't so difficult, just resize the picture with your favorite program.

Skloten
30th October 2003, 18:08
@ ppera2


What scripts do you use for:

1) 100% interlaced
2) telecined
3) progressive NTSC (deinterlaced NTSC video)

scharfis_brain
30th October 2003, 18:18
I am not ppera2, but I'll answer :p

1) the script, you've posted
2) mole's or my script
3) your script without deinterlacer.

Skloten
30th October 2003, 18:45
But for nr. 3) you also use mole's script ?

Because my material is progressive.

scharfis_brain
30th October 2003, 18:58
for 3), you have to use the script used in 1) but without the deinterlacer.

Mole
30th October 2003, 19:00
With the subs, you will actually get 100% accuracy. I've done it myself on several movies.

Just time it with one of the last sub lines in the movie and shrink the time so it'll be in sync at the end. It'll match perfectly in the middle of the movie as well.

In fact, this has even worked on subs I've downloaded from sites, which obviously was from different source than my movie, but after fixing the times this way, it matched perfect throughout the movie.

Skloten
30th October 2003, 19:03
Confused again ...


My material is 29.970 fps, Progressive, 99% film

You came with the script for nr. 2 witch is telecined.
Is my material telecined ?

And when i should use nr. 3, what would my script look like.
nr.1 without deinterlaced

Mole
30th October 2003, 19:05
On a second thought, "if" the source is a movie with AC3 sound and all that, it'd be better to scharfis_brain's script because you won't have to touch the audio or subs at all.

It would be too much hassle to have to both do the video and audio, when you can just fix the video and nothing else.

You can then simply mux the AC3 audio and the old subs right into the other DVD.

Skloten
30th October 2003, 19:10
Oke Mole, if i should use nr. 2 (telecined), with your script. I will try this one out.

But when i've got to check the movie with last sub, should i reauther the movie with the subs first. Are can i use a program for this ?

scharfis_brain
30th October 2003, 19:17
@skloten:
99% Film = 23.976 fps
but those 23.976 fps are packaged into 29.97 fps for TV-compatibilty.

to recover the 23.976 fps there are 2 possibilities:
- mole's: 1. Use force film in DVD2AVI. (You'll get 23.976 fps progressive)
- or within avisynth, using the decomb.dll
telecide().decimate(5)


btw., if using my script, be sure having ENOUGH bitrate, because the video gets reinterlaced.
And make sure encoding interlaced.

(if the video looks very jerky on TV, after encoding, you have to reverse the fieldorder (BFF <-> TFF)

Mole
30th October 2003, 19:23
This area, I have no idea. I have only fixed subs in TXT format. I believe you'll have to convert the sub to a grapic format for authoring programs.

SubRip do support exporting to grapic format for authoring programs, but I've never done it and don't know if it'll work or not.

The only thing I can confirm is that the subs will be sync througout the movie, that's all.

ppera2
30th October 2003, 19:45
Originally posted by Skloten
@ ppera2

What scripts do you use for:

1) 100% interlaced
2) telecined
3) progressive NTSC (deinterlaced NTSC video)


1: NTSC Interlaced to PAL progressive:

Ver. A:

function convert60ito24p (clip video, int mode, int offset)
{
work = assumefieldbased(video)

out = (mode==2) ? interleave(
\selectevery(
\layer(trim(work, 1, 0),
\layer(work, trim(work, 2, 0), "fast"),
\"fast"), 5, 0 + offset),
\selectevery(
\layer(work, trim(work, 1, 0), "fast"), 5, 3 + offset)) :

\ (mode==1) ? interleave(
\selectevery(trim(work, 1, 0), 5, 0 + offset),
\selectevery(layer(work, trim(work, 1, 0), "fast"), 5, 3 + offset)) :

\ (mode==0) ? selectevery(work, 5, 1 + offset, 4 + offset) : work

assumeframebased(out)
}



LoadPlugin("F:\mpeg2dec3.dll")
LoadPlugin("F:\SmoothDeinterlacer.dll")

mpeg2source("E:\NTSCvid.d2v")
#Crop(8,0,704,480)
ConvertToYUY2()
SmoothDeinterlace(doublerate=true)
Convert60ito24p(2,0)
AssumeFps(25)

This is by post 'Poor man's 24 fps...' It gives actually 24 fps, and is speed up with assumeFps(25) to 25 fps - but movement is really good smooth.

You need to timestrech audio by factor 23.976/25=0.95904. Also to timestrech subtitle by same factor - you can do it with subadjust or many other programm.

Ver. B:

LoadPlugin("F:\MPEG2DEC.DLL")
mpeg2source("E:\Rah.d2v")
LoadPlugin("F:\SmoothDeinterlacer.dll")
SmoothDeinterlace(tff=true, doublerate=true)
ConvertFPS(50)
selectevery(2,0)# add this line to achieve 25 fps.


This is how your script should look, no need for any separate fields etc. before smoothdeinterlace - this gives also good movement, and is little faster than Ver A.

Ver. C:
LoadPlugin("F:\MPEG2DEC.DLL")
mpeg2source("H:\Rep.d2v")
LoadPlugin("F:\SmoothDeinterlacer.dll")
SmoothDeinterlace(doublerate=true)
ConvertFPS(25,zone=100) # experiment with zone values...

2: Telecined to PAL progressive

Always try Force Film in DVD2AVI. If this work not well, you need IVTC plugin

LoadPlugin("F:\WinUtils\AVISynth\Decomb.dll")
mpeg2source("E:\Ins.d2v")
Telecide(post=false) #post=true for not clean source
Decimate(cycle=5)

Here is timestretch needed too, same as described by Ver. A for interlaced.

3: Progressive NTSC (29.97 fps)
- I never had such source, and you will have not too, very likely. Such material is not used on DVD's, broadcasting etc.

Conversion should work field based if target is TV, so it will give better movement (and interlace), I think that there are some script for it.
If target is monitor of PC, something like:

ConvertFps(25)...

What type subtitles you have - text (ASCII) based or VubSub picture based?

ppera2
30th October 2003, 20:08
Originally posted by Skloten
Confused again ...
My material is 29.970 fps, Progressive, 99% film


Yes, you are really confused :)
No such material - it is actually 29.97 fps telecined video. You may recognize it by following pattern (sequence): 3 progressive (noninterlaced), then 2 interlaced frame.

But, when you use Force Film on such video, you will get 23.976 fps progressive video - same stays for IVTC with some AVISynth plugin.

Skloten
30th October 2003, 21:31
I used your method 2: Telecined to PAL progressive
With this script:

LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\Decomb.dll")
mpeg2source("D:\test.d2v")
BilinearResize(720,576,0,8,720,464)
Telecide(post=false)
Decimate(cycle=5)
ResampleAudio(44100)


But i'm getting error messages:
"Frame rate 11988/625 is not supported. Supported frame rate are ..."

What am i doing wrong

ppera2
30th October 2003, 21:43
Which version of decomb you use?

Skloten
30th October 2003, 21:51
Don't know, how can i find out ?

ppera2
30th October 2003, 22:14
Originally posted by Skloten
Don't know, how can i find out ?

Read manual (this is very useful if nothing other can't help :) )

And when you are in manual, check syntax for inverse telecine - it can vary in different versions of Decomb.

scharfis_brain
30th October 2003, 22:17
"Frame rate 11988/625 is not supported.
11988/625 = 19.2 fps!

this indicates, that you are trying to decimate an already progressive 23.976fps Video!.

just remove telecide and decimate and replace them with a method to get 25fps, like:
1) assumefps(25)
2) or the other method mentioned by me.

Skloten
30th October 2003, 22:24
I just downloaded 'decomb500b16.dll', and tried this one.

But now i get this message:
"Framesize 722*56 is not supported"

scharfis_brain
30th October 2003, 22:36
the new decomb-package uses other parameter, than the old one, thus it is generating an error-message-video with the framesize of 722x56.

But what do you do with decomb, when I've said it is useless in this case?!?

Mole
31st October 2003, 01:36
You don't need decomb if you successfully manage to get progressive by using forcefilm in DVD2AVI.

Either you use forcefilm or decomb. NOT both of them!

Skloten
31st October 2003, 02:32
Ok, thanks for clearing this one out.

I'll use mole's script first.
Will try scharfis_brain script later, seems to get better result with mole's script.
I did a little test, but didn't went ok.

Mole
31st October 2003, 02:42
Umm.. I get uncomfortable everytime I see "mole's script".
All I really wrote was to put AssumeFPS(25) at the end. ;)

What ppera2 posted however, that's what I call a real script...

ppera2
31st October 2003, 11:39
Originally posted by Mole
Umm.. I get uncomfortable everytime I see "mole's script".
All I really wrote was to put AssumeFPS(25) at the end. ;)
What ppera2 posted however, that's what I call a real script...

First script is actually by scharfis_brain :)

Quick note: this thread isllustrates very well how it goes usually when someone without experience starts so complicated thing. Confusion is almost inevitable :D

Skloten
31st October 2003, 23:25
I normaly only work with pal movies, just work with ntsc lately. :scared:


@ mole

Just called it a name, not particular your script. Just to explain it simple.


@ ppera2

What do you mean with:

This is how your script should look, no need for any separate fields etc. before smoothdeinterlace - this gives also good movement, and is little faster than Ver A.

Do you mean version B or C from nr. 1


And my subtitles are vobsub based.

Or should i make a text version first and than make a picture based version after. Maybe that's easier for the timeshift and you have your subpictures at good size.

Skloten
31st October 2003, 23:44
@ scharfis_brain

When i use your script, i shouldn't use forced film in dvd2avi or not ?

ppera2
1st November 2003, 00:16
Originally posted by Skloten
@ ppera2
What do you mean with:
This is how your script should look, no need for any separate fields etc. before smoothdeinterlace - this gives also good movement, and is little faster than Ver A.
Do you mean version B or C from nr. 1
And my subtitles are vobsub based.
Or should i make a text version first and than make a picture based version after. Maybe that's easier for the timeshift and you have your subpictures at good size.

It stays in any case - smoothdeinterlace performs all required field operations.
There is more software tool for manipulate with textbased subs, and it's much more flexible - you can select font face, size, color etc...

ronnylov
3rd November 2003, 14:29
Regarding the audio speed you can let avisynth take care of it by using

assumefps(25,true)

but this will change the audio sample rate so you can either use an external resampler or adding one of following lines after assumefps

Resampleaudio(44100) # for SVCD

or

Resampleaudio(48000) # for DVD.