View Full Version : Selectevery() to remove every 2nd and 5th frame?
wiseant
24th September 2010, 05:07
Hi
I have a mpeg clip that seems to be interlaced only on every 2nd and every 5th frame
All the other frames seem progressive.
How do I use selectevery() to process this to remove these interlaced frames.
Or is there another avisynth command?
TIA
MrVideo
24th September 2010, 08:50
Hi
I have a mpeg clip that seems to be interlaced only on every 2nd and every 5th frame
All the other frames seem progressive.
I seriously doubt that. Video cannot be a mixture of interlaced and progressive. It is one or the other. What makes you think that?
manono
24th September 2010, 09:08
I have a mpeg clip that seems to be interlaced only on every 2nd and every 5th frame
Sample, please. If you blindly throw away 2 frames of every 5, you'll be left with a jerky playing mess.
SelectEvery can easily do what you want, but the pattern will probably change, maybe as many as hundreds of times if it's a full length movie, so it won't work to do the entire thing. And the result will be jerky.
Video cannot be a mixture of interlaced and progressive.
Sure it can.
wiseant
24th September 2010, 09:58
OK - I will upload a sample later today - how about a 60 second clip?
Hagbard23
24th September 2010, 11:13
€dit: have misunderstood the prob...
manono
24th September 2010, 13:40
OK - I will upload a sample later today - how about a 60 second clip?
How about a ten second clip, one showing steady movement.
wiseant
24th September 2010, 20:19
Hi
My mistake - first of all it is not mpeg, but rather wmv and I don't know where I got the every 2nd and 5th frame as interlaced - maybe one too many on my part - it is every 4th and 5th frame that is "interlaced" [blended?]
looks like it was a 3:2 pulldown encoded as progressive
I uploaded a 1 minute clip as well as my xvid encode
Here is the link: http://www.mediafire.com/?t72jf5bsnyg29
There are two rar files:
StampDayForSUPERMAN.cut.rar = 10.57 MB -> one minute clip and media info
StampDayForSUPERMAN.cut-xvid.rar = 14.19 MB -> my avs script and xvid encode
manono
25th September 2010, 03:41
Your Xvid of it is a complete disaster. It just needs a standard IVTC, I think:
FFVideoSource("E:\Test\StampDayForSUPERMAN.cut.WMV")
TFM().TDecimate()
There are some peculiarities with it in the opening few frames, but since almost all of your sample was useless talking heads,there's not enough there to try and figure out why. Maybe it's the fact that the first few frames are often screwy. The next time someone asks for a sample showing steady movement, try and provide steady movement. The only useful part of the sample was the first 3 seconds. And DirectShowSource pretty much sucks for this thing. Try FFMS2 and FFVideoSource.
wiseant
25th September 2010, 04:13
Hi manono
sorry about the sample I provided
I did look at TFM().TDecimate using ffmpegsource - it seems to do what I wanted - thanks
I uploaded a 3 minute clip that starts at frame 0
here is the link for the new sample -> http://www.mediafire.com/?t72jf5bsnyg29 -> StampDayForSUPERMAN-NEW.rar = 32.13 MB
MrVideo
26th September 2010, 07:39
Sure it can.
I beg to differ. The video file will be technically 100% interlaced, or 100% progressive. One can easily make 480i, 576i and 1080i look progressive. Dr Who is a prime example of 25p converted to 25i for air and DVD/Blu-ray. The underlying fact is that the video format is still interlaced.
If one wants to be silly enough to go through the trouble to make progressive video look interlaced, more power to them.
MrVideo
26th September 2010, 08:03
My mistake - first of all it is not mpeg, but rather wmv and I don't know where I got the every 2nd and 5th frame as interlaced - maybe one too many on my part - it is every 4th and 5th frame that is "interlaced" [blended?]
looks like it was a 3:2 pulldown encoded as progressive
I think you may have to go study up on how 2:3 pulldown looks within interlaced video. I'm downloading your 33 MB video file. But, based upon the "4th and 5th" in your posting, you have interlaced video with 24 fps (23.976 fps) material transferred to 29.97 fps video via the 2:3 pulldown.
EDIT: I downloaded your file, but I do not deal with WMV files. I only deal with AVI, MKV, MPG and TS wrapped files.
BTW, it is a simple AVISynth script to reverse telecine (IVTC) 2:3 pulldown material. I do it all the time with TV shows that are shot 23.976p or 23.976PsF and transferred to 1080i via electronic 2:3 pulldown.
When you can look at each interlaced frame with a program, whereby you can see both fields in the still frame, 2:3 pulldown video will look as if two consecutive frames have the comb effect (for rapidly changing motion) and three consecutive frames that look progressive. In fact, all five of the frames are actually interlaced. Take a look at this image, which shows how the 2:3 pulldown works, resulting in three frames that look progressive and two frames that look interlaced:
http://www.knowledgerush.com/wiki_image/7/7d/Three-two_pulldown_diagram.png
Here is n explanation of 2:3 pulldown: http://www.zerocut.com/tech/pulldown.html
manono
26th September 2010, 08:10
The video file will be technically 100% interlaced, or 100% progressive.
Well, technically, all NTSC DVDs are interlaced since all DVD players output interlaced 29.97fps (really 59.94 fields per second). However, the stored video can be encoded as progressive 23.976fps with pulldown applied to output interlaced 29.97fps, can be telecined film and therefore interlaced 29.97fps, or can be shot on video and be true interlaced 29.97fps. And all can be mixed into a single DVD. Have you never seen DVD video (anime does this quite commonly) where, when you run the Preview using DGIndex, it'll show as interlaced for awhile, progressive for awhile, and go back and forth with some frequency?
I mix the 2 fairly often myself. The main video may be either hard or soft telecine, or a mix of the two, and I'll IVTC if necessary to be able to encode it as progressive 23.976fps. The end credits, on the other hand, may be true interlaced 29.97fps and I'll encode it as such. Then I'll join the two when authoring. Documentaries also sometimes mix progressive film sources together with interlaced video sources. I stand by what I said.
MrVideo
26th September 2010, 08:39
Well, technically, all NTSC DVDs are interlaced since all DVD players output interlaced 29.97fps. However, the stored video can be encoded as progressive 23.976fps with pulldown applied to output interlaced 29.97fps, can be telecined film and therefore interlaced 29.97fps, or can be shot on video and be true interlaced 29.97fps. And all can be mixed into a single DVD. Have you never seen DVD video (anime does this quite commonly) where, when you run the Preview using DGIndex, it'll show as interlaced for awhile, progressive for awhile, and go back and forth with some frequency?
I don't do anime. While the MPEG-2 on a DVD can indeed be encoded as you indicated, the actual delivery to the consumer's display device has to be all interlaced or all progressive. No material delivered for broadcast is anything but 100% interlaced or 100% progressive.
Documentaries also sometimes mix progressive film sources together with interlaced video sources. I stand by what I said.
Sure, but the delivered source will either be 100% interlaced (with the film portions 2:3 transferred) or 100% progressive. For broadcast, since 23.976 and 24 progressive is NOT done (only on DVD and Blu-ray), even the 59.94 720p material has the film source 2:3 pulldown transferred.
I've not transferred the content of a DVD and placed it into a video editor and ended up with both interlaced and progressive material. That would imply (for NTSC region) that the video had both 23.976 fps and 29.97 fps material. The editor I use won't even allow mixed frame rates. But it is a simple editor. Programs like Premiere and Vegas Video do (I suspect Final Cut Pro does as well), but with Premiere and Vegas Video, you MUST choose a single output format, resulting in one of the sources being converted to the other.
I personally would never create a video project with mixed frame results. But that's me. I've never seen real closing credits for a 23.976 mastered project be anything but 23.976, as the closing credits are created in the same 23.976p realm as the rest of the project. I'm not including the bastardized closing credits you see today on broadcast/cable, etc. I do get to work with programs that have the real closing credits, that you ultimated get on DVD and Blu-ray.
So, I stand by my statement as well. That means that we can agree that we disagree.
As a side note, when I IVTC material back to 23.976, those bastardized network credits are run through IVTC script along with the program material. If they get a little bastardized as a result, so be it, as they are "wrong" anyway and no one is really going to notice.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.