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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Capturing Video

Reply
 
Thread Tools Search this Thread Display Modes
Old 2nd September 2008, 21:23   #1  |  Link
RjBeals
Resu Deretsiger
 
RjBeals's Avatar
 
Join Date: Nov 2006
Location: SC, USA
Posts: 31
Who can produce good quality with this file?

raw_capture_30sec.avi[256MB]

Okay...
I have a request.. well - more like a challenge

I have a Sony Handycam that records on hi-8 8mm tapes. I have a lot of footage that I am capturing, that I would like some help with. I've been playing around with avs scripts trying to get the cleanest video possible, but am having a hard time. I would like video to be deinterlaced, and an average frame size of like 592 x 292 or something close. The footage is captured at 720 x 480.

I have 2 goals:
1) I will edit my raw capture with VirtualDub by just cutting away clips. Then direct stream copy output. Then Use a third party MPEG encoder to give me a DVD compatible format. I am okay with the process I use for this.

2) That same raw caputre, I want to edit via an avs script to clean it up, and ouput as a xvid, so I can keep backups on my computer. As usual, smaller file size, with good quality is my goal. I can't seem to get this though.

---------------------------------------------------
What I capture with:
Computer: Pentium-4 w/ 3.2GB Hyperthread processor / 1GB Ram
Capture Card: Kworld atsc-110 Philips Chip.
Using VirtualVCR to capture though S-Video, 720x480, compressing using HuffYUV lossless codec. 29.97 FPS.


My AVS Script:
Code:
LoadPlugin("C:\Program Files\AviSynth 2.5\filters\TDeint\TDeint.DLL")
AVISource("C:\Documents and Settings\...\capturefile.avi")
TDeint()    
FadeIO2(30) 
Lanczos4Resize(584,424)
Crop(8, 8, -8, -8) 
Tweak(hue=-6.1, sat=1.0, bright=-13, cont=1.1, coring=true, sse=false)

I've been told I need to correct the fields, using the below script, but I don't see a difference really so I don't use it.. Should I?

complementparity
separatefields
AssumeFieldBased
bob()


If anyone, anyone at all can help me write a script to this, I would be forever in your debt. And my family would be sooo happy as well.
__________________
For a Minute.... I Lost Myself

Last edited by Guest; 2nd September 2008 at 21:44.
RjBeals is offline   Reply With Quote
Old 3rd September 2008, 05:02   #2  |  Link
yup
Registered User
 
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
Hi RjBeals!
First off all before deinterlacing you need denoising. I for my analog capture use MVDegrain2i function from MVTools plugin, work slowly but get good result.
yup.
yup is offline   Reply With Quote
Old 3rd September 2008, 09:18   #3  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,988
Is there any particular reason you want to deinterlace?

You can pick between

A) Leaving it interlaced, and bobbing to 60p on playback
B) Deinterlacing to 30p (easy, loses half the temporal resolution / motion fluidity)
C) Deinterlacing to 60p (slower, more bitrate needed versus pure interlaced)



~MiSfit
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 3rd September 2008, 13:13   #4  |  Link
RjBeals
Resu Deretsiger
 
RjBeals's Avatar
 
Join Date: Nov 2006
Location: SC, USA
Posts: 31
yup - I have tried some denoisers, but haven't gotten good results. There's so many to choose from, and so much tweeking - i probably just didn't hit the right one yet.

Blue Misfit - Deinterlacing looks better on my computer, which is where I want to backup my files. 60FPS seems to put a strain on my processor. Of the 3 options you listed - I would think B is the best option?
__________________
For a Minute.... I Lost Myself
RjBeals is offline   Reply With Quote
Old 3rd September 2008, 13:30   #5  |  Link
yup
Registered User
 
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
RjBeals!
You try MVDegrain2i function? If You do not satisfy try increase thSAD to 800 or even to 1200.
yup.
yup is offline   Reply With Quote
Old 3rd September 2008, 13:43   #6  |  Link
RjBeals
Resu Deretsiger
 
RjBeals's Avatar
 
Join Date: Nov 2006
Location: SC, USA
Posts: 31
yup - I'm trying it right now Thanks for the tip. I've never heard of the mvtools functions for avisynth - but they do sure seem to be involved. I'll post results later on. I'm still curious as to what other info people may be able to provide, as I've never really figured out the best way.
__________________
For a Minute.... I Lost Myself
RjBeals is offline   Reply With Quote
Old 3rd September 2008, 15:09   #7  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: UK
Posts: 1,673
You're doing this...
Quote:
Lanczos4Resize(584,424)
...on the way to...
Quote:
a DVD compatible format
?!?!?!?!?

Cheers,
David.
2Bdecided is offline   Reply With Quote
Old 3rd September 2008, 15:50   #8  |  Link
RjBeals
Resu Deretsiger
 
RjBeals's Avatar
 
Join Date: Nov 2006
Location: SC, USA
Posts: 31
Quote:
Originally Posted by 2Bdecided View Post
You're doing this...
...on the way to...
?!?!?!?!?

Cheers,
David.

No... I'm creating the 720x480 in a different step. I'm fine with the method I use for DVD's.

Now, I'm trying to get the same source capture into a small xvid for my computer hard drive (and perhaps blip.tv or youtube). I've been trying different aspects to see what looks best.
__________________
For a Minute.... I Lost Myself
RjBeals is offline   Reply With Quote
Old 3rd September 2008, 16:16   #9  |  Link
RjBeals
Resu Deretsiger
 
RjBeals's Avatar
 
Join Date: Nov 2006
Location: SC, USA
Posts: 31
Quote:
Originally Posted by Blue_MiSfit View Post
A) Leaving it interlaced, and bobbing to 60p on playback
Can anyone explain this just a little more? The Pro's? why would I want 60 progressive frames for an xvid? How would i do this?
__________________
For a Minute.... I Lost Myself
RjBeals is offline   Reply With Quote
Old 3rd September 2008, 16:48   #10  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
The pro is that it preserves the full temporal resolution of your clip while still making progressive frames.

You do it by using an Avisynth bob filter, of which there are many. E.g., Bob(), DGBob(), MVBob(), sbdeint(), etc., etc.
Guest is offline   Reply With Quote
Old 3rd September 2008, 17:27   #11  |  Link
RjBeals
Resu Deretsiger
 
RjBeals's Avatar
 
Join Date: Nov 2006
Location: SC, USA
Posts: 31
Okay - here's the best I could do on the above clip.

Code:
LoadPlugin("C:\Documents and Settings\bealr0sp\Desktop\Downloads\mvtools-v1.10.2.1\mvtools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\filters\TDeint\TDeint.DLL")
source = AVISource("C:\Documents and Settings\...\capture_30sec.avi")

#-----------------DeGrain---------------------
#
# Yup - I would think I would want to Deinterlace, then apply a noise filter? But I followed your suggestion.
#
#

backward_vec2 = source.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
backward_vec1 = source.MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec1 = source.MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec2 = source.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
source.MVDegrain2(backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=1)

TDeint()    
FadeIO2(30) 
Crop(8, 8, -8, -8) 
Lanczos4Resize(320,240)
Tweak(hue=-6.1, sat=1.0, bright=-13, cont=1.1, coring=true, sse=false)
ENCODE VIDEO (29.97 FPS):
Singlepass XVID at target bitrate of 1000.
Lame (MP3) 128 CBR.

The above 30 second clip ends up at 4,435 KB.
Not Great... I tried 2-pass but it barely made a difference (on this clip that is).
__________________
For a Minute.... I Lost Myself

Last edited by RjBeals; 3rd September 2008 at 17:28. Reason: fixed code.
RjBeals is offline   Reply With Quote
Old 4th September 2008, 06:20   #12  |  Link
yup
Registered User
 
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
RjBeals!
Code:
LoadPlugin("C:\Documents and Settings\bealr0sp\Desktop\Downloads\mvtools-v1.10.2.1\mvtools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\filters\TDeint\TDeint.DLL")
AVISource("C:\Documents and Settings\...\capture_30sec.avi")

#-----------------DeGrain---------------------
#
# RjBeals You need denoise interlaced source as fields not frames and delta in MVAnalyse multiple 2
#
#
AssumeTFF()
source=SeparateFields()#now field 720x240
backward_vec2 = source.MVAnalyse(isb = true, delta = 4, pel = 2, overlap=4, sharp=1, idx = 1)
backward_vec1 = source.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec1 = source.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec2 = source.MVAnalyse(isb = false, delta = 4, pel = 2, overlap=4, sharp=1, idx = 1)
source.MVDegrain2(backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=1)
Weave()#Now frame 720x480

TDeint()    
FadeIO2(30) 
Crop(8, 8, -8, -8) 
Spline36Resize(320,240)# for downsizing Spline36Resize better
Tweak(hue=-6.1, sat=1.0, bright=-13, cont=1.1, coring=true, sse=false)
It is will be little better.
yup.
yup is offline   Reply With Quote
Old 4th September 2008, 13:10   #13  |  Link
RjBeals
Resu Deretsiger
 
RjBeals's Avatar
 
Join Date: Nov 2006
Location: SC, USA
Posts: 31
Quote:
Originally Posted by yup View Post
Code:

source = AVISource("C:\Documents and Settings\bealr0sp\Desktop\Downloads\capture_30sec.avi")

#-----------------DeGrain---------------------
#
# RjBeals You need denoise interlaced source as fields not frames and delta in MVAnalyse multiple 2
#
#
AssumeTFF()
source=SeparateFields()#now field 720x240
backward_vec2 = source.MVAnalyse(isb = true, delta = 4, pel = 2, overlap=4, sharp=1, idx = 1)
backward_vec1 = source.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec1 = source.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec2 = source.MVAnalyse(isb = false, delta = 4, pel = 2, overlap=4, sharp=1, idx = 1)
source.MVDegrain2(backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=1)
Weave()#Now frame 720x480
Yup - thanks so much for that code. But, I am still a novice, so I have a basic question. I get the following error when trying to open the avs in virtualdub:

Since I use the variable "source" to identify my movie clip, should I use the AssumeTTF(source) instead of AssumeTFF()
__________________
For a Minute.... I Lost Myself
RjBeals is offline   Reply With Quote
Old 4th September 2008, 13:33   #14  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
If you want to carry the clip through your script in the variable source instead of the implicit last, you can do it this way:

Code:
source = AVISource("C:\Documents and Settings\bealr0sp\Desktop\Downloads\capture_30sec.avi")

#-----------------DeGrain---------------------
#
# RjBeals You need denoise interlaced source as fields not frames and delta in MVAnalyse multiple 2
#
#
source=source.AssumeTFF()
source=source.SeparateFields()#now field 720x240
backward_vec2 = source.MVAnalyse(isb = true, delta = 4, pel = 2, overlap=4, sharp=1, idx = 1)
backward_vec1 = source.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec1 = source.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec2 = source.MVAnalyse(isb = false, delta = 4, pel = 2, overlap=4, sharp=1, idx = 1)
source=source.MVDegrain2(backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=1)
source.Weave()#Now frame 720x480
Here's something Ben Rudiak-Gould (creator of Avisynth) wrote a long time ago that might help you understand this:

Quote:
Here are the rules:

1. The statements in a script (or function) are evaluated one by one. If
the value of a particular statement happens to be a clip, then it's assigned
implicitly to the special variable "last", so that it's still available on
the next line.
2. If a filter expects a clip as its first argument, and you haven't
supplied that clip, then it's taken from the "last" variable.
3. The return value of a script (or a function) is the value of its final
line, unless you have an explicit "return".

The intent behind these rules was to make the most common case (linear
processing of a single clip) easier to write, by eliminating the need to
worry about variables. For example, your script above could be:

Import("vdfilters.avs")
AVISource("example.avi")
ComplementParity
ConvertToRGB
VD_SmartDeinterlace("field", "luma", true, false, false, 20)

The "Import" line doesn't return a clip, so its return value isn't saved.
The "AVISource" line produces a clip which goes into "last" (by rule 1).
The next two lines get their source clip from "last" (rule 2) and put their
result back in "last" (rule 1). The final line gets its source from "last"
and its result is the script return value (rule 3).

I write scripts of this sort all the time, so I do find the "implicit last"
to be useful. But when the implicit and explicit syntaxes are mixed, you
get weird-looking and nonintuitive scripts.

Maybe what I should do to fix this is eliminate rule (3). Then you would
have to write:

Import("vdfilters.avs")
AVISource("example.avi")
last.ComplementParity
last.ConvertToRGB
last.VD_SmartDeinterlace("field", "luma", true, false, false, 20)

It's a little clearer. If I eliminated all three rules, you would have to
write

Import("vdfilters.avs")
clip = AVISource("example.avi")
clip = clip.ComplementParity
clip = clip.ConvertToRGB
return clip.VD_SmartDeinterlace("field", "luma", true, false, false, 20)

That's even clearer, but I don't like being that verbose. Maybe the
language would be better off that way, though. Of course, there would still
be shorter ways:

Import("vdfilters.avs")
return AVISource("example.avi").ComplementParity.ConvertToRGB
\ .VD_SmartDeinterlace("field", "luma", true, false, false, 20)

Not that bad, really.

Last edited by Guest; 4th September 2008 at 13:38.
Guest is offline   Reply With Quote
Old 4th September 2008, 15:02   #15  |  Link
RjBeals
Resu Deretsiger
 
RjBeals's Avatar
 
Join Date: Nov 2006
Location: SC, USA
Posts: 31
Quote:
Originally Posted by neuron2 View Post
If you want to carry the clip through your script in the variable source instead of the implicit last, you can do it this way...

Here's something Ben Rudiak-Gould (creator of Avisynth) wrote a long time ago that might help you understand this:
Thanks so much neuron - that does make sense to me.
__________________
For a Minute.... I Lost Myself
RjBeals is offline   Reply With Quote
Old 4th September 2008, 17:00   #16  |  Link
yup
Registered User
 
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
RjBeals!
Instead Tdeint try
http://www6.impacthosting.com/trbarry/TomsMoComp.zip
for simple deinterlace may be better.
yup.
yup is offline   Reply With Quote
Old 5th September 2008, 13:19   #17  |  Link
RjBeals
Resu Deretsiger
 
RjBeals's Avatar
 
Join Date: Nov 2006
Location: SC, USA
Posts: 31
thanks yup - tried it, but didn't like it as much as Tdeint.
I also really liked doubling the rate using (mode=1) - sure it's a larger file size, and 60 FPS, but it's super smooth and it doesn't slow down cpu processing cause it's so small.
Code:
TDeint(mode=1)

# mode:
#
# Sets the mode of operation. Modes -2 and -1 require progressive input.
# o -2 - double height using modified ELA
# o -1 - double height using modified ELA-2
# o 0 - same rate output
# o 1 - double rate output (bobbing)
# o 2 - smartbobbed field-matching (same rate output, blend frames from bobbed stream)
# default - 0 (int)
__________________
For a Minute.... I Lost Myself
RjBeals is offline   Reply With Quote
Reply

Tags
avs, capture, divx, handycam, hi-8

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 17:33.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.