I've been trying to convert some PAL 25fps interlaced footage (544x576 DVB-S) into NTSC 29.97fps (720x480 DVD) to watch on an interlaced tv.
I followed Xesdeeni's example and used Smoothdeinterlace to make it progressive, then expanded number of frames to 59.94 and plucked out every other to get 29.97 fps. This gave good results, but I felt I was loosing a lot of action in the deinterlacing step.
So I tried some avisynth scripts to preserve as many interlaced fields as possible and construct 1 frame per 5 to boost numbers to NTSC standards (well 30fps actually, then assumefps(29.97)).
The crux of the problem is that the constructed frame is made up of a repeat of it's 2 surrounding fields, and that these repeated fields are therefore of the wrong field type.
So I changed the field type of the surrounding fields using BOB, so that the constructed frame had fields in the right order and of the right type.
The results are good, the picture is sharp and the action is smooth, but due to the constructed frame being 2 imperfect transformed fields, there is a slight inconsistency 5 times a second. This is unnoticable in the body of the screen, but the dog in the top right and any on-screen graphics pulse at 5hz which is annoying, and I'd like to get rid of if possible.
So my question is, what is a better method than BOB to change the type of a field? i.e. top to bottom and bottom to top.
Or do I just deinterlace the whole thing? cheers for any advice.
My avisynth script is:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mpeg2dec3.dll")
mpeg2source("c:\palinterlaced.d2v",iDCT=2,CPU=4,iP P=true)
AssumeFramebased()
AssumeTff()
norm = SeparateFields() #2x frames
bobbed = Bob() #creates clip of bobbed video, 2x frames
norm1 = LanczosResize(norm,720,240)
bobbed1 = LanczosResize(bobbed,720,240)
Interleave(norm1,bobbed1) #4x frames
# clip structure is now: t=top field, b=bottom field, B=bobbed field
# 1t 1tB 1b 1bB 2t 2tB 2b 2bB 3t 3tB 3b 3bB 4t 4tB 4b 4bB 5t 5tB 5b 5bB
SelectEvery(20,0,2,4,6,8,10,11,13,12,14,16,18 ) # pick out 12 frames for every 20
# 1t 1b 2t 2b 3t 3b 3bB 4tB 4t 4b 5t 5b : 5 frames now 6
AssumeTff()
Weave()
AssumeFps(29.97)
+ Reply to Thread
Results 1 to 14 of 14
-
-
I have a much better suggeston IMO.
instead of converting the fps to 59.97, merely slow down the video to 23.976 fps. This will not add any dplicate frames.
use besweet to convert your wav file fom pal to ntsc as well (it has a snazzy preset to do this, the besweet gui) it ill slow down the audio 4 and raise the pitch 4% for you.
Encode and apply pulldown on your mpeg 2 video file. mux and you are good to go. -
Using pulldown to go from 24 fps to 30fps is a great PAL2NTSC method if you have Film or a Progressive source, as both fields of a frame show the same snapshot of time, just different lines of that shot.
1t 1b , 2t 2b , 3t 3b , 4t 4b , 5t 5b = 10 becomes after 2:3 pulldown...
1t 1b , 2t 2b , 2t 3b , 3t 4b , 4t 4b , 5t 5b = 12
Notice that going from field 4 to 5 (2b 2t) is ok with a progressive source as they were taken at exactly the same time, and objects haven't moved.
However, I'm converting a true Interlaced source from a satellite broadcast where each field shows an independent snapshot of time every 1/50th second ( you could think of it as 50 fps). This means that you can't just repeat the top field of the previous frame as it would go back in time, i.e. in [2t 2b 2t], the last field 2t is in the wrong chronological order as it was shot before 2b. This also makes steps [3b 3t] [4b 4t] in reverse and steps [2t 3b] [3t 4b] skip 2 fields or 3/50sec instead of 1/50sec.
This is why Xesdeeni suggests making the whole clip deinterlaced first, so that both fields of a frame are effectively of the same moment in time, making field order interchangable. Problem with this is that you loose information in deinterlacing. So I just thought it might be nice to preserve as many interlaced fields as possible and then construct 2 fields every 10 that are of the same time, but opposite field type (t->b, b->t).
Problem with that is that it is difficult to change field type properly, and any differences in clarity are noticable to the eye. I.e. 5 frames perfect followed 1 frame blurred/bobbed/not perfect looks worse than all frames consistently deinterlaced (not perfect).
Another problem is that the constructed frame introduces a slight pause every 6 frames as the replicated fields are consecutive (2 in 10). If there was a perfect field transform, you could then separate the repeat fields to 1 in 5 for a smoother conversion, with half of all fields transformed. -
if you deinterlaced(you said you did) then lsowing down to 23.976 and adding pulldown will work marvelously. (And I reiterate, this metho will not cause ANY duplicate frames, and it will be smooooth!
-
dumhez method works for me
Rather than encoding for progressive, I record as if interlaced, and voila...Since my output is for T.V. mixing and matching of previous frames is of no concern, so long as my field outputs are t,b,t,b,t,b,....
I do notice combing artifacts with fast motion, and for me, a field deinterlace from the "Decomb" package works just fine. -
yes, I know that method works very well for progressive conversions.
The footage comes off the satellite INTERLACED and is of a waterpolo match where a bright yellow ball moves very fast across a blue splashy background. This looks very bad when deinterlaced.
I don't want to deinterlace.
I want to convert from 50 to 60 independent interlaced fields per second.
Interlaced DVDs look better than deinterlaced DVDs on an interlaced tv.
It's a completey different conversion to "INTERLACED PAL 25 frames 50 independent fields per second to PROGRESSIVE NTSC 30 frames 25 independent fields per second".
Thanks for your suggestions, any ideas on how to do this? -
Originally Posted by haamsuplo
I have a much much better way of doint this, pay close attention, it will accomplish exactly what you need.
using avisynth, separate your fields so it plays one field, than another. (somehting like separatefields() next in the script, resize it for NTSC. (This way each field will resize separately, not blended) Then recombine then unseparated fields back into an interlaced movie. Since each field was resized based on itself, it should be perfect. Apply the time shifting and you will havethe best source that is possible. You will need to read the avisynth FAQ and script syntax to get it all straight.
others may want to suggest a good resizer in avisynth. gordion knot defaults to lanczosresize, so this is the resize method I use. I tried bicubicresize and bilinearresize and all three look great to me. So I figured if the gordion knot author9s) makes lanczosresize the defualt, then that's the one I will use.\ for my resizing needs.
Once all is done you merely need to determine the field order so your encoder will process it correctly. If you are not sure how to determine field order, I have a really handy method to figure it out. (I read it i a post here but the method I have saved on a text file at home. Let me know if you need it and i will post the instructions. -
Ah yes dumhez..Is this perhaps why I get combing with fast scenes?? Does it have to do with my placement of resizing?? Perhaps, then, I don't need to bother with FieldDeinterlace() anymore
Typical script of 25fps interlaced to 23.976fps interlaced:
avisource("f:\movie.avi")
trim(0,125828)
AssumeFPS(23.976,true)
Crop(8,8,-8,-8)
BicubicResize(352,480)
fielddeinterlace(dthreshold=10)
ResampleAudio(48000)
So what you're saying, is try a separate fields().resize().weave()
BTW, haamsuplo, we do know what you're trying to accomplish, but this way is foolproof, since your source is interlaced, and your target wants to be interlaced..Depending on your encoder settings, they too should be set for interlaced, rather than progressive. What encoder are you using, and what settings praytell???
I followed Xesdeeni's example and used Smoothdeinterlace to make it progressive, then expanded number of frames to 59.94 and plucked out every other to get 29.97 fps. This gave good results, but I felt I was loosing a lot of action in the deinterlacing step.
Give it a try... -
[quote="pijetro"]Ah yes dumhez..Is this perhaps why I get combing with fast scenes?? Does it have to do with my placement of resizing?? Perhaps, then, I don't need to bother with FieldDeinterlace() anymore
So what you're saying, is try a separate fields().resize().weave()
YES!
this is the surefirest, best way to process the video! no dirty deinterlacing! No smudging, no blurring! And during transitions, where scenes merge together, this method will leave them intact and clear as they are meant to be! Each field gets resized on its own, then weaved back together!
(Can you tell I am excited about this method? It's because I read about separate filelds and such, but have not, until this thread, thought of a REALLY GREAT USE for it.)
(After you separate the fields, resize to (360,240), weave them back in, THEN and only then, Assumefps(23.976)
Check the exact syntax of course, while I am 100% sure this is correct method, I have not actually DONE it before, my pal>ntsc conversion was avi source @ 25 fps, and was progressive.
Then determine field order (one dude on the board sugested that almost always is top field first, but best to actually test the field order to be sure, after all this work dont want a non smooth movie!)
Cheers. -
Do determine the correct field order, evry time:
(Props to the poster who originally posted this info on this board, whoever you are!)
(This may not make sense to you but this is important info for recording
interlaced content for DVD.)
Selecting the correct field order:
Fire up tmpgenc then do this.
Press the "Settings" button and go to the "Advanced" tab. Under the "Field
order" setting, pick "Top field first (field A)". Highlight the
"DeInterlace" option in the list and double click it to open the DeInterlace
dialog. Select the "Even-Odd field (field)" Method. Left-Click on the video
area and then using the keyboard arrows move to the right to frame-advance
the video. If the motion is smooth, then the field order is correct, if it's
all jumpy then exit the DeInterlace dialog, switch the Field order to
"Bottom field first (field B)", re-enter the DeInterlace dialog and check
that now the movement is smooth. When the correct field order is selected,
make sure that the DeInterlace option is checked OFF! We only use it to
check the field order, it must not be enabled for the final encoding. -
Another way is third post down. https://www.videohelp.com/forum/viewtopic.php?t=191965&highlight=
Can you provide me a link with resize, reweave info.?? It'll be good to know for my next PAL to NTSC conversion...
Since the capture is 352x576, then how should the separatefields(), resize() syntax go?? -
Here ya go!
avisource("movie.avi").separatefields().lanczosres ize(720,240).weave().assumefps(23.976)
This will separate the fields and double the framerate and half the vertical res, resize, and weave back together, then set the framerate to 23.976 all ready for 3:2. It is critical the assumefps is the last step. Then load the file in tmpgenc and determine the field order from my previous post. (Separatefield and weave both assume bottom field is first by default)
Of note: You can also do the audio in this one step too which is nice. It will do the time shift and pitch shift for you. Try this for the syntax(I just read this at avisynth.org ive not tested it, not sure if syntax is correct)
avisource("movie.avi").separatefields().lanczosres ize(352,240).weave().assumefps(23.976, sync_audio=true)
(sync audio is false by default.
To add to this: If you are going to sync audio, you ust make sure the audio and video length are exactly the same, otherwise you MUST use the besweet method.
The syntax is hard to tell from the page I am reading. Here it is so you can check it out.
http://www.avisynth.org/index.php?page=FPS -
GREAT
I'm looking forward to using this..
As for the audio, I've noticed the samplerate goes down to 47000hz,or so to match the TRUE statement.
As an additive step, I open up the .AVS script in Cool Edit, and save as a separate .wav. Vdub will do the same.
Then I Besweet the .wav to an .AC3. This way, audio is in synch, and it becomes legal DVD samplerate. Works like a charm everytime ...
Good stuff, thanx dumhez...
Similar Threads
-
Convert 24p .mov to interlaced 25fps PAL
By Cotswold in forum Video ConversionReplies: 6Last Post: 25th Mar 2012, 15:50 -
how to slow down interlaced Ntsc recording of Pal ?
By spiritgumm in forum Video ConversionReplies: 20Last Post: 11th Oct 2010, 19:59 -
Converting DV to H.264 and comparing interlaced/de-interlaced
By amirh1 in forum Video ConversionReplies: 5Last Post: 23rd Jun 2010, 09:16 -
Converting 30fps Progressive to 25fps interlaced ? (Avisynth & VDub)
By blewyn in forum Video ConversionReplies: 6Last Post: 12th Jun 2008, 17:51 -
30FPS Progressive to PAL Interlaced? (DSC MJPEG AVI to DVD)
By ezekiel42 in forum Video ConversionReplies: 7Last Post: 8th Jul 2007, 22:53