Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
5th November 2010, 15:57 | #1 | Link |
Registered User
Join Date: Sep 2006
Posts: 10
|
Interlacers - high quality
Hi!
Are there any (high quality) interlacing programs (scripts, algorithms) available? (besides the trivial "drop every second line", of course) I mean a "box" that takes progressive video as input and "spits out" interlaced video as output. It is for some research I will be doing (private). Regards, David |
6th November 2010, 11:28 | #4 | Link |
Registered User
Join Date: Sep 2006
Posts: 10
|
Thanks, but:
- SeparateFields assumes the input is already interlaced, just packed into frames What I search for is something that takes for example 60p and outputs 60i. - Weave is the opposite of interlacing. - Trim(1,0) just drops the first field of the clip. (according to the wiki) |
6th November 2010, 12:07 | #5 | Link |
Moderator
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
|
You said you wanted to interlace a progressive video. If you'd stop writing gibberish and try that simple script you'd see that's exactly what it does.
If by 60i you mean 30 interlaced frames per second, then: AssumeTFF() SeparateFields() SelectEvery(4,0,3) Weave() And if that's what you meant, then you should have said so to begin with. You said nothing about changing the framerate. Last edited by manono; 6th November 2010 at 12:11. |
6th November 2010, 12:36 | #6 | Link |
Registered User
Join Date: Sep 2006
Posts: 10
|
Because I did not want to change the framerate.
That idea was suggested by others. What I want is written in the first post quite nicely. I also repeat one part that obviously nobody read: (besides the trivial "drop every second line", of course) Every programmer can write a program to drop every second line in a minute. Now, can we please start over? Maybe with an example: I have a 10 second progressive video with 60 FPS. That means (in case I wrote gibberish again) every 16.667 ms a picture of the subject is taken. 600 in total. Now I want to broadcast the footage over TV (20-30 years back in time, when 60 fields per second interlace was the only option). So how do convert the data (read: convert, not rearrange. The output must be a sequence of fields) ? Besides method 1 "Drop every second line in each frame" (alternating between even and odd lines, obviously). So what would be method 2 (and 3 etc.) ? Last edited by xerces8; 6th November 2010 at 12:42. |
6th November 2010, 13:13 | #7 | Link |
Moderator
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
|
Nope, none of your posts until the most recent one were the least bit clear. And if you had fooled around with the script yourself you could have figured it out for yourself. What do you think a field is but every other scan line of a frame? Take my last script and leave out the last line and then see if it's what you had in mind:
AssumeTFF() SeparateFields() SelectEvery(4,0,3) Until you change the rules again next time. |
6th November 2010, 13:18 | #8 | Link |
Registered User
Join Date: Sep 2006
Posts: 10
|
Nope, I wont change anything, I will just repeat the same thing for the third time: I already know the method of dropping half and retaining the other half as is. (It is trivial and obvious. Everyone knows it.)
If there is no other method you know, then let's just wait for someone who does. Deal? |
6th November 2010, 14:30 | #10 | Link | |
Derek Prestegard IRL
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,988
|
Take a look here:
http://svt.se/content/1/c8/02/02/85/...format_v10.pdf Specifically the part that has to do with how their 2164p50 sequence was interlaced to 1080i50 Quote:
Code:
separatefields.selectevery(4,0,3).weave Derek
__________________
These are all my personal statements, not those of my employer :) Last edited by Blue_MiSfit; 6th November 2010 at 14:33. |
|
6th November 2010, 14:47 | #11 | Link | ||
Registered User
Join Date: Sep 2006
Posts: 10
|
Quote:
Quote:
SelectEvery - drop some frames/fields thru the clip Trim - drop frames/fields at begin and/or end of clip Weave - combine two and two fields into a frame What do you think is missing? |
||
6th November 2010, 15:01 | #12 | Link |
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
Code:
function interlace(clip c, bool "bff", float "lowpassing") { bff = default(bff, false) lowpassing = default(lowpassing, 0.75) width = c.width height = c.height low_height = round(height * lowpassing) downpassed = c.lanczosresize(width, low_height).lanczosresize(width, height) return (bff ? downpassed.assumebff : downpassed.assumetff).separatefields.selectevery(4,0,3).weave }
__________________
|
6th November 2010, 17:49 | #13 | Link | |
Registered User
Join Date: Sep 2006
Posts: 10
|
Quote:
2.) Are the files (or part of them) available for download? |
|
6th November 2010, 18:01 | #14 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,346
|
The pdf gives a link where you can download the 16-bit 4:4:4 SGI samples
http://www.its.bldrdoc.gov/vqeg/ ftp://vqeg.its.bldrdoc.gov/HDTV/SVT_MultiFormat/ You can download some of the other versions here http://media.xiph.org/video/derf/ |
6th November 2010, 21:22 | #15 | Link | |
Registered User
Join Date: Feb 2006
Posts: 823
|
Quote:
|
|
6th November 2010, 21:50 | #16 | Link | |
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
Quote:
__________________
|
|
7th November 2010, 04:19 | #17 | Link |
Derek Prestegard IRL
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,988
|
Interesting, I thought this might spark some good discussion!
I'm interested to see how a traditional "drop fields" approach compares to this more comprehensive approach with extremely detailed content. Not that I often deal with double-rate progressive sources, but still! Am I correct in assuming that a process like this is designed to minimize flicker / "single field detail" that will look ugly on a proper interlaced CRT or on a progressive display, even with a competent deinterlacer? Derek
__________________
These are all my personal statements, not those of my employer :) |
8th November 2010, 13:50 | #18 | Link | |
Registered User
Join Date: Dec 2002
Location: UK
Posts: 1,673
|
Quote:
It's an intentionally sub-optimal way which mimics the way they think some cameras might do it. manono has already given the right answer. As subsequently discussed, the only "improvement" is vertically blurring the image before you start, to reduce twitter on interlaced CRTs. There's plenty of discussion of this in the various HD>SD threads, e.g. http://forum.doom9.org/showthread.php?t=139102&page=6 My own preference (after trying more complicated solutions) is... PHP Code:
mp4guy has a filter to do a much sharper cut-off (in the frequency domain) here... http://forum.doom9.org/showthread.ph...70#post1165270 ...but I don't like the ringing (or the sharp frequency cut-off for that matter). Hope this helps. Cheers, David. |
|
9th November 2010, 16:03 | #19 | Link |
Registered User
Join Date: Feb 2004
Posts: 1,348
|
If your going to use a strong lowpass, this is probably better. However, I don't use interlaced displays, so I don't really know.
Code:
Function BlurV(clip c, int "rad", Float "CW") { Rad = Default(rad, 1) CW = Default(CW, 0.5) Center = C Down = C.PointResize(C.width, C.height, 0, -rad, C.width, C.height) Up = C.PointResize(C.width, C.height, 0, rad, C.width, C.height) Average(Center, CW/2, Down, (1-CW)/2, Up, (1-CW)/2, Center, CW/2) Return(last) } Function NLLV(Clip C, int "rad") { Rad = Default(Rad, 1) B1 = C.BlurV(1*rad, 0.439) B2 = C.BlurV(3*rad, 0.833) B3 = C.BlurV(5*rad, 0.934) B4= C.BlurV(7*rad, 0.983) B1_D = Mt_Makediff(B1, C, u=1, v=1) B2_D = Mt_MakeDiff(C, B2, u=1, v=1) B3_D = Mt_MakeDiff(B3, C, u=1, v=1) B4_D = Mt_MakeDiff(C, B4, u=1, v=1) B2_DT = Mt_LutXY(B1_D, B2_D, " X 128 - Y 128 - X 128 - abs Y 128 - abs * 1 + * X 128 - abs Y 128 - abs * Y 128 - abs 2.273 * X 128 - abs - 0 > Y 128 - abs 2.273 * X 128 - abs - 0 ? X 128 - abs 0 > X 128 - abs -1 X 128 - abs 0 > X 128 - 1 ? / ^ 1 ? / 1 * + 1 + / + 128 + ", u=1, v=1) B3_DT = Mt_LutXY(B2_DT, B3_D, " X 128 - Y 128 - X 128 - abs Y 128 - abs * 1 + * X 128 - abs Y 128 - abs * Y 128 - abs 2.67 * X 128 - abs - 0 > Y 128 - abs 2.67 * X 128 - abs - 0 ? X 128 - abs 0 > X 128 - abs -1 X 128 - abs 0 > X 128 - 1 ? / ^ 1 ? / 1 * + 1 + / + 128 + ", u=1, v=1) B4_DT = Mt_LutXY(B3_DT, B4_D, " X 128 - Y 128 - X 128 - abs Y 128 - abs * 1 + * X 128 - abs Y 128 - abs * Y 128 - abs 2.9 * X 128 - abs - 0 > Y 128 - abs 2.9 * X 128 - abs - 0 ? X 128 - abs 0 > X 128 - abs -1 X 128 - abs 0 > X 128 - 1 ? / ^ 1 ? / 1 * + 1 + / + 128 + ", u=1, v=1) Mt_AddDiff(B4_DT, C) Return(last) } NLLV() mt_convolution(horizontal=" 1 ", \ vertical=" 0.000001065433025438 -0.000016063451766901 0.000104412436485276 -0.000360697507858256 0.000574268400669151 0.000417649745941195 -0.003967672586441010 0.007304608821868880 -0.000365443527698423 -0.023179560899734431 0.041660562157630920 -0.003967672586440983 -0.118038259446620930 0.269801735877990670 0.660062134265899660 0.269801735877990670 -0.118038259446620930 -0.003967672586440983 0.041660562157630920 -0.023179560899734431 -0.000365443527698423 0.007304608821868880 -0.003967672586441010 0.000417649745941195 0.000574268400669151 -0.000360697507858256 0.000104412436485276 -0.000016063451766901 0.000001065433025438", u=3, v=3) |
Tags |
interlace |
Thread Tools | Search this Thread |
Display Modes | |
|
|