I have an AVI file which I want to convert to SVCD. VirtualDub says it is 720x576, 25.000 fps. When I load it into TMPGEnc, it identifies the avi as being interlaced, and determines that the field order is bottom field first.
The resulting mpeg2, as well as the original avi, is "jerky"...especially noticeable when the camera pans.
I inspected the original avi closer in VirtualDub. By focusing on a single point in a scene where the camera was panning, I noticed that the point moves a larger amount every fifth frame - this is surely the source of the jerkiness.
Since this is something that happens every fifth frame, I'm thinking it has something to do with pulldown and/or interlacing.
I did some searching, and I am thinking that using AVISynth - DoubleWeave followed by Pulldown is what I should try. What confuses me is that this video is PAL, not NTSC. Also, I've never used AVISynth or any frameserver before.
Does anyone have some advice, or has seen this problem before?
+ Reply to Thread
Results 1 to 11 of 11
-
-
Easy to fix. Reverse your fields in TMPGenc.
Some capture cards grab video from TOP A FIELD FIRST (although true broadcast interlaced is BOTTOM B FIELD FIRST).
It should be fine now after transcode/reencode.I'm not online anymore. Ask BALDRICK, LORDSMURF or SATSTORM for help. PM's are ignored. -
I tried the reverse fields filter in VirtualDub. The jerk is still there in the resulting avi.
-
The problem is probably due to a bad/fudged conversion from PAL to NTSC or from NTSC to PAL. Look at each frame in VirtualDub. You'll probably notice that 1 out of five frames is a duplicate (PAL to NTSC). I had this happen in a few I've downloaded. The fix is to remove the duplicate frame, and then do a proper conversion from 23.976, to 24fps. (If your source is 25fps, skip this and go straight to the last paragraph, unless you want the gory details, there is no easy fix for yours)
Note: the following is for a bunged PAL to NTSC (25 to 29.97fps) conversion. I used AVISynth to fix mine. Open the AVI in virtualdub. and manually step through each frame, one at a time, counting as you go. When you get to the repeat frame (basically, two clicks with no motion), note the number. It should have a repeating pattern of 5. For example, 5 frames, starting on number 0:
0,1,repeat,3,4
0,1,repeat,3,4
or put another way:
0,1,repeat,3,4,5,6,repeat,7,8,9,10,repeat,11,12 (not, the same repeating pattern of 5 frames)
The repeater could be in any position in those five frames. Manually verify which frame number it is. Assuming it's like my example above (it probably isn't, but go with me here..). Use AVISynth, and the SelectEvery command to remove the duplicate frame.
AVISource("c:\folder\movie.avi")
SelectEvery(clip,0,1,3,4)
The above command would keep frame 0, 1, 3, and 4. It would discard the dupilcate 2nd frame. The output will be somewhere around 23.97, or 24fps. You then use the AssumeFPS command to slow down or speed up your video (speed up in your case) your video
AssumeFPS(25, True)
The 25 variable is the target framerate. The TRUE option tells AVISynth to sync the audio to the new framerate. This method is lossless, as no frames are dropped or duplicated to reach the target framerate. This is the proper method to convert from 23.976, to 25fps, and vice versa.
Open your .AVS script in VirtualDub if you want to verify the framerate, BEFORE adding the AssumeFPS command. It should drop your framerate by about 1 frame per second, to somewhere around 24fps. The AssumeFPS command will make it 25fps no matter what your input is, so check it before you add that command to your script.
If your source is PAL, then look for a pattern of 1 frame or 'jump' in every 5. If that's the case, then they make have simply chopped 1 frame in 5 to get to 25fps. If this is the case, then they've punched holes in your video, and there's no way to get them back. I suppose you could try some blend method to replicate frames, but the result would still look messy. I've never attempted to reconstruct a frame from two different fields, but I'm sure it can probably done with AVISynth..I'll look over the manual and repost.Impossible to see the future is. The Dark Side clouds everything... -
Looking over the docs, it looks like you can seperate out each field using the SeperateFields command but I do not see any way of blending 2 frames to produce one. There is a peculiar blend function, but it appears to run on every frame, which is not what we need.
You could select the fields to duplicate to produce an extra frame isomg tje SelectEvery command. Unfortunately, I've never done this type of reverse conversion (actaully a sort of 2:3 pulldown) using this command, so I don't know what you would plug in. The conversion from 24fps to 30 fps looks like this:
AssumeFrameBased
SeparateFields
SelectEvery(8, 0,1, 2,3,2, 5,4, 7,6,7)
Weave
The above command takes a repeating pattern of 8 (0-7), duplicating 2 frames for every 8 frames (8+2+8+2+8+2=30fps) so it won't work for your purposes, but it may give you an idea of what you need to do. You need to duplicate 1 field out of every 5 to restore your video back to 29.97. I'm thinking the output of this would still either pause, or jerk, unless the frame that was deleted was made up entirely, or partially, out of a dupilcate IVTC field. I'm guessing you do not have access to the original source?Impossible to see the future is. The Dark Side clouds everything... -
Thanks for the info DJRumpy!
It looks like my source was a bad NTSC to PAL...they just chopped one of every six frames out. Thus there is a jerk every 5 frames.
Here's the funny thing. The avi has interlace artifacts (combing) when viewed frame by frame in VirtualDub...that is why I thought it was interlaced (and also, TMPGEnce identifies it as interlaced when I use it as a source for a conversion). However, when I use the SeparateFields command in AVISynth, the resulting frames still show combing...so this can't really be an interlaced avi after all...right? Also, when I encoded with TMPGEnc, I got basically the same results whether I chose BFF, TFF, or non-interlaced for the source identification. The fact that there is combing tells me that this was "at one time" interlaced, but then some kind of video filter was run on the interlaced frames...so at this point it is no longer truly interlaced, and impossible to deinterlace. I hope all of this makes sense and seems correct, since I am very new to this. I assume the only proper way to filter an interlaced source is to filter on the fields, not the frames...once you apply a filter to the frames, then I guess you must say the video is no longer interlaced, since it can't be properly deinterlaced.
Now back to my problem. It looks like ConvertFPS does "blend" frames to get the new FPS. So it seems like I could do:
ConvertFPS(50)
SelectEvery(10,0,2,4,6,8,9)
doubling the fps should add in "blended" frames, then I just pick all except for the 4 blended frames I don't want.
trouble is, I think I tried this, and it just duplicated frames instead of blending....hmmmm.... -
Can VirtualDub distinguish between PAL-movie and PAL-video?
I use DVD2AVI and have to select 'Options' -> 'Field Operation' = 'none' to avoid PAL movies being converted at 20fps instead of 25fps.
It may be worth downloading DVD2AVI and seeing if this option results in a smoother transfer. -
LisaB, they probably had telecined NTSC film, and didn't inverse telecine it, to return it to 23.976. It's a common newbie mistake. They simply chop out a frame instead. Since we know they chopped yours, and it has interlace artifacts, then we can safely assume it was telecined to 29.976.
Your blend method should work, but with a damaged source, the output is likely to be poor. The only way I can think that you might be able to fix it is to somehow create one new frame from the fields of the two adjacent frames. Basically recreate an interlaced frame in the missing position. This will have the affect of converting your video back to 29.976, but then you can at least try inverse telecine, or just leave it as is, if your player supports ntsc.
If you use this script:
AssumeFrameBased
SeparateFields
SelectEvery(10,0,2,4,6,8,9)
Weave
It takes each field, and makes it into its own frame (SeparateFields does that part). That way, you can select individual fields to combine. The answer is here, I'm just not familiar enough with the command to tell you how. The Weave command will put the fields you selected back together, halving the frame rate again. Open your scirpt in VirtualDub to verify your scripts output framerate. If it's close to 25fps, then use the
AssumeFPS(25,True)
to tweak it into the correct framerate, or tweak your SelectEvery command to increase or decrease the fields selected.Impossible to see the future is. The Dark Side clouds everything... -
DJRumpy,
I liked your idea of blending by using fields from adjacent frames.
Didn't you actually mean to say:
SelectEvery(10,0,1,2,3,4,5,6,7,7,8,8,9)
Anyway, I tried using your script, but with SelectEvery(10,0,1,2,3,4,5,6,7,7,8,8,9). I didn't get good results (still jerky) and I think it is because the 5-frame pattern isn't perfectly regular, which would throw everything off.
This is truly the strangest piece of video I have ever seen. The other weird thing I didn't mention before is that the "combing" gets periodically worse and better on a five-frame period. The frame right after the jerk is perfectly progressive, then the next frame has light combing, then the next frame has more severe combing, etc...it's almost as if the top and bottom fields were catured at different frame rates, but they match up every five frames!
I would definitely be interested in hearing your professional opinion on how the video got this way. I put a 2.8 Mb, 24 second clip at:
http://members.verizon.net/~vze4fn9r/CLIP.AVI
If you look at the skinny tree which is in the middle of the frame at the 11.8 second point, you will see very clearly what I mean by the periodic change in combing. -
The majority of the patter looks like this:
PPIIIPPIIIPPIIIPP
but it does vary, sometimes with 3 progressive, and 3 interlaced, and even a few 3P2I frames.
The jump is always in the transition from progressive to interlaced, and vice versa. This video is a mess. If I had to guess, I'd say it was captured using a non-standard video rate. Something odd, like 20fps, or some other wierd setting. The worse thing is, without knowing what the original fps was, or what telecine pattern was used to get this one here, you'd be guessing as to which fields to blend in. I tried to find a decent pulldown pattern. 0,2 produced semi decent results, but the jerk was still there.
In order to properly blend to adjacent frames, you have to seperate out each field into it's own frame. you can do this by using these:
AssumeFrameBased
SeparateFields
You should end up with a half height video, with twice the number of frames (50fps). From here, you can select which fields to blend, using the SelectEvery command, and then use the WEAVE command to blend them back together. I tried with this one for about half an hour, with no luck finding the proper IVTC pattern.Impossible to see the future is. The Dark Side clouds everything...
Similar Threads
-
Interlaced frames and audio editing...
By takearushfan in forum Newbie / General discussionsReplies: 2Last Post: 30th May 2011, 11:39 -
Why are there spurious? frames in my interlaced PAL capture - sample clip
By BigMick in forum Capturing and VCRReplies: 5Last Post: 11th Jan 2010, 07:29 -
Help with possible interlaced pal avi source
By h2p000 in forum Video ConversionReplies: 4Last Post: 28th Feb 2008, 17:41 -
Fix for skipped frames?
By Tom in HD in forum MacReplies: 1Last Post: 15th Dec 2007, 17:44 -
30FPS Progressive to PAL Interlaced? (DSC MJPEG AVI to DVD)
By ezekiel42 in forum Video ConversionReplies: 7Last Post: 8th Jul 2007, 22:53