PDA

View Full Version : NTSC video - PAL conversion again


ppera2
14th December 2002, 16:55
I want convert NTSC interlaced video (not FILM origin) to noninterlaced PAL. Reasons for it are that I want that it playback fine on Monitor and PAL TV too.
With Xeesdeni's smooth deinterlace plugin and instructions I get very good results.

LoadPlugin("F:\AVISynth\MPEG2DEC.DLL")
mpeg2source("H:\Rep.d2v")
LoadPlugin("F:\AVISynth\SmoothDeinterlacer.dll")
SmoothDeinterlace(tff=true, doublerate=true)
ConvertFPS(50)
SeparateFields()
SelectEvery(4, 1, 2)
ChangeFPS(25)
BilinearResize(576,432)

After trying lot of scripts above gave me best results. However I'm not sure is ChangeFPS(25) best way to get 25 fps. When I put instead it Weave I still have some interlace.
Movement is pretty smooth, much better than simple ConvertFPS, but of course this works much slower.

Btw. when I used only deinterlace and left 30 fps it was very ugly and smeared by moving objects, especially with Xvid (deinterlace with Decomb or Tom's motion comp.).

Xesdeeni
14th December 2002, 20:43
I'm not sure you'll get something that you are happy with. If I understand what you want to do correctly, you are trying to convert 60 instants of information (fields) to 25 instants of information (non-interlaced frames). By definition you will be losing 35 instants of information. If the motion isn't too great, then it will probably look decent.

In any case, I think your best bet would be something like this:LoadPlugin("F:\AVISynth\MPEG2DEC.DLL")
mpeg2source("H:\Rep.d2v")
LoadPlugin("F:\AVISynth\SmoothDeinterlacer.dll")
SmoothDeinterlace(doublerate=true)
ChangeFPS(25)
BilinearResize(576,432)You might also want to try ConvertFPS(), but you'll probably have to do a two-pass process, because ConvertFPS() is picky about going down too far in frame rate too quickly. I think if you went from 60 to 50 and then 50 to 25 it would work.

Of course, for best results, you should probably convert to 50 progressive frames for the PC, and 50 interlaced frames for the TV :)

Xesdeeni

ppera2
15th December 2002, 00:03
I wouldn't agree that I lose 35 from 60 instants. Only 10.

I tried your script, but motion is not enough smooth, what is expectable because of primitive ChangeFPS command what just drops frames. It works of course faster.
Then I changed ChangeFPS to ConvertFPS and AVISynth said that fps change is too high and to add zone parameter. I added zone=100 and it gave me much smoother movement (similar as in my script) but it works some 20% slower from it.

I think that field based fps change must always be better than framebased, and my tests prove it. What is unclear for me is: what is exact structure of doublerated frames after 'SmoothDeinterlace(tff=true, doublerate=true)' .

Also I don't see why I should use 50 fps clip. And I want same file for watching on monitor and TV. Progressive video will look perfect on TV, I think better than interlaced one from different fps origin - time shift between fields is by NTSC 1/60 sec while by PAL is 1/50 sec.
As I see ConvertFPS command of AVISynth is little known yet, but it looks that it has big potential.

ppera2
15th December 2002, 16:02
Right Bach! It does same, of course faster :-)

Actually I just took script NTSC DVD to PAL from Xeesdeni's intructions and changed Weave to ChangeFps(25) .

Btw. when using zone parameter motion is better, and price is of course payed in slower work.

I tried ConvertFPS to convert music NTSC DVD to PAL VCD (don't like speed up needed when do IVTC) and it is pretty good even with telecined source. But only with zone=100 or similar.
Instead SmoothDeinterlace I used VerticalReduceBy2 and add borders to get 288 vert. res.

snowmoon
15th December 2002, 16:41
LoadPlugin("F:\AVISynth\MPEG2DEC.DLL")
mpeg2source("H:\Rep.d2v")
LoadPlugin("F:\AVISynth\SmoothDeinterlacer.dll")
SmoothDeinterlace(tff=true, doublerate=true)
ConvertFPS(50)
#SeparateFields()# delete this line. It is removing 50% of each
#frame for nothing.
#SelectEvery(4, 1, 2)# delete this line. You don't need it.
#ChangeFPS(25)# delete this line too.
selectevery(2,0)# add this line to achieve 25 fps.
BilinearResize(576,432) # Do you still need this line?
[/code] [/B]

In order to keep the interlacing intact wouldn't this be better?

#selectevery(2,0)# add this line to achieve 25 fps.
BilinearResize(576,216) # 50 fps 576,216
Weave() # 25fps 576,432 interlaced.

You can also use decimate(cycle=6,mode=1) for the ConvertFPS(50) as an alternative that will blend insted of dropping frames. YMMV, see which one works best for your materal.

And another way to do 29.97i -> 25i

Source(...avi)
AssumeFPS(30) # to make calcualtions easier
separateFields()
even = SelectEven().Decimate(cycle=6,mode=1)
odd = SelectOdd().Decimate(cycle=6,mode=1)
Interleave(evem,odd).Weave()

ppera2
17th December 2002, 16:55
I made some tests and analysis in last couple days to better understand whole thing. Watched in Virtual Dub after each operation the effect. I should do it before my first post, but always is simpler to ask than research :-)
Conclusion is (maybe little surprisely) that in fact interlaced material is better for framerate conversion 25-30 fps or vice-versa. Interlace causes problems, but it allows us to work with double framerate, what is good to get smoother conversion.
Why ? SmoothDeinterlace(doublerate=true) does same thing as Bob, but in better quality: separates fields and interpolate missing lines, so we get 50 fps from 25 fps in same resolution. Of course it is not perfect, but is very close.
When then we perform some of framerate changing operations as ChangeFPS or ConvertFPS we get better result with doubleframerate, than with single - skip is much lower (~2x).
Further operations depend from what we want: interlaced or progressive video. In case of interlaced we must add after :

SmoothDeinterlace(tff=true, doublerate=true)
ConvertFPS(50) #this is for NTSC-PAL

following:

SeparateFields()
SelectEvery(4, 1, 2)
Weave()

And in progressive case only:
SelectEvery(2,0) #As Bach said

it can be
SelectOdd() # too ...

I don't see why force interlaced output - progressive will look good on TV too. We look movies often on TV and all it is progressive in PAL.

For conversion to VCD Bob is usually enough good - it is much faster than SmoothDeinterlace. So NTSC DVD to PAL VCD convert script should look like this:

LoadPlugin("F:\AVISynth\MPEG2DEC.DLL")
mpeg2source("H:\NTSC.d2v")
Bob()
ConvertFPS(50)
SelectOdd() # or even...
BilinearResize(352,240)
AddBorders(0,24,0,24)

I put here 240 vertical in resize output with purpose. Someone may think (as I have) that is much faster instead SmoothDeinterlace using SeparateFields(), but we will have schimmering (waving) then in video.

Xesdeeni
18th December 2002, 16:44
I wouldn't agree that I lose 35 from 60 instants. Only 10.Since your source is interlaced, each field is a different "instant of time." That means there are 59.94 "instants of time" represented by one second of video by definition. So by converting to progressive PAL, you are converting to 25 "instants of time" every second. That is a loss of ~35 "instants of time" per second.I tried your script, but motion is not enough smooth...Which is exactly what would be expected when you lose so many "instants of time" in the conversion. I think that field based fps change must always be better than framebased, and my tests prove it. What is unclear for me is: what is exact structure of doublerated frames after 'SmoothDeinterlace(tff=true, doublerate=true)' .The input is 59.94 fields per second. Each field is made up of only half of the 480 lines. When doublerate=true, SmoothDeinterlacer converts this to 59.94 frames per second, where each frame has a complete 480 lines. This represents the same number of "instants of time," but now each one is a full frame instead of a field. (BTW, you don't have to specify the tff parameter, it is normally automatically detected).Also I don't see why I should use 50 fps clip.For maximum "smoothness," you need to maximize the number of "instants of time" as well as be compatible with your display. On a PC, you have a progressive display. So for best results (no interlaced artifacts), you need a progressive clip. However, 25fps will not be as smooth as 50 fps, assuming you have more than 25 "instants of time" to begin with (e.g. you aren't coming from a 24fps film, which only has 24 "instants of time" to begin with). For the TV, you can't show 50 progressive frames, so you have to provide 25 progressive frames or 50 interlaced fields. In this case, the 50 interlaced fields will provide more smoothness.And I want same file for watching on monitor and TV.Then you will have to make a sacrifice on either the PC or the TV.Progressive video will look perfect on TV, I think better than interlaced one from different fps origin - time shift between fields is by NTSC 1/60 sec while by PAL is 1/50 sec.First, you have to realize that on a normal (not progressive or 100Hz) TV, even your 25 progressive frames will be interlaced. The TV paints alternate fields. Interlacing is noticable (normally only on larger TVs) when the two fields represent a different "instant of time." By converting to progressive, you have only eliminated half of the interlacing. But the other half of the time, two successive fields will contain parts of two successive (progressive) frames.

Also, I think most people would disagree that 25 progressive frames would look better than 50 interlaced fields. 25 "instants of time" will not look more smooth than 50 "instants of time," and will normally be noticably less smooth.

The interlaced nature of TV was created specifically to bridge the gap (at that time due to technical limitations of the equipment) between vertical resolution and smoothness of motion. You get almost the best of both worlds. The sacrifice is that objects in motion lose half their vertical resolution. Of course that was with 13 inch round (black & white) screens. Today we have much larger screens, and the loss of resolution is much more apparent. That's why these larger displays benefit greatly from converting the 50 fields to 50 progressive frames. But note that your 25 progressive frames would not benefit in the least, because there would not be 50 "instants of time" from which to derrive the 50 progressive frames. All you would get is the 25 progressive frames shown twice (or 4 time for 100Hz displays).As I see ConvertFPS command of AVISynth is little known yet, but it looks that it has big potential.I agreee, but it also adds "jutter," which is caused by the mixing of multiple source frames into the destination frames. I think whether this is preferable to frame dropping/replication may be in the "eye of the beholder."

As a side note, if you are looking for speed, then don't use SmoothDeinterlace(). Bob() will work more quickly, but static images will have some "bobbing" artifacts. You may even be able to do this in real time from an interlaced clip. Many software PC DVD players do this.

Xesdeeni

jang0
18th December 2002, 18:40
Originally posted by Xesdeeni
Today we have much larger screens, and the loss of resolution is much more apparent. That's why these larger displays benefit greatly from converting the 50 fields to 50 progressive frames. But note that your 25 progressive frames would not benefit in the least, because there would not be 50 "instants of time" from which to derrive the 50 progressive frames.

but when these displays convert 50 fields to 50 progressive frames, they'll have to double the height of each field which can only be done by interpolation. so they will show 50 progressive fields but they actually still have half resolution. or is there any trick? though i agree that interlaced stuff will look smoother on these displays as it also does on normal TVs.

ppera2
18th December 2002, 18:50
Xeesdeni:
Thanks for detailed reply. Some things are more clear now for me, as you can see for my previous post.

I agree that 50 fps is much better than 25, but difference is hardly visible, and it can cost much.

Why is your first script here not enough smooth ? Because of hard framerate change from 60 to 25. Especially with ChangeFPS command. It will drop in some moments even 2 frames, what will cause too big skip in picture. Actually there is no sense to use doubleframerate in that case, just singleframerate deinterlace. ConvertFPS masks framedrop with blending, what usually looks much better. 2 step fps convert is better because we have smaller gap and blending area is smaller too. I converted about 10 DVD's in last 5 days, and slow scanning and motion looks quite good with 2 step fps change.

Yes, it would be better to make interlaced video with script from Smoothdeinterlace manual, but I was clear in that what I want. And it is much slower too.
Also, 25 fps progressive is enough smooth when it is clean source. Not smooth when is get by framedropping, duobling etc...
Movement can be nonsmooth at 50-60 fps too, if video is made badly.
Perfect fps conversion is possible only by generating interpositions for moving objects according to their movement. It is very hard and I think that maybe codec can handle it in best way, because it does lot of movement analysis.

I know very well how TV displays picture. There is no true progressive displaying of course, but progressive video is shown simply by first show (scan) odd lines and then even lines. There is no any shift between even-odd lines of moving parts on screen, and it looks very well. Of course it stays only for 25 fps (PAL), not for telecined NTSC.

History: reason to nougarating interlaced video by TV is actually not need for better smoothness via some virtually doubled framerate, but need to decrease trill (palpilation). 25 or 30 picture per sec. would be very bad to watching. Real 50-60 fps would require too big bandwith for transmission. Also, size of picture tube (screen) is not relevant in this case. In movie theatres beem is cut also with some kind of propeller 1-2 times during 1 frame, but it's easy to realize - no need for memory chips :) .
Right, progressive frames on 100 Hz display will not get 50 or 100 frames per second. It is not goal, but decrease of trill. Memory strongly recommended :-)

Btw. in USA is possible to buy progressive scan TV's and DVD players. Reason is of course better displaying of Films than via 'Telecined way'.

Xesdeeni
19th December 2002, 18:48
but when these displays convert 50 fields to 50 progressive frames, they'll have to double the height of each field which can only be done by interpolation. so they will show 50 progressive fields but they actually still have half resolution. or is there any trick?:) :) :) Actually, there are numerous "tricks" that run the gamut of simple to complex and require from none to serious processing power and memory.

You mention one of the simplest: interpolation. AVISynth's Bob() essentially does this. But you'll notice that there are problems on static footage (no motion). Each frame is filling in lines based on different source material, so the results are that each resulting frame isn't exactly the same, and the result "shimmers" or "bobs."

That's where the smart de-interlacers (such as SmoothDeinterlace) come in. They try to detect when there is no motion, and instead of interpolating the missing lines, it borrows them from an adjacent field. The result is normally no worse than interpolation for scenes in motion, but for static scenes, it looks much better.

There are better solutions, some used in the more expensive TVs. Instead of interpolating the missing lines for scenes in motion, an analysis of several fields by a sophisticated motion estimation algorithm can detect objects and fill in the lines from adjacent fields, even though the object moved between fields. This is probably a bit beyond what our software deinterlacers can do today (and even if it's not, I suspect anyone who could create such an algorithm would probably want to sell it instead of give it away :) ).

I agree that 50 fps is much better than 25, but difference is hardly visible, and it can cost much.One of the very nice things about AVISynth (and VirtualDub, and all the rest of these wonderful PC-based tools) is that we can all process video to our taste. In general, my judgement tends to be more critical than most (I can actually provide numerous references that will verify this ;) ), so if I am satisfied with the results, most people will agree. Perhaps you wouldn't, but that's the great thing about sharing...we all get different perspectives.Why is your first script here not enough smooth ? Because of hard framerate change from 60 to 25. Especially with ChangeFPS command. It will drop in some moments even 2 frames, what will cause too big skip in picture.That is exactly what I was pointing out above.Actually there is no sense to use doubleframerate in that case, just singleframerate deinterlace. ConvertFPS masks framedrop with blending, what usually looks much better. 2 step fps convert is better because we have smaller gap and blending area is smaller too.My mistake. You are right, it's a wasted step to double the framerate when going from 60 fields to 25 frames. But keep in mind the results won't look any different when using ChangeFPS(), only when using ConvertFPS() (twice).I converted about 10 DVD's in last 5 days, and slow scanning and motion looks quite good with 2 step fps change.Can you post your script showing the two steps? I'm sure others would be interested.I know very well how TV displays picture. There is no true progressive displaying of course,Actually there are televisions that actually display a progressive image (and of course your PC does as well). Obviously they have to have a built-in deinterlacer, but they can also be fed from progressive DVD players.but progressive video is shown simply by first show (scan) odd lines and then even lines. There is no any shift between even-odd lines of moving parts on screen, and it looks very well. Of course it stays only for 25 fps (PAL), not for telecined NTSC.You might want to take a closer look. If your TV is not progressive, then there definitely are interlaced artifacts when viewing progressive images...and this has nothing to do with NTSC telecine. There are half as many, but they are still there. Remember that the fields are sequential. Tying one field to the one before or after it to make a frame is actually arbitrary. DVDs tie the top field to the next field to make a frame, while DV ties the top field to the previous one (or the bottom field to the next, depending on your perspective), but both work fine. Consider a truly interlaced video compared to a progressive one:

Interlaced
Field 1: Instant 1
Field 2: Instant 2
Field 3: Instant 3
Field 4: Instant 4

In this case, while field 2 is being drawn, you will see field 1 fading out. Since these are two different instances, you will see the interlacing artifact. The same is true between fields 2 and 3, 3 and 4, etc.

Progressive
Field 1: Instant 1
Field 2: Instant 1
Field 3: Instant 2
Field 4: Instant 2

In this case, while field 2 is being drawn, you will see field 1 fading out as well. But since these are from the same instance of time, there will be no interlacing artifact. However, when field 3 is being drawn, field 2 will be fading out. At this point you WILL see interlacing artifacts, since two instants will be visible at the same time. History: reason to nougarating interlaced video by TV is actually not need for better smoothness via some virtually doubled framerate, but need to decrease trill (palpilation). 25 or 30 picture per sec. would be very bad to watching. Real 50-60 fps would require too big bandwith for transmission.That is exactly what I said. They wanted more instants of time, but they couldn't do so progressively, so they introduced interlacing.Also, size of picture tube (screen) is not relevant in this case.I brought up the size of the screen to point out that the interlacing was not even visible at the time when it was introduced, so there was definitely no penalty for using interlaced video. Today, we have larger (and higher quality) screens, and the interlacing is much more obvious.In movie theatres beem is cut also with some kind of propeller 1-2 times during 1 frame, but it's easy to realize - no need for memory chips.Actually, all they do is show the same frame twice, using a shutter to cause the image to flicker at 48Hz instead of 24Hz.Right, progressive frames on 100 Hz display will not get 50 or 100 frames per second. It is not goal, but decrease of trill. Memory strongly recommended :-)I believe that 50Hz was introduced to eliminate the interlacing artifacts on large screens. Some of the most expensive televisions use motion estimation/compensation to create intermediate frames and actual display more "instants of time." But in most TVs, you are right about 100Hz, it was introduced only to reduce flicker (insert obligatory 60Hz vs. 50Hz bias here).Btw. in USA is possible to buy progressive scan TV's and DVD players. Reason is of course better displaying of Films than via 'Telecined way'.I think this may be where you are straying from the trail. As I mentioned above, if your source video only has 24 (25) "instants of time," as with a film, then there is no need to go to 50 fps. But your original question concerned interlaced (not from film) source. In that case, you will definitely see a loss of smoothness when you reduce the "instants of time" from 60 to 25. And keep in mind that movies are shot on film that is designed to be played back at 24 (25) fps. Each frame captures a longer period of time than a video camera designed to play back at 50 (60) fields per second. This introduces natural motion blur, but it make playback at 24fps acceptable. Video reduced from 60 fields to 25 frames will not have this type of motion blur. Using ConvertFPS() will simulate this, but it will not be quite the same thing.

Xesdeeni

morsa
20th December 2002, 12:00
So, just a little question.
If all this stuff is always true, why when I see my Divx on my TV I see it in perfect condition?
No artifacts.

onesoul
20th December 2002, 16:17
Originally posted by morsa
If all this stuff is always true, why when I see my Divx on my TV I see it in perfect condition?
No artifacts.
Well, I assume you are feeding divx from computer to tv and since you are feeding a progressive source you will have, like Xesdeeni said, visible interlaced lines every 2 fields which means when one frame transitions to another. Look closely to the screen and you will see them, trust me.

@Xesdeeni
Nice FAQ, thank you for enlighten me at some points :)

ppera2
20th December 2002, 17:37
Well, phosphor used in TV's and monitors has pretty short time of emission, so I can say just that it is very barely visible, maybe if just hardly want to see.

Xeesdeni: how longer is usually doublerated DivX video from singlerated - in percents ?

morsa
22nd December 2002, 01:42
I have PAL system in Argentina and after trying, I didn't see anything.

ppera2
24th December 2002, 14:58
Next script gave me best result when converting NTSC DVD to 25 fps non-interlaced AVI :

LoadPlugin("F:\AVISynth\MPEG2DEC.DLL")
mpeg2source("H:\Rep.d2v")
LoadPlugin("F:\AVISynth\SmoothDeinterlacer.dll")
SmoothDeinterlace(tff=true, doublerate=true)
ConvertFPS(50)
SelectOdd()
BilinearResize(576,432) #optional :-)

This gives pretty smooth movement, looks good on monitor and TV too.
Only by pretty fast movement is visible some skipping, but by slow camera scanning is very good, what is part where bad conversiom is most visible, at least for my eyes.
Bad thing is that Smooth filter is slow, but it's price of quality.

For lower resolutions - eg. VCD is better to use Bob instead SmoothDeinterlace - it works much faster.

LoadPlugin("F:\AVISynth\MPEG2DEC.DLL")
mpeg2source("H:\Rep.d2v")
Bob()
ConvertFPS(50)
SelectOdd()
BilinearResize(352,224) # for VCD... vertical size can differ of course
AddBorders(0,32,0,32) # optional for widescreen source

Second stage could be ConvertFPS(25, zone=100) , but it looks not so good. There is break in middle of picture, what is sometimes too obvious.

Xesdeeni
27th December 2002, 16:03
Xeesdeni: how longer is usually doublerated DivX video from singlerated - in percents ?I'm not sure what you are asking here. The number of frames will be twice the input. As for the bit rate, that will be under your control. Since the input is twice what it was before, it is likely that the quality at the same bit rate may suffer.I have PAL system in Argentina and after trying, I didn't see anything.Then you probably don't see it on interlaced video either.Well, phosphor used in TV's and monitors has pretty short time of emission, so I can say just that it is very barely visible, maybe if just hardly want to see.Remember that you need a rather large TV to see interlaced (motion) artifacting. That's why only the larger ones tend to come with progressive scan.For lower resolutions - eg. VCD is better to use Bob instead SmoothDeinterlace - it works much faster.Absolutely correct.

Xesdeeni

onesoul
27th December 2002, 20:22
@Xesdeeni

Interlaced
Field 1: Instant 1
Field 2: Instant 2
Field 3: Instant 3
Field 4: Instant 4

In this case, while field 2 is being drawn, you will see field 1 fading out. Since these are two different instances, you will see the interlacing artifact. The same is true between fields 2 and 3, 3 and 4, etc.

Progressive
Field 1: Instant 1
Field 2: Instant 1
Field 3: Instant 2
Field 4: Instant 2

In this case, while field 2 is being drawn, you will see field 1 fading out as well. But since these are from the same instance of time, there will be no interlacing artifact. However, when field 3 is being drawn, field 2 will be fading out. At this point you WILL see interlacing artifacts, since two instants will be visible at the same time.

In what consists fields at progressive frames?
I am having trouble to define it because when tv display even lines and then the odds with interlaced source I think (I'm really not sure, maybe you could correct me), it displays the first field as the even lines and then the second field as the odd lines. But when displaying progressive source in which way are they displayed?
Are the field 1 and 2 a full frame being the top and bottom of the frame? If so how do the tv selects the even and odd lines?

Sorry for my silly questions... :rolleyes:

Thanks

scmccarthy
28th December 2002, 00:26
I assume that the TV grabs the full frame and then displays every other line of the frame. The TV can't display the full frame at one time and makes no distinction between frame based and field based. If the two fields of the frame are from different times, then displaying it at once with a progressive capable display will look wrong.

I don't believe you can see any interlace artifacts on an interlace display due to lack of resolution and the fact that the two images tend to blend into one another as they fade, with the exception of an analog ( I think that is how we spell it in the US) HDTV.

Stephen

ppera2
28th December 2002, 01:36
Uh,uh... scmccarthy, I don't know whether you express yourself bad or your picture is wrong.
Analog TV can't grab whole picture (frame). It displays what coming in interlaced way. If you put twice same picture it will practically display it at half vertical res. - so work old home computers as Commodore 64 and similar with TV out. Increasing vertical resolution, and sending interlaced will produce too much flicker, therefore old computers had usually vertical res. of 200 lines.

Digital TV's are different story, and can do lot of things, this is not relevant here.

Btw. by bigscreen TV's I don't like that horizontal lines are always too visible, even by static scenes.

onesoul
28th December 2002, 01:56
Originally posted by ppera2
Next script gave me best result when converting NTSC DVD to 25 fps non-interlaced AVI :

LoadPlugin("F:\AVISynth\MPEG2DEC.DLL")
mpeg2source("H:\Rep.d2v")
LoadPlugin("F:\AVISynth\SmoothDeinterlacer.dll")
SmoothDeinterlace(tff=true, doublerate=true)
ConvertFPS(50)
SelectOdd()
BilinearResize(576,432) #optional :-)

Do you recommend doing deinterlacing with pal dv (which is 50fps interlaced) even for only seeing at tv? Does it make any difference to selecteven() or selectodd()? (I know for pal dv I wouldn't use convertfps(50) which is already 50 frames/sec).

Thanks

ppera2
28th December 2002, 06:34
Originally posted by onesoul
Do you recommend doing deinterlacing with pal dv (which is 50fps interlaced) even for only seeing at tv? Does it make any difference to selecteven() or selectodd()? (I know for pal dv I wouldn't use convertfps(50) which is already 50 frames/sec).

Thanks

No. Deinterlace is only necessary for watching on computer monitor, what has progressive scan. Of course selecteven or selectodd may be used, or selectevery(2,0) ... (2,1) .

scmccarthy
28th December 2002, 06:54
Analog TV can't grab whole picture (frame). It displays what coming in interlaced way.

Analog TV cannot display the whole frame at once, but can it grab the whole frame and display it in two fields?

There is a difference between what the TV receives and how the TV displays it. I thought the TV scans each frame twice, skipping every other line the first time and then reading the lines that were skipped over the first time for the second pass. It never occured to me that the TV is sent the fields separately. And are they stored separately or interleaved? I always imagined that the fields are stored interleaved in frames.

Digital TV's are different story, and can do lot of things, this is not relevant here.

I did say analog HDTV.

Clearly there are interlase artifacts when interleaved frames are displayed progressively, but there are no artifacts visible on an interleaved display.

Are the field 1 and 2 a full frame being the top and bottom of the frame?

This is the question I was responding to originally. I think the fields are always interleaved, the only difference being whether each field is from the same time. If the fields are from different times and you display them together (progressive), you get an artifact, if they are from the same time, but you display them separately (interlaced), there is no artifact; That looks fine.

Do you recommend doing deinterlacing with pal dv (which is 50fps interlaced) even for only seeing at tv?

No.

Stephen

scmccarthy
28th December 2002, 15:27
@onesoul

Remember that this thread started with a question of what is the best way to play the same file for display on both a computer monitor and an analog TV. In that case the answer is to deinterlace, because you get less artifacts watching a deinterlaced movie on a TV than an interlaced movie on the computer screen.

But you asked what you should do if you only want to watch it on the TV. In which case, don't deinterlace. You see you really have to carefully pay attention to the subject of the thread in order to not get confused. The very first response to this thread stated:

I'm not sure you'll get something that you are happy with. ...Of course, for best results, you should probably convert to 50 progressive frames for the PC, and 50 interlaced frames for the TV

Conversion is still nesessary in both cases because it is going from NTSC to PAL. So from the first it is established that this is a compromise so you only have to have one file.

Stephen

onesoul
28th December 2002, 15:55
Sorry :o

The reason I asked was because it would spare a lot of space if I could maintain good quality with 25 progressive frames.

ppera2
28th December 2002, 17:27
OK folks, I read it all... Thanks to everybody.

There is still one question: if progressive video really looks bad on TV, what to do with movies ? They all are non-interlaced.
I don't know about a way to make them interlaced. Telecine even makes it worse, because of duplicated fields and 3:2 noninterlaced-interlaced ratio.

My opinion is that interlaced video is not natural way of showing it. It is forced out some 60 years ago because of some technical details, what are explained here.

scmccarthy
28th December 2002, 21:03
@onesoul

The reason I asked was because it would spare a lot of space if I could maintain good quality with 25 progressive frames.
PAL TV is 50 *fields* per second, PAL progressive is 25 *frames* per second. A field is half the size of a frame, so there is no difference in size. This is not true for NTSC which has 60 fields per second interlace, and 24 frames per second progressive. This is equivalent to dropping every fifth frame which is made up of duplicate fields anyway. This only works if the original interlaced video was telecined from film originally.

Stephen

onesoul
28th December 2002, 21:57
@scmccarthy

You're right, I wonder where I got the idea of getting less space :confused: .

Thanks for the patience :)

Xesdeeni
2nd January 2003, 16:40
Sorry for the late responses, I've been on vacation :-)

@onesoulIn what consists fields at progressive frames?
I am having trouble to define it because when tv display even lines and then the odds with interlaced source I think (I'm really not sure, maybe you could correct me), it displays the first field as the even lines and then the second field as the odd lines. But when displaying progressive source in which way are they displayed?
Are the field 1 and 2 a full frame being the top and bottom of the frame? If so how do the tv selects the even and odd lines?I think we all have had problems understanding this as we learn about it.

As you said, successive fields alternate from odd to even and back to odd. For a truly interlaced image, each field is a separate "instant of time" (1/59.94 sec for NTSC, 1/50 sec for PAL/SECAM). The TV shows even then odd then even again, etc. In actual fact, the TV does not know anything about frames (to be accurate, there is a relationship among adjacent fields in the analog television signal that has to do with the color encoding, but for the purposes of processing the data in digital format and then allowing available equipment to convert between analog and digital, we can ignore this legacy).

So if you decide to group pairs of fields into frames, you can do so however you want. You can pair up an odd field with the following even, or you can pair up an even field with the following odd. The choice is 100% arbitrary. In fact, both are in use today. Digital video (DV) uses one, while (interlaced) DVD uses the other.

So now consider a progressive sequence of full frames. Each one contains two fields. Which field is first? Neither! They both are part of the same "instant of time," so they both occur at the same time. So when you show this frame, you can show either the even field or odd field first, and both look the same.

@scmmccarthyI don't believe you can see any interlace artifacts on an interlace display due to lack of resolution and the fact that the two images tend to blend into one another as they fade, with the exception of an analog ( I think that is how we spell it in the US) HDTV."...lack of resolution..." and "...tend to blend into one another..." are both a function of the size fo your television. I can assure you on my 35-inch CRT, and most definitely on my friend's 52-inch projection television (not progressive), the interlace artifacts are visible, even for a progressive source. They occur half as often, so they aren't as bad as pure interlaced video, but they are there. [And yes, we American's are lazy that way...we drop extra letters in words like "colour" and "analogue" :)]Analog TV cannot display the whole frame at once, but can it grab the whole frame and display it in two fields?Yes, a full frame can be displayed by alternating between the two fields. The great thing about this is that for a static (non-moving) image, you get a full resolution (480 lines for NTSC / 576 lines for PAL/SECAM) image, but when the image moves, you get more "instants of time" (59.94 NTSC / 50 PAL/SECAM) for a smoother motion.There is a difference between what the TV receives and how the TV displays it. I thought the TV scans each frame twice, skipping every other line the first time and then reading the lines that were skipped over the first time for the second pass. It never occured to me that the TV is sent the fields separately. And are they stored separately or interleaved? I always imagined that the fields are stored interleaved in frames. No, the fields are actually sent sequentially. And (with the exception I noted above) the TV doesn't know anything about groups of fields called frames. Clearly there are interlase artifacts when interleaved frames are displayed progressively, but there are no artifacts visible on an interleaved display.Yes, there are. You can be sure that there would be no such thing as progressive televisions if the interlacing was not visible. Conversion is still nesessary in both cases because it is going from NTSC to PAL. So from the first it is established that this is a compromise so you only have to have one file.Actually, there is no need to do a standards conversion at all for display on a PC. Converting interlaced to progressive will help. But unless you are converting to the display rate of your PC monitor (normally around 72 Hz), then NTSC or PAL will look about the same.

@ppera2There is still one question: if progressive video really looks bad on TV, what to do with movies ? They all are non-interlaced.
I don't know about a way to make them interlaced. Telecine even makes it worse, because of duplicated fields and 3:2 noninterlaced-interlaced ratio.

My opinion is that interlaced video is not natural way of showing it. It is forced out some 60 years ago because of some technical details, what are explained here.I'm not sure what you are asking here. Yes, movies are progressive at 24 fps. And yes, when they are displayed on TV, they must become interlaced. For NTSC, this involves the telecine process after the film is slowed slightly to 23.976 fps. For PAL/NTSC, this normally involves speeding up the film to 25 fps, which is then split into fields.

Interlaced is the way that TVs have been operating for 60+ years. As I mentioned above, interlacing provides a good compromise between smooth motion and high resolution for 1/2 the bandwidth of a progressive display. When people wanted to show movies on TV, they had to figure out a conversion. At first, they showed the movie on a screen and pointed a TV camera at it. But since the projector and camera weren't synchronized, the image flickered horribly. So special projectors were created for converting film to TV. For NTSC, the projector showed one frame for 3/59.94 sec and the next for 2/59.94. For PAL/SECAM, the projector showed each frame for 2/50 sec. Both projectors were synchronized to the camera.

[BTW, do you remember the weird "loose loop" (I don't know the technical term) in the film projectors? That's there even for regular projectors. In all kinds of projectors the film has to stop and start so that each frame can be shown for a bit. But the audio track is on the film too, and this can't stop and start or the audio will be screwed up. So the "loose loop" allows the film to move at a steady pace through the audio reader, but stop and start at the shutter.]

Xesdeeni

scmccarthy
2nd January 2003, 17:36
@Xesdeeni

It is confusing to call something an artifact when it is working exactly as it is supposed to. When have been watching TV all our lives without complaining. Not until we see the new progressive TVs do we even see the problem with analog TVs.
My opinion is that interlaced video is not natural way of showing it.
pperas quote is a case in point. Once it is labeled an artifact, we invite the thought that it is a problem to be fixed. The only way to fix it is to toss out all our analog TVs. Or watch all movies on your computer screen.

Stephen

onesoul
2nd January 2003, 19:28
@Xesdeeni

Thank you for the enlightning :)

But I got another question about smoothdeinterlace:

doublerate = (boolean; default = false) Determines whether the output is to be at double the input frame rate (the field rate) or the same. Which one you want will depend on your intended use.
blend = (boolean; default = false) Blends this and previous field in interlaced areas. (You should probably avoid using this as it just blurs the video.)


So if one use doublerate=false, how do you get the same frame rate? By blending? If so I guess it doesn't make much sense the blend parameter. Am I making sense?

Thanks :)

Xesdeeni
2nd January 2003, 19:58
@scmccarthyIt is confusing to call something an artifact when it is working exactly as it is supposed to.Good point. Maybe I should say "interlacing is visible."When have been watching TV all our lives without complaining. Not until we see the new progressive TVs do we even see the problem with analog TVs.Actually, it's not until we had very large screens that we noticed it. People who have been dealing with large size video before consumers got around to it saw the visible interlacing first, and had to deal with it on their own.The only way to fix it is to toss out all our analog TVs. Or watch all movies on your computer screen.Technically, the progressive TVs, and even your PC CRT monitor (even LCDs) are analog devices (only the DLP is considered a purely digital display). All are progressive, however.

@onesoul So if one use doublerate=false, how do you get the same frame rate? By blending? If so I guess it doesn't make much sense the blend parameter. Am I making sense?Doublerate=false has the same output frame rate as the input. It's also the same field rate, so the results are identical in format (not content) to the original. As far as I know, this is only useful for improving the quality of compression. This is because compressing (for example) 60 fields that are 240 lines high is more difficult than compressing 30 frames that are 480 lines high (for most encoders). [The reason in general is that it is easier to get additional information for an existing frame than to start all over from scratch.] However, the resulting video now represents half as many "instants of time" as the input (e.g. 30 instants from a 60 field input), so it may not be as smooth for moving objects.

To do this conversion, we start with a single input field as the basis for a single output frame. Then we determine what to do for the other half of the output frame. If we find that a section of video is not moving, then we borrow the missing lines from the other input field. But if the video is in motion, we have to "make up" the missing lines somehow. When blend=false, we use the first input field and interpolate the missing lines just from this field. This is exactly the same as doing a 2x (linearly interpolated) vertical scale of the first field. This means that parts of the second field are actually thrown out when the video is in motion. When blend=true, we also add in some of the second field in order not to completely throw out the second field. [I think Gunnar and I agree that this may not be particularly useful.]

Xesdeeni

hakko504
2nd January 2003, 20:10
@Xesdeeni

Have you considered converting Smoothdeinterlace to YV12 for use in AviSynth2.5 yet?

onesoul
2nd January 2003, 20:35
@Xesdeeni

Understood. Many thanks for the explanations.
Maybe you could put that information at the plugin site, next to the blend setting saying it will use an interpolation when blend=false and doublerate=false (which are the default settings).

I already asked here but I would like to know your opinion of using smoothdeinterlace(blend=false, doublerate=false) with dv pal. Would you do it for seeing at tv?
Thanks

I'll try not to bother for a while (hope so) :D

Cheers

scmccarthy
3rd January 2003, 02:50
@Xesdeeni
No, the fields are actually sent sequentially. And (with the exception I noted above) the TV doesn't know anything about groups of fields called frames.
This thread was started by someone who wanted to use the same avi file for viewing both on a PAL TV and on his computer, the source being NTSC. I suggested to make the avi file progressive PAL, then sent the picture to the TV in interlaced form.

So am I right in assuming that the player can read a progrssive file and send it to the TV field by field? Or is it not possible to use the same file optimized for both purposes like that?

Stephen

onesoul
3rd January 2003, 03:14
Originally posted by scmccarthy
So am I right in assuming that the player can read a progrssive file and send it to the TV field by field? Or is it not possible to use the same file optimized for both purposes like that?

What kind of dvds we have? They are all in most progressive taking for example pal dvds which are 25 progressive fps (speeded 24 fps).
So the answer is yes it can.

ps: that's the reason why I asked before if I should deinterlace dv source since I would see less visible interlacing at the cost of not so smooth mooving objects as mentioned by Xesdeeni.

scmccarthy
3rd January 2003, 04:56
@onesoul

I am not talking about a DVD player, but a software avi player. If we are talking about reencoding NTSC DVD back to PAL DVD, then it is beyond me. Except that DVDs have flags in them to help DVD players to play back interlaced or progressive as needed and avi files do not have those flags.

Stephen

Xesdeeni
3rd January 2003, 15:56
@hakko504Have you considered converting Smoothdeinterlace to YV12 for use in AviSynth2.5 yet?:) Yes, I've considered it. I really don't have the time to tackle it right now, but I've been thinking about it so that once I find the time I can give it a try. The problem is that it may seem simple, but I think it will be a pain.

The issue isn't in the interlace detection, which will use the luma (Y) the same way as the 4:2:2 version does now, it's in the chroma (U and V) interpolation.

First: So that I'm always working with frames, if the input is fields, I use the Weave() or DoubleWeave() filters (depending on whether doublerate is false or true) to convert the fields to frames. But this is a Bad Thing for 4:2:0, because 1) there is additional overhead, and 2) this adds another interpolation step into the mix that will degrade the quality of the chroma. So I'll have to have two paths, one for fields and one for frames.

But worse: Then I have to interpolate (and/or blend) 4:2:0. This means I'll have to process two (or four) lines at a time, because I can't determine the output chroma until I've processed all the applicable pixels. I've already had to handle pixel pairs for the 4:2:2 implementation, which involved all four combinations (copy + copy, copy + interpolate/blend, interpolate/blend + copy, and interpolate/blend + interpolate/blend).

But it makes my head hurt to think about handling multiple lines, multiple pixels, and multiple paths all at the same time. I'm sure I'll get around to it eventually, but if anyone wants to take a stab at it in the mean time, they are welcome to give it a try :)

@onesoulI already asked here but I would like to know your opinion of using smoothdeinterlace(blend=false, doublerate=false) with dv pal. Would you do it for seeing at tv?No, I would not. I mentioned above that there is only one benefit that I could think of for converting interlaced video to the same frame rate as progressive, but I've thought of some others since then:

Reasons to convert interlaced PAL to progressive PAL:
1. If you are converting to film (by slowing 25fps to 24fps)
2. If you are converting to VCD (which is progressive, and deinterlacing will look better than either blending or throwing out one field)
3. To help compression (try other things first)
4. If all of the following:
--a. You want to view the video on both a PC and a TV
--b. You absolutely insist on using the same video file for both
--c. You don't want to allow the PC's software playback to do deinterlacing on-the-fly (the slowest machine I have access to is a 667MHz Pentium III, and it can decode full resolution MPEG 2 and do a decent job of deinterlacing using PowerDVD, which appears to use the Cyberlink MPEG decoder).

@scmccarthySo am I right in assuming that the player can read a progrssive file and send it to the TV field by field? Or is it not possible to use the same file optimized for both purposes like that?Absolutely, the player will output successive fields from the progressive source.

Xesdeeni

ppera2
3rd January 2003, 16:41
@Xesdeeni:

quote: "Interlaced is the way that TVs have been operating for 60+ years. As I mentioned above, interlacing provides a good compromise between smooth motion and high resolution for 1/2 the bandwidth of a progressive display."

Here I must too disagree. By all what I learned and read, and by my experiences interlaced way of displaying video by television is not implemented because of some need for smooth motion, but because that 25 or 30 progressive scan per second would cause terrible screen flashing (vibration, palpilation or what is correct English word).
24 fps is far enough for smooth motion, as is proved by films. But when some light source activates with so low frequency it is very bad to look into. Interlaced displaying virtually doubles scan frequency because scans whole display area twice fast than progressive, and therefore flashing is reduced to acceptable. But this way has couple downsides. Tiny horizontal lines will flicker, it is not compatible with film scan format etc. By normal video shots is very rare that we have tiny horizontal lines.
Do you remember old IBM monochrome monitors with long lighting phosphor? Cheap way against flashing.
Today is no problem to make monitors and TV's with high scan rates, and thank to digital technology we can do some conversions with good quality. So we can have 100 progressive scans per second, what is very good to eyes. But even then, when watching FILM we have only 25 frames per second, each repeated 4 times.

Yes, I saw how loosy loop looks by film projectors - therefore is delay of audio in some cases, but it has nothing with this video thread.

onesoul
3rd January 2003, 16:59
@ppera2

I appreciate the information you're posting but I don't think it contradicts what Xesdeeni has said. Read it again.

onesoul
3rd January 2003, 17:06
I posted this at the fluxsmooth thread but I wanted you all to read it and give your opinion.

AviSource("file.avi")
FixBrokenChromaUpsampling()
separatefields()
vid_e=selecteven()
vid_o=selectodd()
vid_e=convolution3d(vid_e,0,4,4,4,4,2.8,0)
vid_o=convolution3d(vid_o,0,4,4,4,4,2.8,0)
interleave(vid_e,vid_o)
weave()

This is a script suggested by bira using convolution3d with dv pal source.
I don't really understand why to selecteven and odd and applying the filter separately.
could it be something like:
...
separatefields()
fluxsmooth() (for example this filter or any other)
weave()

Thanks for the patience

scmccarthy
3rd January 2003, 17:09
Here I must too disagree. By all what I learned and read, and by my experiences interlaced way of displaying video by television is not implemented because of some need for smooth motion, but because that 25 or 30 progressive scan per second would cause terrible screen flashing (vibration, palpilation or what is correct English word).
Flicker.

You are missing his point ppera2. True interlaced sources have a different moment in time for each frame, so you get motion changing 50 or 60 times a second at half the bandwidth needed if each frame was displayed at once. Converting the source to progressive and then displaying it interaced on the TV gives you motion that changes only 25 or 30 times per second. So the motion would be less smooth on a TV.

24 fps is far enough for smooth motion, as is proved by films
Not according to 100fps.com

This is something that I knew I'd love to quote when I saw it. 100fps.com said that the reason motion in films looks smooth is because each frame has blurred motion the same as what you get when taking a photo of a moving car. Apparently movie cameras are made not to capture sharp images of moving objects just so the motion will appear smooth.

I've mentioned elsewhere that this suggests to me that a temporal smoother can be used to smooth out motion.

Stephen

sh0dan
3rd January 2003, 17:24
Originally posted by onesoul
This is a script suggested by bira using convolution3d with dv pal source.


I think I wrote it in the DV forum some time ago. Anyway the problem even and odd frames are processed separately is because there is a _temporal_ filter applied.

The reason you do separatefields is to avoid a spatial filter (blur for example) to blend the two different fields. That would mess up motion, when it is put back, and displayed interlaced.

What happends, when you do separatefields: (oframe = output frame, iframe = input frame)
oframe 0 = iframe 0 field 0
oframe 1 = iframe 0 field 1
oframe 2 = iframe 1 field 0
oframe 3 = iframe 1 field 1
...etc!

When you apply a temporal filter on these images, frame 0 field 0 will be blended with field 1.
The problem is that these two fields are _not_ the same place _spatially_. The first line in frame 1 is actually half a line below the first line in frame 0 (assuming tff).

If you look at an interlaced source, after a separatefields, it will jump up/down every frame.

The only way to avoid this is to make progressive frames in double framerate (just like smoothdeinterlacer), apply the filter and re-interlace the clip (50fps progressive to 25fps interlaced). That would actually give the best possible quality. But the method above is quite good.

onesoul
3rd January 2003, 18:11
Originally posted by sh0dan
I think I wrote it in the DV forum some time ago.
I think you are refering to this thread: http://forum.doom9.org/showthread.php?s=&threadid=41097
Originally posted by sh0dan
When you apply a temporal filter on these images, frame 0 field 0 will be blended with field 1.
The problem is that these two fields are _not_ the same place _spatially_. The first line in frame 1 is actually half a line below the first line in frame 0 (assuming tff).
Ok, thanks, now I understand why to selecteven and odd to apply the filter. But why is half line below and not 1 one line? and how do you resize an interlaced video then?
And since the tv receives the fields sequentially why not separate the fieds to the begining of first line?
Originally posted by sh0dan
The only way to avoid this is to make progressive frames in double framerate (just like smoothdeinterlacer), apply the filter and re-interlace the clip (50fps progressive to 25fps interlaced). That would actually give the best possible quality. But the method above is quite good.
With smooth deinterlace(doublerate=true) you would get 50 full frames per second. How would you deinterlace them back to 25 fps? Could you post a script?

sh0dan
3rd January 2003, 18:47
Originally posted by onesoul
Ok, thanks, now I understand why to selecteven and odd to apply the filter. But why is half line below and not 1 one line? and how do you resize an interlaced video then?

And since the tv receives the fields sequentially why not separate the fieds to the begining of first line?


ok - you need to understand how TV signals are made up.

Your TV shows 25 frames per second, but 50 fields per second. The two fields are shown at different times. That means your TV does like this:
Frame 1: (field 1)
draw line 1
draw line 3
draw line 5
[...]
draw last odd line
Frame 1: (field 2)
draw line 2
draw line 4
draw line 6
[...]
draw last even line
Frame 2: (field 1)
draw line 1

... you get the picture. (actually no pun intended ;) )

So what happends is that a TV camera takes 50 fields per second, but the second field lies inbetween the lines of the first field.


With smooth deinterlace(doublerate=true) you would get 50 full frames per second. How would you deinterlace them back to 25 fps? Could you post a script?
A quick shot would be:
assumeframebased()
doubleweave()
assumefps(25)

ppera2
3rd January 2003, 18:53
Well, discussion starts to be really interesting :-)

I think that flicker is not correct word. Flicker appears when displaying computer video on interlaced monitor (TV). Main reason is what I said bad displaying of tiny horizontal lines, where it is most visible. I don't know what is right word used in English world, probably flashing. Don't mix flicker with screen flashing caused by low scanrate. Screen flashing appears all time regardless of content, while flicker appears in situation when neighbour odd and even lines have many difference. Just remember your old C-64, Spectrum, Atari ST or Amiga. They had low vertical resulution to avoid flicker (Atari monochrome is except. it worked only on monitor with progressive scan). Amiga had problems with flicker in higher vert. resolutions.

I talked here about reasons which lead some 60 years ago to implementing interlaced video by TV's. I didn't say that 50 fps is not better than 25. But it's hard to believe that someone then had ambitions to have TV broadcast at 50 or 60 fps. This virtually double 'framerate' (better would say fieldrate) is just result of interlaced way. I wouldn't bet that picture quality is better than progressive 25 fps. But progressive 25 fps in that time wasn't possible at acceptable scanrate. Solution came much later, and main thing is storage of video and displaying at higher scanrate.

Motion blur: blur on shots depends from 2 things: speed and time of exposition. When you shot bright scene, exposition time can be very short, and blur will be smaller. It reminds me on one thing by old 'tube' (vidicon?) TV cameras - bright motion left very visible trace on screen because of slow discharge.

About 100fps. I didn't see such equipment, so I can't say nothing. It's probably good for very fast motion.

onesoul
3rd January 2003, 20:39
@sh0dan
What do you mean by draw last odd (even)?

I'm not sure you understood my question. What I was asking is that if the tv takes the second field and starts drawing as the 2nd, 4th,... of frame 1 then this same second field wouldn't need to be half line below relating to the first field.

So why can't we produce separatefields with interlace source with the same results as with progressive source since the tv would grab the fields and display it correctly.

I'm almost sure something is missing in my knowledge (ignorance).

scmccarthy
3rd January 2003, 20:43
@ppera2

Movie cameras deliberately produce motion blur, because 24 frames per second is not enough for smooth motion. Without the blur, when you see a movie in a movie theater, the motion would always looks jerky. Your point was that movies prove that 24 fps is enough, but that is not true, it is not enough for smooth motion. The website 100fps.com explains this. That's a great site to visit.

By flicker, do you mean shimmer, as in bob filters cause shimmering. Here's a quote from my Windows Help:A higher refresh frequency reduces any flicker on your screen, but choosing a setting that is too high for your monitor can make your display unusable and cause damage to your hardware.
I think that settles it, since I trust that more than I trust myself even though I am a native English speaker. That is how I learned that Beendet is how you say quit in German, even though it means finish. Context it the only sure guide.

Stephen

ppera2
3rd January 2003, 21:32
@scmccarthy

I explained what causes blur. It appears by video cameras too, and fps is not so relevant as time of exposition (how long is objectiv opened for each frame or field).

Yes, flicker is similar to shimmer, and termin flicker is used by TV out of videocards (not my idea). But you must understand that human eye is much mor sensitive on flashing than on movement.

Of course that by higher refresh rates flicker is less visible, but we can't raise refresh rate of our analog televisions. I don't have problems with flicker or shimmer on my monitor, and not because of very high scanrate but because of progressive scanning. And please, don't refer here Win help, because it is B.S. - I never found anything useful there.

Beendet is past in German. Should say beenden, and yes, it is finish, not quit, perhaps precisely finishing (finish would be beende). No, I'm, not German, but know something.

I visited 100 fps com. There is same thing what Xesdeeni says. I don't see there 100 fps, just 50 fps - what disappointment :D .

Here is one link about screen flashing: http://www.physlink.com/Education/AskExperts/ae473.cfm

so, it looks that I choosed right word.

^^-+I4004+-^^
3rd January 2003, 23:13
few misunderstandings here,it seems,so let me try:
[starting from bottom]

>Movie cameras deliberately produce motion blur, because 24 frames per second is not enough for smooth motion. Without the blur, when you see a movie in a movie theater, the motion would always looks jerky. Your point was that movies prove that 24 fps is enough, but that is not true, it is not enough for smooth motion. The website 100fps.com explains this. That's a great site to visit.

why do you need that site at all?
interlacing is not that hard,nor is motion itself :

movie cameras (for sure) have same shutter speed
for particular scene ie. film is exposed for same amounts of time for each frame.....
therefore movie cameras DON'T deliberately produce motion blur.....it's side-effect.........

so why does it happen then ?
let us consider that "motion event" for brief :
duration is 1 frame (time that's needed to expose 1 frame of film to the light ie. to the movie scene ) , scene is VERY FAST ( for better
understanding ) --->the exposure STARTS........
....piece of light is captured....[shutter stil opened,exposure for that particluar frame continues...]...camera moves in one direction
violently....[still same frame, exposure lasts]...another piece of the scene/light is captured (to the SAME FRAME mind you!!!)......camera moves again...[ shutter stil opened,same frame as in few lines above ]...another addition to the scene....---->the exposure ENDS [and new piece of film comes...new frame ...etc.]

now what do you think resulting frame will look.....it has some pseudo multiple exposure look to it.... in other words long exposure look.. (like in photography when same piece of film is exposed several times for special effect or even better: when you leave shutter opened for longer time--->many time fragments are capttured to same film frame!!! i'm sure everyone saw that kind of photos...the ones that have "snake-like" car headlights/rearlights
etc. )

therefore...motion blur occurs because film can't be exposed to the lite for the infinite short period: because exposure lasts some time,one frame will contain "extended exposure artefacts"(blur)......the higher the motion the more it occurs....( if anyone can append or correct my explanation he's welcomed....i haven't read this anywhere,i just spent last few minutes thinking about it.......hehe )


also 24fps is QUITE enough for smooth motion!
it's the OTHER consideration how sharp/unsarp will film frames look at particular shutter speed ie.exposure time.....
1000fps recording and playback will give sharper images even with
hi-motion,but......it's not needed really.....24fps has just about perfect motion feeling for any purpose really......
if your eyes were at that distance and at that speed (relative to the object they observe) they blur too,don't they (move your head fast from left to right....did you saw sharp image(s)? i didn't ! )?


>I'm not sure you understood my question. What I was asking is that if the tv takes the second field and starts drawing as the 2nd, 4th,... of frame 1 then this same second field wouldn't need to be half line below relating to the first field.

yes secdond field does need to be in DIFFERENT spot!
the thing you explain here would have half the normal tv resolution and the adjacent fields would be mixed into one (talking about the blended
fields..hehe)
why do we separate fields in time AND space?time division should be
understandable by now...
and in space you have to separate them so that 2 fields (in viewer's eye) will make 1 complete image (with full resolution)
eyes can't diferentiate field 1 from field 2 (50hz flicker is invisible),and they just mix them together...and you see image that has 2xfield resolution
(clever or what? our grandfathers knew how to save bandwidth! LOL!)
if you don't separate them, but project one field on top of previous one,then you have only 1x field resolution , and mixed fields too..(tv tube phosphor wouldn't like another electron beam on it while still being lighten up from previous field)

the thing you describe is esentially lo-res progressive stream.......no one want's that really!

>So why can't we produce separatefields with interlace source with the same results as with progressive source since the tv would grab the fields and display it correctly.

[added afterwards:we can with mpeg2 or any codec that has advanced schemes of coding interlaced content..as i'll mention later...]


this one's really hard to answer because question is not posed in correct
way: and shodan introduced some havoc here too with introducing "frame
concept" to tv technology.....there are NO frames in tv technology!
there are only FIELDS!
(read up on Xesdeeni's stuff in this very thread...he explained it
beautifully ! )
but just to paraphrase : tv can't see ANY FRAMES
it sees only fields!
also --> you can view video signal as one long uninterrupted line that is being drawn on the tube : line1,3,5,7....(that's field1)
line2,4,6,8...(that's field2).........
between the lines and the fields are sync signals that are used to control electron gun inside the tube (ie. to sync the video so it doesn't roll(loosing v-sync) or diagonal lines appear instead of image ( loosing h-sync) )

only (AND ONLY) in special occasion you can reconstruct progressive frames

from tv signal:
it's the case when tv transmitts film content
(film content can be considered progressive ,and during conversion indeed is
scanned in progressive
manner...)
then you have fields but they originate from one film frame therefore you can reconstruct that when you capture film content OTA (capturing tv signal)....

all other stuff (all kinds of live tv,electronically recoded material is also interlacing native) is interlaced---> there is no progressive content to save--- every field is ANOTHER instance of time and ALL you can do is
a)put it to mpeg2 in that way and play it back (on dvd or tv-out) to tv and
all is well!
you see no interlacing because mpeg2 has both fields in one frame and can play them back SEPARATELY(!)...therefore tv "sees" normal interlaced content
and is happy with it...

b)deinterlace the interlaced (combed) tv content.....this is worse solution
as you must loose something-->you loose fields if you do
"interpolation" (not quite loose but original fields are replaced by "mean values"..and that's not quite it but it's acceptable)
you can alternatively "blend fields"...this mixes 2 fields to one frame...and
it's not quite it either..(as there's no 50hz frequency of content,but
25,fields are not completely separated but stucked together etc.)..some of
users will argue that this way will produce smoother motion (and it sounds
logical...) but far away from the source..offcourse....(try blend OR
interpolate on auto/moto-race.......it's not real fluent motion anyhow..)
i won't get into 50fps plb on pc because i think it's not worth it....(and i
have poor cpu...LOL!)

also quick note on original post....
sure it's impossible to have nice pal progressive stream from ntsc interlaced video.......same as it would be hard to get nice ntsc progressive from interlaced ntsc!
(only this case is a bit tougher in addition...)

hope this long essay helped someone....
sure as hell it helped me as some new ideas occured while writing it

cheers

Ivo

PS. my god some of you guys really complicated this stuff to the max!
first you have to know exactly how interlaced tv display works (use the net)
then you might use that knowledge on the digital video......
on the bottom of this issue:
PC's are progressive displays for reasons that they really need that extra sharpness and precision for text etc....(let me tell you:win desktop looks
like shit on tv-out....it's blurry,interlace twitters...etc.)
tv's are interlaced for historic reasons.....
these two don't mix in nice way!

scmccarthy
3rd January 2003, 23:48
OK, this is the page I am talking about:www.100fps.com/how_many_frames_can_humans_see.htm (http://www.100fps.com/how_many_frames_can_humans_see.htm)
And this is the relevant quote from that page:To have a perfect illusion of everything that can flash, blink and move you shouldn't go below 500 fps. So 24fps is not even close to fast enough. And this is the explaination of why movies do not look jerky:Now take your hand and move it slowly in front of your face. Then move it faster until it's blurry. How many frames per second do you see? It must be little, because you see only a blurred hand without being able to distinguish every change per millisecond, but it must be many, because you see a fluid motion without any interruption or jump. So this is the eye's trick in both examples: Blurring simulates fluidity, sharpness simulates stuttering. and this:The fact is that the human eye perceives the typical cinema film motion as being fluid at about 18fps, because of its blurring. My point in all this remains the same: don't think that because film is 24 fps that that would be good enough for Television. The factors that go into developing standards like film and Television are more complex than you would think.

Stephen

onesoul
4th January 2003, 02:46
Originally posted by ^^-+I4004+-^^
yes secdond field does need to be in DIFFERENT spot!
the thing you explain here would have half the normal tv resolution and the adjacent fields would be mixed into one (talking about the blended
fields..hehe)
I've already understood somehow how tv display frames or fields.
My big doubt here could not yet be explained, I'm going to try to point it out with more accuracy:

Tv handles fields like this: takes first field and displays it as every even line, then takes second field and displays it as every odd line. So what you are saying about displaying half the tv resolution is not true. Refer for an example to the guide doom9 has made: http://www.doom9.org/video-basics.htm
But even there my doubt persists because if tv is going to "grab" the first line of the second field and starts displaying as the first odd line, so why does have the second field to be lower comparing to first field when doing a separatefields()?

edit: I am starting to feel like the guy at twilight zone where everything around looks different and he's the same. I am going crazy here, I think I'll stop watching tv, I only see fields now, one up one below... wait a minute I already stopped watching tv...

edit2: A man/woman isn't measured by the size of his/her post. Sorry ^^-+I4004+-^^ :p , I couldn't resist :)

^^-+I4004+-^^
4th January 2003, 03:18
@scmccarthy
&onesoul :
this stuff got you really out of shape and all over the place...
first you must know how analog tv works (don't use 100fps as a reference....instead i think this forum can provide better answers and links...use search.....)
i thought you knew the basics ,but it seems i was wrong.....
(and i thought Xesdeeni was clear enough on the subject....)
you can find any better book on tv technology (b/w television interlaces in same way as modern color tv....) which will show you exactly why stuff happen.........

it's not mystery and stuff happens exactly as guys on this thread described (be sure that Xesdeeni made no terminology mistakes....)

it's no mystery how will one achieve interlace and "one field lowering"....it's easy when you bring back electron beam to the right spot to start with....(i guess that mechanism is confusing you and you think it can't be done?)
i said it would be half the resolution if the other field wasn't shifted downwards but projected in the same spott where the first one was projected....
(i have been describing completely analog phenomenons:analog interlaced tv,and movie camera...don't think in the "separattefields()" terms but first understand analog tv!)

if you do separatefields(),then off course..........huh...oups.....sorry but i just can't do it....

i feel like blowing in the wind.......

good nite........

onesoul
4th January 2003, 03:48
Originally posted by ^^-+I4004+-^^
if you do separatefields(),then off course..........huh...oups.....sorry but i just can't do it....

Maybe this thread is not for you then. Because if you read it carefully I never said that different fields would/should be at the same spot when displayed at tv, I was talking about how video is stored and of ways of handle it.

edit: humbleness is the most appreciated virtude in a man/woman.

ppera2
4th January 2003, 12:05
@Onesoul:
TV first draws odd lines and then even lines. First field is top. You are probably confused by bottom field first by DV.

When you say that TV grabs or takes field is very confusing. It not takes and displays... It sounds like that it has some storage, buffering - what is not case except by digital TV's. Input video goes practically direct to CRT after amplifying, color separation etc.
Syncro signals are 'charged' to ensure correct position and field order.
quote:
"But even there my doubt persists because if tv is going to "grab" the first line of the second field and starts displaying as the first odd line, so why does have the second field to be lower comparing to first field when doing a separatefields()? "
Therefore we have field order information.

So looks it by standard TV interlaced video:

http://www.pootnik.com/zam/LetA_F.gif
http://www.pootnik.com/zam/LetA_1.gif
http://www.pootnik.com/zam/LetA_2.gif

@^^-+I4004+-^^
Too long posts, messy explanations.
quote
"also quick note on original post....
sure it's impossible to have nice pal progressive stream from ntsc interlaced video.......same as it would be hard to get nice ntsc progressive from interlaced ntsc!
(only this case is a bit tougher in addition...) "
Very wrong. And why is harder to make deinterlace than deinterlace+framerate conversion ???
O'ladi malo :-)

onesoul
4th January 2003, 16:18
@ppera2
The thing about odd and even lines is a question of nomenclature, actually at avisynth the even lines are like 0, 2, 4,... so the first line displayed would be then the even line. But then again is a question of nomenclature.

^^-+I4004+-^^
4th January 2003, 16:42
>@^^-+I4004+-^^
Too long posts, messy explanations

so you think onesoul now gets it (after your explanation and few pix)?hmmmm.....
onesoul,i can't get your question?
what is confusing you?
who confused you,what post?
if you explain a bit better perhaps someone will help you...
capture card grabs both fields and puts them into 1 frame
i guess that's ok with you?
shodan was talking about the ways temp.smoothing should be used on interlaced material
to keep that interlacing...
i hope you got that too(?)
2nd field is shifted?
well it's not really if you use sep-field()
vd or wmp will show you only one field at the time
and both have same position when displayed on the screen
because they are now showing fields but with no spacing between the lines....so it has 312,5lines for the pal (ok,not exactly 312,5 but less because not all lines are visible etc.)
and i still cannot answer the question if i have to guess the question itself (i think no one will)
explain a bit better if you wan't proper answer.....
(you don't have to be short!hehe)
messy answers for messy questions:why do you think you didn't get proper answer?
there are many people here perfectly capable of answering that sort of questions.......given that they understand it first!
and i see you're dragging this issue for some time now....
take your time and explain first what's the problem....

>(only this case is a bit tougher in addition...) "
Very wrong. And why is harder to make deinterlace than deinterlace+framerate conversion ???

[and do you get interlacing at all?LOL!
and i have said that it's harder to do deint+fps...("this case" means your case with deint+fps conversion and it's tougher!..sorry for that confusion) ]

how can you ask that after all that's been said here?
ntsc->pal must discard or merge some fields/frames (30->25)
how on earth will that look right for fast motion scene?
when you DON'T do fps conversion deinterlace still destroys motion...
( note the sentence above: deinterlacing ALONE destroys the motion! )
if it's so easy and nice,why have you posted this thread at all?
it can be better or worse.....but it CAN'T BE DONE RIGHT!
that's what i'm saying.....doing it right is keeping it interlaced and displaying it on interlaced display..nothing more nothing less....
(and more and more european market tv's have ntsc input,so use it...)
i hope you're not doing moto races that way ? (hehe)

>O'ladi malo :-)


aa eee.......(heh)

onesoul
4th January 2003, 20:00
Originally posted by ^^-+I4004+-^^
shodan was talking about the ways temp.smoothing should be used on interlaced material to keep that interlacing...
2nd field is shifted?
well it's not really if you use sep-field()
vd or wmp will show you only one field at the time
and both have same position when displayed on the screen

I think you are missing something here which leads to the point I was trying to clarify. (You should read more carefully my question and the answer that sh0dan gave which is absolutly correct.)
Originally posted by sh0dan
If you look at an interlaced source, after a separatefields, it will jump up/down every frame.

So for the last time what I was asking was, why should be the fields stored at diferent positions?
If you do separatefields() at a progressive source the image won't shift up and down and will be displayed also at half resolution.

neuron2
4th January 2003, 20:28
Originally posted by onesoul
So for the last time what I was asking was, why should be the fields stored at diferent positions?I'll have a go at this.

When you separate fields, you also halve the vertical size. So a line at position n wants to go to n/2. For the even lines, 0, 2, 4, ..., there is no problem; they can be placed at the correct position in the output frame. But for the odd lines, 1, 3, 5, ..., there is a problem; you can't place the lines at 1/2, 3/2, 5/2, etc. Lines are integral things. So it is simply not possible to place the odd lines into a new frame without shifting them by half a line.

If you do separatefields() at a progressive source the image won't shift up and down and will be displayed also at half resolution. Not true! See above and/or perform a simple experiment.

ppera2
4th January 2003, 21:30
Originally posted by onesoul

So for the last time what I was asking was, why should be the fields stored at diferent positions?
If you do separatefields() at a progressive source the image won't shift up and down and will be displayed also at half resolution.

Fields are not same - by progressive it is shot in same moment but position is not same. You will get shimmer by static video too - even more visible.
See 3 small pictures what I posted and you will see what we talk about.

onesoul
4th January 2003, 22:39
Thak you all for putting up with me. neuron2 has answered my question, thank you.

Originally posted by neuron2
When you separate fields, you also halve the vertical size. So a line at position n wants to go to n/2. For the even lines, 0, 2, 4, ..., there is no problem; they can be placed at the correct position in the output frame. But for the odd lines, 1, 3, 5, ..., there is a problem; you can't place the lines at 1/2, 3/2, 5/2, etc. Lines are integral things. So it is simply not possible to place the odd lines into a new frame without shifting them by half a line.
And sh0dan, I got the picture ;)
Now I'll buy all of us some drinks :)

neuron2
4th January 2003, 23:13
Originally posted by onesoul
Now I'll buy all of us some drinks :) Make mine Glenfiddich Special Reserve on the rocks.

^^-+I4004+-^^
4th January 2003, 23:17
>If you do separatefields() at a progressive source the image won't shift up and down and will be displayed also at half resolution.

sure fields WILL shift up/down...even for progressive source!
so you couldn't even give a try ( to-> sep.fields() and complementparity() (if needed) etc.) which would explain all to you?

most of the interlacing questions can be solved/illustrated by separatefields() and sometimes you need to add complementparity() etc.

nevermind,you got it now....(i hope....hehe)

onesoul
4th January 2003, 23:28
Originally posted by neuron2
Make mine Glenfiddich Special Reserve on the rocks. You got it.
Bartender, two Glenfiddich Special Reserve on the rocks.

neuron2
5th January 2003, 00:32
Originally posted by onesoul
You got it.
Bartender, two Glenfiddich Special Reserve on the rocks. You have good taste, onesoul.