I have a one little problem, but sorry my english is wrong.
I edit HDV (m2t) from Canon HV20 (PAL version) in Vegas8, and sometimes i make PAL DVD-Video. My problem is with resize in Vegas. Downconvert in Vegas is wrong. I try to use Avisynth and Lanczos3 filter, but output is jagged.
My wrong way is this:
I edit HDV in Vegas (project properties i set for HDV) and finaly use debugmode frameserver. Output is vegas.avi. Then i make avisynth scriptthis avs on player (MPC) and on prewiev mpeg2 enkoder (ProCoder) is jagged. When I open the same vegas.avi in VirtualDub and use Lanczos3 filter with option interlaced, output is no jagged. Is the way to resize in avisynth with option interlaced? I try use this scripts, but thats are wrong too:Code:DirectShowSource ("vegas.avi") Lanczos3Resize(720,576)thanxCode:DirectShowSource ("vegas.avi") SeparateFields() LanczosResize(720,288) odd=SelectOdd evn=SelectEven Interleave(evn,odd) Weave() DirectShowSource ("vegas.avi") SeparateFields() odd=SelectOdd evn=SelectEven Interleave(evn,odd) LanczosResize(720,576) Weave()
+ Reply to Thread
Results 1 to 26 of 26
-
-
Code:
DirectShowSource ("vegas.avi") SeparateFields() LanczosResize(720,288) Weave()
Code:DirectShowSource ("vegas.avi") TDeint(mode=1, order=0) LanczosResize(720,576) SeparateFields() SelectEvery(4, 0, 3) Weave()
-
OK, thanx, but i have some questions:
Your script work, only when I load the plugin and convert the colours to YUY2. Is it correct? And finally, why is there SelectEvery(4, 0, 3), or what do this command? Thanx -
Originally Posted by pkliment
The numbers (4,0,3) mean that of each 4 sequential fields (100 fields/s) you select ## 0 & 3 for making the output frames with Weave(), the rest are not used.
BTW, the script above will output BFF. If you want TFF, use AssumeTFF() before SeparateFields().
Also I'd use the more reliable AviSource() for opening the DebugMode output. -
Thanx.
So when there are fields 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19, 20..., for Weave() SelectEvery(4,0,3) selects this fields 0,3,4,7,8,11,12,15,16,19...?
I dont understand it, because then I lost information, when I dont use all fields. This unused fields are redundant? -
Originally Posted by pkliment
Originally Posted by pkliment -
Sorry, but yet another question. When I use Lanczos3 with option interlaced in Virtualdub, SD(PAL) otput is subjective correct (no post-resize jugged). The resize (with interlaced option) in VD is on the same base like in Avisynth with TDeint or Yadif? Or the resize in VD is on other base -> when yes, so what? Thanx.
-
Originally Posted by pkliment
Heard many complaints from HD camera users who had tried resizing to SD by simply resizing separated fields. The problem is that horizontal object edges can never get to the right TV line which is in the other field. Also vertical disallignment error takes place with this method. -
The avisynth script above doesn't look right. The definitive answer and some follow-up :-
http://forum.doom9.org/showthread.php?p=1117735#post1117735
http://forum.doom9.org/showthread.php?p=1115201#post1115201
The 2-phase resize (horizontal then deinterlace then vertical then reinterlace) is quicker than deinterlace then resize then reinterlace... less area to deinterlace.
Questions on SelectEvery ? This may help http://forum.doom9.org/showthread.php?p=1110710#post1110710 -
Originally Posted by halsboss
The 2-phase resize (horizontal then deinterlace then vertical then reinterlace) is quicker than deinterlace then resize then reinterlace... less area to deinterlace. -
Sorry, I assumed HDV was BFF like regular DV. For a TFF source you can use:
Code:DirectShowSource ("vegas.avi") TDeint(mode=1, order=1) LanczosResize(720,576) AssumeTFF() SeparateFields() SelectEvery(4, 0, 3) Weave()
Code:SeparateFields() LanczosResize(720,288) Weave()
Code:Deinterlace -- unfold fields side by side Resize Deinterlace -- fold side by side fields together
-
Originally Posted by Alex_ander
Originally Posted by Alex_ander
Code:AVISource("G:\HDTV\zzz.avi") AssumeFPS(25) AssumeTFF() LastW=LAST.width() LastH=LAST.height() bicubicresize(720,LastH) tdeint(mode=1,order=1) # mode=0=same rate output mode=1=double rate output (bobbing) order=0=BFF order=1=TFF bicubicresize(720,576) separatefields() selectevery(4,0,3) weave() Converttoyv12(interlaced=true) SetPlanarLegacyAlignment(True)
-
As I understand it the resizing filters have special cases when resizing only one dimension so it's safe to resize horizontally then deinterlace or bob.
I wonder if the smart bobs will have a harder time (as in less accurate) detecting motion areas if the frame is downsized horizontally first though.
In any case, all the bobs (dumb and smart) are imperfect and they always will be. They just differ in the amount and types of imperfections, and speed. -
I tried your scripts.......sorry to say I'm not impressed. I prefer my much faster and equal quality script for resizing HDV 1080i to SD 480i:
Code:DirectshowSource("mclip.avi") assumetff().Bob(height=480) LanczosResize(720,480) assumetff().separateFields() SelectEvery(4,0,3) #TFF source - use (4,1,2) for BFF Weave() Converttoyv12(interlaced=true)
Got my retirement plans all set. Looks like I only have to work another 5 years after I die........ -
Bobbing ... you get what you ask for. Non-motion-compensated deinterlacing. Try decent motion action and see how you go. Why do you think it's faster than Tdeint ? Fairies hanging on ? Swing over to Doom9 and take a look around as to why the serious video processing people use these things. Bottom line = want good output then do good things to the video... chews fps to do that.
-
It's a matter of opinion. Your method is good, but I prefer mine for 1080i resized to 480i. Yes I did test it on fast motion.........Sports is 90% of what I shoot anyway. I like Tdeint, but I think I like Yadif better for processing to same sized output. Now when I'm processing to a size smaller than the field size, I feel that a plain Bob works just fine. I've tested this way too many times allready. However I'm glad that you posted your method, because I got to learn about the nnedi plugin. Now that's interesting.........
Yes I agree that there are some smart people on Doom9, but don't think for a second that's the only place you'll find them.........Got my retirement plans all set. Looks like I only have to work another 5 years after I die........ -
Can't argue with that, you're right it's personal preference. If it works for you then great. Yadif seems close enough to Tdeint to me too, although I've stayed with TDeint.
I do sports action too and, like you no doubt, wish for minimal artifactsAs long as the people's choices are more informed than less, which yours is, then great !
Addendum: from the Wiki note the bolded sentence:-
http://avisynth.org/mediawiki/Bob
Bob takes a clip and bob-deinterlaces it. This means that it enlarges each field into its own frame by interpolating between the lines. The top fields are nudged up a little bit compared with the bottom fields, so the picture will not actually appear to bob up and down. However, it will appear to "shimmer" in stationary scenes because the interpolation doesn't really reconstruct the other field very accurately. This filter uses BicubicResize to do its dirty work.
Also see you Bobbing to height 480 1st up... reversing the resize order and using Bob to resize vertically in step 1 using Bicubic (which the other script does although you could substitute another resizer in it if you chose)
Have fun.
PS what do you use to encode ? -
Originally Posted by halsboss
-
Originally Posted by jagabo
Originally Posted by jagaboThe ffmpeg mailing list indicated it's internal resizer isn't too great but it seems "close enough" for some sources.
Careful as line-wrapping in code-blocks seems to be an issue. And it produces bitrate "spikes" which you may need to resolve (I do so by creating DVD from the ffmpeg output using VideoReDo TV Suite which auto fixes up such things).
Code:@echo OFF REM put fully-qualified drive/path/filename in between the quotes Call :1pass "test.mpg" pause exit :1pass REM 1-pass 1080i to 576i set fINPUT=%~1% set fOUTPUT=%~1%.mpg set f2passlogfile=%~1%.log set fSIZE=704x576 set fASPECT=16:9 set faveragebitrate=9200k set fMAXBITRATE=9400k set fMINBITRATE=7000k set faudiofreq=48000 set faudiobitrate=192k Rem Tff=1 Bff=0 set FieldFirst=1 rem INTERLACED FLAGS -ilme -ildct -flags +ildct+ilme -ildctcmp satd -top %FieldFirst% set fInterlacedSETTINGS=-top %FieldFirst% -ilme -ildct -flags +ildct+ilme+loop+trell+cgop -mbd rd -cmp satd -subcmp satd -ildctcmp satd -vb_strategy 1 set fNonInterlacedSETTINGS=-flags +loop+trell+cgop -mbd rd -cmp satd -subcmp satd -vb_strategy 1 @echo on "C:\SOFTWARE\ffmpeg\ffmpeg.exe" -y -i "%fINPUT%" -target pal-dvd -b %faveragebitrate% -minrate %fMINBITRATE% -maxrate %fMAXBITRATE% -qmin 1 -qmax 31 -dc 10 %fInterlacedSETTINGS% -s %fSIZE% -aspect %fASPECT% -ab %faudiobitrate% -ar %faudiofreq% -ac 2 -acodec ac3 "%fOUTPUT%" goto :EOF :2pass REM 2-pass 1080i to 576i set fINPUT=%~1% set fOUTPUT=%~1%.mpg set f2passlogfile=%~1%.log set fSIZE=704x576 set fASPECT=16:9 set faveragebitrate=9200k set fMAXBITRATE=9400k set fMINBITRATE=7000k set faudiofreq=48000 set faudiobitrate=192k Rem Tff=1 Bff=0 set FieldFirst=1 rem INTERLACED FLAGS -ilme -ildct -flags +ildct+ilme -ildctcmp satd -top %FieldFirst% set fInterlacedSETTINGS=-top %FieldFirst% -ilme -ildct -flags +ildct+ilme+loop+trell+cgop -mbd rd -cmp satd -subcmp satd -ildctcmp satd -vb_strategy 1 set fNonInterlacedSETTINGS=-flags +loop+trell+cgop -mbd rd -cmp satd -subcmp satd -vb_strategy 1 @echo on "C:\SOFTWARE\ffmpeg\ffmpeg.exe" -y -i "%fINPUT%" -pass 1 -passlogfile "%f2passlogfile%" -target pal-dvd -b %faveragebitrate% -minrate %fMINBITRATE% -maxrate %fMAXBITRATE% -qmin 1 -qmax 31 -dc 10 %fInterlacedSETTINGS% -s %fSIZE% -aspect %fASPECT% -an "%fOUTPUT%" "C:\SOFTWARE\ffmpeg\ffmpeg.exe" -y -i "%fINPUT%" -pass 2 -passlogfile "%f2passlogfile%" -target pal-dvd -b %faveragebitrate% -minrate %fMINBITRATE% -maxrate %fMAXBITRATE% -qmin 1 -qmax 31 -dc 10 %fInterlacedSETTINGS% -s %fSIZE% -aspect %fASPECT% -ab %faudiobitrate% -ar %faudiofreq% -ac 2 -acodec ac3 "%fOUTPUT%" goto :EOF
-
Got my retirement plans all set. Looks like I only have to work another 5 years after I die........
-
Originally Posted by racer-x
-
Maybe works for me too. Trick seems to be for a person to use whatever makes him/her happy, knowing the possibilities and risks. The OP got his/her money's worth
-
Got my retirement plans all set. Looks like I only have to work another 5 years after I die........
Similar Threads
-
HV40: Record in HDV(PF24) vs HDV(24F)
By videobread in forum Camcorders (DV/HDV/AVCHD/HD)Replies: 12Last Post: 23rd Dec 2011, 20:44 -
Downconvert DTS to stereo
By mew1033 in forum Authoring (DVD)Replies: 1Last Post: 26th Dec 2009, 00:20 -
How to downconvert footage from HD to SD without camcorder?
By Canon GL-2 Guy in forum Newbie / General discussionsReplies: 1Last Post: 30th Apr 2009, 09:31 -
FCP Downconvert and Export 16:9 to Quicktime
By Jeff_NJ in forum MacReplies: 1Last Post: 24th Oct 2008, 11:45 -
HDV (50i) to Pal Anamorphic (50i) problems with Avisynth (sample included)
By VooD in forum Video ConversionReplies: 15Last Post: 1st Aug 2008, 07:22