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. |
2nd November 2008, 14:23 | #1 | Link |
Registered User
Join Date: Dec 2007
Posts: 8
|
Converting HDV footage to DVD
Hi!
I am the owner of a HV30 HDV-Camcorder! Because i don't own a Bluray burner yet, I want to convert the footage to DVD with the best quality possible. Therefore I have written a Avisynth script, which I load into HC Encoder. Source is the frame-served *.m2t footage (used DebugMode frameserver). This is the script i use until now: AVISource("C:\...\frameserve.avi",audio=false) ConvertToYV12() FieldDeinterlace() BicubicResize(720,576,0,0.5) Up to now, I'm not very satisfied with the result, as the motion scenes don't look very good... I think there could be an improvement by changing the deinterlace filter? The result also could be a bit sharper... What do you think about the script? Here is the link to the original footage: http://rapidshare.com/files/15992731...51_39.m2t.html Thanks in advance for your help! |
2nd November 2008, 18:03 | #2 | Link |
Sleepy overworked fellow
Join Date: Feb 2008
Location: Maple syrup's homeland
Posts: 933
|
You can give TempGaussMC_beta1 a try. http://forum.doom9.org/showthread.ph...00#post1158000
If you have trouble finding the plugins, they are all in the requirements.7z archive of animeivtc. However, since you're converting to DVD, you shouldn't double your framerate. So either add selecteven() (progressive output) or weave() (interlaced output) at the end of your script. To sharpen, limitedsharpenfaster is something worth trying.
__________________
AnimeIVTC() - v2.00 -http://boinc.berkeley.edu/- Let all geeks use their incredibly powerful comps for the greater good (no, no, it won't slow your filtering/encoding :p) |
2nd November 2008, 18:58 | #3 | Link |
Resize Abuser
Join Date: Apr 2005
Location: Seattle, WA
Posts: 623
|
Give this a shot
Code:
#load source MPEG2Source("cam.d2v") #bob deinterlace TDeint(1) #Resize BicubicResize(720,576,0,0.5) #interlace Separatefields() Selectevery(4,0,3) Weave()
__________________
Mine: KenBurnsEffect/ZoomBox CutFrames Helped: DissolveAGG ColorBalance LQ Animation Fixer |
2nd November 2008, 22:54 | #5 | Link |
Registered User
Join Date: Dec 2002
Location: UK
Posts: 1,673
|
18 hours for 2.5 minutes of HDV on my (admittedly low spec 2GHz) machine. Pointless, timewasting overkill for interlaced HD > interlaced SD conversion.
Lots of people here seem convinced that the way to do this conversion is to deinterlace as carefully as possible. However, in the thread where it was really tested, it was found that even dumb bob of HD interlaced is too sharp for SD interlaced and needs to be softened! So why waste time with smart bobbing? This is one interlaced resize method... http://forum.doom9.org/showthread.ph...24#post1161524 This is another... Code:
bob() spline36resize(704,576) limitedsharpenfaster().Blur(0.0,1.0).Sharpen(0.0,0.5) assumetff() separatefields().SelectEvery(4,0,3).Weave() Cheers, David. |
2nd November 2008, 23:02 | #6 | Link |
Registered User
Join Date: Dec 2007
Posts: 8
|
Thanks for your answer!
But I'm a bit confused now... I thought that I have to use selecteven() for progressive output. You use weave() in your scripts. Does this mean that you generate interlaced SD-Material? Til' know I thought that progressive output is better for downsizing... |
2nd November 2008, 23:44 | #7 | Link |
Derek Prestegard IRL
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,989
|
The content becomes progressive after bobbing (with bob() or tdeint(1)). Then the scaling happens, then you re-interlace with separatefields.selectevery(4,0,3).weave.
You want to burn it on a DVD, right? Then your only good option is to keep it interlaced, since the NTSC DVD standard calls for 480i60, and doing anything else means losing motion fluidity. ~MiSfit
__________________
These are all my personal statements, not those of my employer :) |
3rd November 2008, 00:04 | #8 | Link |
Registered User
Join Date: Apr 2008
Location: St. Petersburg, Russia
Posts: 334
|
Dumb bob is 'too sharp' because the initial image is too sharp for dropping half of lines at turning a field into frame - the image cannot be represented properly (sample frequency too low) or restored after this. I agree that those slow sophisticated scripts are waste of time here, but with what I tested for comparison, conventional smart bobbers like LeakKernel or TDeint work more correctly (since they use all the lines for stationary parts of image) and are fast enough. To avoid extreme sharpness before final re-interlacing, different resizing methods can be used for vertical / horizontal operations and this is well-combined with horizontal resizing (it can be sharper) before bob, which reduces job for it, and vertical resizing (less sharp, even filtering if necessary) afterwards.
|
3rd November 2008, 00:43 | #9 | Link |
Registered User
Join Date: Dec 2007
Posts: 8
|
Hi!
I've tested some of your scripts! Generally I've to say that diagonal lines look very noisy... I have packed 3 different version with the scripts in the following rar file: I would be interested what you experts think about the results! I think the version with LeakKernel looks best... Judge on your own: http://rapidshare.com/files/160098378/files.rar.html |
3rd November 2008, 04:23 | #10 | Link |
Registered User
Join Date: Aug 2008
Posts: 233
|
Try this (you'll need ColorMatrix, Yadifmod and TomsMoComp)
Code:
######################### # INPUT ######################### AviSource("signpost.avi") AssumeTFF() (isRGB()) ? ConvertToYUY2() : ColorMatrix(mode="Rec.709->Rec.601", clamp=false) ######################### # DEINTERLACING (Bobbing) ######################### # padding for mod16 width and height w16 = ceil(float(width()) / 16.0) * 16 h16 = ceil(float(height()) / 16.0) * 16 bL = (w16 - width()) / 2 bR = (bL % 2 != 0) ? bL - 1 : bL bL = (bL % 2 != 0) ? bL + 1 : bL bT = (h16 - height()) / 2 bB = (bT % 2 != 0) ? bT - 1 : bT bT = (bT % 2 != 0) ? bT + 1 : bT (bL > 0 || bR > 0 || bT > 0 || bB > 0) ? AddBorders(bL, bT, bR, bB) : last yadifmod(mode=1, edeint=Interleave(TomsMoComp(-1, 0, 0), DoubleWeave().SelectOdd().TomsMoComp(-1, 0, 0))) (bL > 0 || bR > 0 || bT > 0 || bB > 0) ? Crop(bL, bT, bR * -1, bB * -1) : last ######################### # CROP / RESIZE ######################### # crop a little from the top and bottom to allow fullscreen with accurate PAR (assuming 1080i source) Crop(0,14,0,-14) Spline36Resize(720, 576) ###################### # OUTPUT OPTIONS ###################### # Uncomment only one of the lines below below # This produces interlaced YV12 output AssumeTFF().SeparateFields().SelectEvery(4,0,3).Weave().AssumeTFF().ConvertToYV12(interlaced=true) # This produces progressive YV12 output, with blending # Merge(SelectEven(), SelectOdd(), weight=0.5).ConvertToYV12(interlaced=false) # This produces progressive YV12 output, without blending # SelectEven().ConvertToYV12(interlaced=false) Limiter(16, 235, 16, 240) Last edited by vampiredom; 3rd November 2008 at 05:47. |
3rd November 2008, 05:58 | #12 | Link |
Registered User
Join Date: Aug 2008
Posts: 233
|
Thanks... I'm very impressed with the Yadifmod + "TomsBob" method here: It not perfect for 1:1 stuff, but it is ideal (and extremely fast) for scaled-down stuff like HDV->DVD. I have never able to get close to its quality with Tdeint, Leak, etc.
Ther seems to be some issue on older CPUs with TomsMoComp: Things get funky when the dimensions are not mod16, so that's why I add the temporary borders and then crop them off. It's the "safe way" to do it Only EEDI2 seems to do a "better" job (most of the time?) than TomsMoComp in this situation, but the rendering is way too slow on HD sources (unless you're running MT and the MT version of EEDI2 on a killer machine, of course). In which case, you can replace the DEINTERLACING section above with: Code:
WhichField = (GetParity()) ? 3 : 2 Yadifmod(mode=1, edeint=v.SeparateFields().EEDI2(Field = WhichField, maxd = 12)) What program are you frameserving from with DebugMode? Last edited by vampiredom; 3rd November 2008 at 06:05. |
3rd November 2008, 15:12 | #13 | Link | ||
Registered User
Join Date: Dec 2002
Location: UK
Posts: 1,673
|
Quote:
Quote:
(Of course I agree that the separate H and V resizing before and after any_smart_bob is very useful, when a smart bob is required.) Cheers, David. |
||
3rd November 2008, 22:53 | #14 | Link |
Registered User
Join Date: Jul 2007
Posts: 157
|
What is your original framerate? That camera shoots 30p/30i/24p, I believe. You may want to try 24p frames, and have the encoder apply soft pulldown, like in most commercial DVD's. The framerate is a different issue from the resizing method (though you should deinterlace before resizing). Progressive frames tend to compress well, at the expense of smoothness of motion.
__________________
f=33 |
4th November 2008, 07:04 | #15 | Link |
Tester
Join Date: Jul 2004
Posts: 39
|
stooky: I would try not to deinterlace. Only downsize. I know it sounds weird, but at least try it. (The easy way to see the effect is with VirtualDub's Resize function, with preview.)
I'd recommend Lanczos3 resize. (some other modes will introduce weird artifacts). Do not activate interlace mode. Such downsizing will blend the fields. You will save processing time, and there won't be deinterlacing artifacts. (make sure any prior processing respects the interlace nature of the video or you will get artifacts. Separate fields if necessary. Another possibility would be to downsize before processing for more speed) P.S.: Why do you frameserve the m2v and then convert it to YUV2 ??? Is the frameserve RGB-only ? If so, you lose quality in YUV-->RGB-->YUV conversion. Personnally I convert m2v to mpeg (lossless muxing) then convert mpeg to avi with Fast recompress in VdubMod, encoding in Huffyuv. That way I have easy to edit, YUV avi files without any loss in quality.
__________________
May your future be filled with happiness. |
4th November 2008, 08:48 | #17 | Link |
Tester
Join Date: Jul 2004
Posts: 39
|
I knew others would disapprove, lol.
Blue_Misfit: Try it also, you'll see it isn't so bad. In fact the result is very good. Let's say we have 960 lines (interlaced). If we were to resize it with a bilinear transform, to 480 lines, without prior deinterlacing, we would obtain the exact same result as having done a simple deinterlace (blend fields) followed by the resize. That's because the resize ratio is a perfect 2:1. In his case, the ratio is not so perfect. That's why I recommend using a different resizer (Lanzcos3). The end result looks like mid-way between deinterlace-blend and deinterlace-interpolate. I did it myself for resizing 1080i to 720p and the result is still very good while processing is much faster. Of course if he doesn't like the look of blended fields he will have to deinterlace before resizing. In any case, before criticising, try it. Or try thinking outside the box... There are no golden rules, only the end result's quality matters.
__________________
May your future be filled with happiness. Last edited by KR; 4th November 2008 at 09:01. |
4th November 2008, 09:43 | #18 | Link | |
ffdshow/AviSynth wrangler
Join Date: Feb 2003
Location: Austria
Posts: 2,441
|
Quote:
__________________
now playing: [artist] - [track] ([album]) |
|
4th November 2008, 11:09 | #19 | Link | |
Registered User
Join Date: Dec 2002
Location: UK
Posts: 1,673
|
Why blend the fields together when the output is DVD?!
Quote:
You might as well save time by only processing the first half of the video - "much faster"! Cheers, David. |
|
4th November 2008, 20:39 | #20 | Link | |||
Tester
Join Date: Jul 2004
Posts: 39
|
Quote:
Nearest neighbor, no prior deinterlace Deinterlace - Blend before Lanczos3 Lanczos3, no prior deinterlace Quote:
Quote:
__________________
May your future be filled with happiness. Last edited by KR; 4th November 2008 at 20:56. |
|||
Tags |
avisynth, deinterlace, dvd, frameserver, hdv |
|
|