digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   AviSource: Could not Decompress Frame 0 (http://www.digitalfaq.com/archives/avisynth/12140-avisource-decompress-frame.html)

Dialhot 09-16-2004 08:36 AM

Quote:

Originally Posted by the viking
Correct me if im wrong :!:

Inc told you to go to 544 jsut for the blindPP command. But the gripcrop must have a valid resolution, taht means 720*576 (or an other one, but 720*544 is not authorized there).

the viking 09-16-2004 09:14 AM

ok,get that.running a test right now with TMPGEnc.
Final script:

LoadPlugin("C:\Programfiler\AviSynth 2.5\plugins\MPEG2Dec3.dll")
LoadPlugin("C:\Programfiler\AviSynth 2.5\plugins\deen.dll")
LoadPlugin("C:\Programfiler\AviSynth 2.5\plugins\grip.dll")
LoadPlugin("C:\Programfiler\AviSynth 2.5\plugins\UnDot.dll")
LoadPlugin("C:\Programfiler\AviSynth 2.5\plugins\Convolution3DYV12.dll")
LoadPlugin("C:\Programfiler\AviSynth 2.5\plugins\Blockbuster.dll")
LoadPlugin("C:\Programfiler\AviSynth 2.5\plugins\DctFilter.dll")
DirectShowSource("G:\Captured Video\Video 1.avi",fps=25)
AddBorders(0,0,0,4)
ConvertToYV12()
BlindPP(cpu=4)
Blockbuster(method="noise",detail_min=1,detail_max =3,variance=0.1,seed=1)
Convolution3D(1, 6, 12, 6, 8, 2.8, 0)
GripCrop(720, 576, overscan=1, source_anamorphic=false,dest_anamorphic=false)
GripSize(resizer="LanczosResize")
Undot()
TemporalSoften(2,7,7,3,2)
DCTFilter(1,1,1,1,1,1,0.5,0)
#Blockbuster(method="noise",detail_min=1,detail_ma x=10,variance=0.3,seed=5623)
GripBorders()


I left out the interlace code to increase speed,only for testing :!:
----------------
Finn

Dialhot 09-16-2004 09:25 AM

The script is okay. But the result will be awfull due to interlacing :-)

the viking 09-16-2004 09:34 AM

Yes,your right,the result wasnt very good.so I'll run a new test with this script:

LoadPlugin("C:\Programfiler\AviSynth 2.5\plugins\MPEG2Dec3.dll")
LoadPlugin("C:\Programfiler\AviSynth 2.5\plugins\deen.dll")
LoadPlugin("C:\Programfiler\AviSynth 2.5\plugins\grip.dll")
LoadPlugin("C:\Programfiler\AviSynth 2.5\plugins\UnDot.dll")
LoadPlugin("C:\Programfiler\AviSynth 2.5\plugins\Convolution3DYV12.dll")
LoadPlugin("C:\Programfiler\AviSynth 2.5\plugins\Blockbuster.dll")
LoadPlugin("C:\Programfiler\AviSynth 2.5\plugins\DctFilter.dll")
LoadPlugin("C:\programfiler\AviSynth 2.5\plugins\kerneldeint.dll")
DirectShowSource("G:\Captured Video\Video 1.avi",fps=25)
AddBorders(0,0,0,4)
ConvertToYV12()
BlindPP(cpu=4)
KernelBob(order=0,sharp=true,threshold=7)
AssumeFrameBased()
Blockbuster(method="noise",detail_min=1,detail_max =3,variance=0.1,seed=1)
Convolution3D(1, 6, 12, 6, 8, 2.8, 0)
GripCrop(720, 576, overscan=1, source_anamorphic=false,dest_anamorphic=false)
GripSize(resizer="LanczosResize")
Undot()
TemporalSoften(2,7,7,3,2)
DCTFilter(1,1,1,1,1,1,0.5,0)
#Blockbuster(method="noise",detail_min=1,detail_ma x=10,variance=0.3,seed=5623)
SeparateFields()
SelectEvery(4,1,3)
Weave()
GripBorders()

I'll think this will do,interlace,top field first,fieldA video

-----------------------
Finn

incredible 09-16-2004 10:15 AM

Viking,

"Optimal Scripts" are NOT purposed for interlaced outputs!
(well, not in that kind of state!)

Try that one one IF source is "combed" (interlaced)

Code:

DirectShowSource("G:\Captured Video\Video 1.avi",fps=25)
AddBorders(0,0,0,4)
ConvertToYV12(interlaced=true)
BlindPP(cpu=4, ipp=true)
Separatefields()
even=selecteven().\
    Blockbuster(method="noise",detail_min=1,detail_max=3,variance=0.1,seed=1).\
    Convolution3D(1, 6, 12, 6, 8, 2.8, 0)
odd =selectodd().\
    Blockbuster(method="noise",detail_min=1,detail_max=3,variance=0.1,seed=1).\
    Convolution3D(1, 6, 12, 6, 8, 2.8, 0)
interleave(even,odd)
weave()
GripCrop(720, 576, overscan=1, source_anamorphic=false,dest_anamorphic=false)
GripSize(resizer="LanczosResize")
Separatefields().undot()
even=selecteven().\
    TemporalSoften(2,7,7,3,2)
odd =selectodd().\
    TemporalSoften(2,7,7,3,2)
interleave(even,odd)
weave()
DCTFilter(1,1,1,1,1,1,0.5,0)
GripBorders()

a) ONLY use that type of optimalScript in case of a "combed" source! AND IF YOu WANt TO KEEP THE "Combed" means interlaced state!
b) Im not shure if DCTfilter works properly on interlaced sources
c) it "could" be that Gripfit "looses" internally the reference to its cropped image state after GripCrop due seperating the fields afterwards, if yes, then use the classic resizing way via FitCD.
c) That script above is written out "of head" as actually Im at work.
d) It keeps the source interlaced



e) If you simply want to deinterlace then use the optimalscript as its in the original!!! state but use BlindPP(CPU=4,ipp).Fieldeinterlace(full=false, blend=false) or blend=true as you like it.


In HQ case try that one (caution: SLOW!)

Code:

DirectShowSource("G:\Captured Video\Video 1.avi",fps=25)
AddBorders(0,0,0,4)
ConvertToYV12(interlaced=true)
BlindPP(cpu=4, ipp=true)
assumetff()
Bob() # ------ or Kernelbob() with threshold=0! --- NO smart bobbing! -------
Blockbuster(method="noise",detail_min=1,detail_max=3,variance=0.1,seed=1)
Convolution3D(1, 6, 12, 6, 8, 2.8, 0)
assumefps(25) # as it seems Gripfit detects the source format out of its fps
GripCrop(720, 576, overscan=1, source_anamorphic=false,dest_anamorphic=false)
GripSize(resizer="LanczosResize")
undot()
TemporalSoften(2,7,7,3,2)
DCTFilter(1,1,1,1,1,1,0.5,0)
GripBorders()
assumefps(50)
separatefields().selectevery(4,1,2).weave() # Inverse Bobbing & Reinterlacing

If source is BOTTOM Field first then change

.... assumeTFF() .... to .... AssumeBFF()

and

... selectevery(4,1,2) .... to .... Selectevery(4,0,3)

the viking 09-16-2004 12:18 PM

Inc,tried your script(the first one) in WMP,the picture
has changed to 16:9 or something quite like that.

Yes,my sources are Interlaced and I want to keep them that way,best
for TV-viewing I guess.

Inc wrote:
c) it "could" be that Gripfit "looses" internally the reference to its cropped image state after GripCrop due seperating the fields afterwards, if yes, then use the classic resizing way via FitCD.

So I loaded FitCD,got the following lines:
LanczosResize(704,576,0,1,720,538)
AddBorders(8,0,8,0)
#Trim(0,15551).FadeOut(150)

So the stupid question:just replace

GripCrop(720, 576, overscan=1, source_anamorphic=false,dest_anamorphic=false)
GripSize(resizer="LanczosResize")

with the code I got from FitCD or do I have to modyfi it any way?

-------------
Finn
--------------------

incredible 09-16-2004 03:19 PM

Quote:

Originally Posted by the viking
So the stupid question:just replace

GripCrop(720, 576, overscan=1, source_anamorphic=false,dest_anamorphic=false)
GripSize(resizer="LanczosResize")

with the code I got from FitCD or do I have to modyfi it any way?

Not stupid at all! :)

Just replace the gripcrop(....) and the GripSize(....) lines with ONLY the Lanczosresize(.....) line.
And the Gripborders(...) one with the Addborders(....) line


PS:

I see in the lanczos line FITCD calculated beside the other values a "1", that means your source will be cropped at one of the side by "1"px.
Very bad! Do set in FitCD at "Crop"... round to 2 and at "resize" round to 16!
Also do encode at 704 and not 720 as thats not worth as the 16px above the 704 up to 720 will go out of overscan area on tv ;-)

the viking 09-16-2004 04:43 PM

Inc,

I set Crop in FitCD to round to 2,cropping mode accurate,got this line:
LanczosResize(704,576,0,1,720,538)

changed cropping mode to max.height and got this line:
LanczosResize(704,576,0,0,720,540)

Changed also destiation format to 704x576.
Resize was sat to round to 16

Script like this:

DirectShowSource("G:\Captured Video\Video 1.avi",fps=25)
AddBorders(0,0,0,4)
ConvertToYV12(interlaced=true)
BlindPP(cpu=4, ipp=true)
Separatefields()
even=selecteven().\
Blockbuster(method="noise",detail_min=1,detail_max =3,variance=0.1,seed=1).\
Convolution3D(1, 6, 12, 6, 8, 2.8, 0)
#### EDIT by INC
odd =selectodd().\
Blockbuster(method="noise",detail_min=1,detail_max =3,variance=0.1,seed=1).\
Convolution3D(1, 6, 12, 6, 8, 2.8, 0)
interleave(even,odd)
weave()
LanczosResize(704,576,0,0,720,540)
Separatefields().undot()
even=selecteven().\
TemporalSoften(2,7,7,3,2)
#### EDIT by INC
odd =selectodd().\
TemporalSoften(2,7,7,3,2)
interleave(even,odd)
weave()
DCTFilter(1,1,1,1,1,1,0.5,0)

Still it gives me only half screen in WMP,
the lower part is black for some reason.

When I changed cropping mode In FitCD(to max height),
the addborders line
"was gone"so I removed it from the script to.

----------------
Finn[/IMG]

Peter1234 09-17-2004 01:00 AM

the viking,
Try changing from odd =selecteven().\ to odd =selectodd().\ in both places.

incredible 09-17-2004 02:23 AM

Yep! :oops:

Thats the result of a copy/paste syndrom :)
Thanks for your hint peter.

Viking, I updated the script above to the correct even/odd syntax

the viking 09-17-2004 03:33 AM

hello Peter & Inc,

tried with the edited script,but still only half screen in WMP,

take a look here(screenshots)

incredible 09-17-2004 04:52 AM

Viking,

Ill try that this evening as told, its written out of my head, but every seperatefield routine is followed by a weave which should restore the full frame height/content.

That above is a script where the position of the resizer is in the middle like in OptimalScript4. Maybe for interlaced sources we should do a total different approach.

the viking 09-17-2004 05:37 AM

Yeah,I know.
I'll try other scripts and see if I can
get some proper results.

anyway thanks a lot

-------------
Finn

incredible 09-17-2004 05:52 PM

Yep strange as the seperated fields are still recognised by avisynth as FRAMES! :?

SO I fixed it by adding an assumefieldbased before the weave commands.

DirectShowSource("G:\Captured Video\Video 1.avi",fps=25)
AddBorders(0,0,0,4)
ConvertToYV12(interlaced=true)
BlindPP(cpu=4, ipp=true)
Separatefields()
even=selecteven().\
Blockbuster(method="noise",detail_min=1,detail_max =3,variance=0.1,seed=1).\
Convolution3D(1, 6, 12, 6, 8, 2.8, 0)
odd =selectodd().\
Blockbuster(method="noise",detail_min=1,detail_max =3,variance=0.1,seed=1).\
Convolution3D(1, 6, 12, 6, 8, 2.8, 0)
interleave(even,odd)
assumefieldbased()
weave()
LanczosResize(704,576,0,0,720,540)
Separatefields().undot()
even=selecteven().\
TemporalSoften(2,7,7,3,2)
odd =selectodd().\
TemporalSoften(2,7,7,3,2)
interleave(even,odd)
assumefieldbased()
weave()
DCTFilter(1,1,1,1,1,1,0.5,0)

the viking 09-19-2004 02:25 PM

Hello,
Inc I tried your latest modified script,but for some strange reason
it gives me resolution 704x288 50fps when I load it into TMPGEnc,have a look here.
Any idea whats wrong?

Thanks

EDIT:I tried this script from Boulder's guide to deal with interlaced sources,and it seems to work fine:

DirectShowSource("G:\Captured Video\Video 1.avi",fps=25)
KernelBob(order=1,sharp=true,threshold=7)
AssumeFrameBased()
ConvertToYV12
Asharp(1,4)
Deen()
LanczosResize(704,576,0,0,720,540)
SeparateFields()
SelectEvery(4,1,2) # SelectEvery(4,0,3) for bottom field first video
Weave()

------------------
Finn

EDIT 2:
No,I was wrong,the script above does NOT work fine for
my Interlaced SVHS-captures,when I view the result on my tv,
I see a horizontal lines over the whole screen,and a jerky motion,
so I have to try something else I guess :(


All times are GMT -5. The time now is 05:45 AM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.