Quantcast Avisynth with PAL Analogue Source? - digitalFAQ.com Forums [Archives]
  #1  
01-26-2005, 09:56 AM
zafh zafh is offline
Free Member
 
Join Date: Jan 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
I am currently capturing a PAL analogue source on my hard drive recorder, then burning it to DVD.

I rip the DVD on my pc and run it through the KDVD templates for CCE by Vmesquita.

I have been playing around with various scripts today but to be honest I really don't know what I am doing.

I have chopped together bits from various people scripts and managed to get about a 22% reduction in file size.

I started with this:



Quote:
LoadPlugin("C:\PROGRA~1\AutoGK\DGMPGDec\DGDecode.d ll")
################################################## ################
# Using Kwag’s Motion Adaptive Filtering to get more compression #
################################################## ################
##############
# Parameters #
##############
movie="rawpt1.d2v"
sound="rawpt1 MPA T01 DELAY 0ms.mpa"
video=MPEG2Source(movie)++mpeg2source("rawpt2.d2v" )++mpeg2source("rawpt3.d2v")
audio = DirectShowSource(sound)++directshowsource("rawpt2 MPA T01 DELAY 0ms.mpa")++directshowsource("rawpt3 MPA T01 DELAY -120ms.mpa")
audiodub(video,audio)
#copy trim from video avs
trim(2957,15016)++trim(19576,32250 )++trim(41774,60609)++trim(66092,74146)++trim(7871 3,82517)++trim(85075,85874)++trim(91103,93086)
++trim(93252,104043)++trim(110133,124310)++trim(13 7267,147385)+trim(152919,157485)+trim(161495,16396 6)
+trim(169857,180627)+trim(185184,199940)
SelectRangeEvery(1200, 12)
This gave me a 29.5 Mb file.

Currently I am doing this:

Quote:
LoadPlugin("C:\PROGRA~1\AutoGK\DGMPGDec\DGDecode.d ll")
################################################## ################
# Using Kwag’s Motion Adaptive Filtering to get more compression #
################################################## ################
##############
# Parameters #
##############
myanamorphic=false # change to false if on step 6 you had 4:3 instead of 16:9
#Use 720 or 352 to KDVD, 528 352 to K(S)VCD
m_width=720
#Use 576 for PAL and 480 for NTSC
m_height=576
subtitle="VTS_01_0.sub" # Add a# in the beginning of this line if you don't need
#subtitles or change for the name of the sub file created on step 7.
movie="rawpt1.d2v"
myoverscan=1 # Test values from 0 to 3 here. Bigger files produce more quality but
#a value too big will cause undesirable black borders on your TV.
MaxTreshold = 1.50
nf = 0 # Current frame.


################
## Functions ###
################
function fmin( int f1, int f2) {
return ( f1<f2 ) ? f1 : f2
}


##########
# Script #
##########
MPEG2Source(movie)++mpeg2source("rawpt2.d2v")++mpe g2source("rawpt3.d2v")

#Post-Process
Blockbuster(method="noise",detail_min=1,detail_max =8,variance=0.3,seed=5823)
ATC(1,2,4,0.5,false)
TemporalSoften(2,7,7,3,2)
Blockbuster(method="noise",detail_min=1,detail_max =10,variance=0.5,seed=5823)
#Resize, overscan and borders
gripCrop(m_width, 480, overscan=myoverscan,source_anamorphic=false,dest_a namorphic=false)
GripSize(resizer="lanczosresize")

STMedianFilter(3, 3, 1, 1 )
MergeChroma(blur(MaxTreshold))
MergeLuma(blur(0.1))
## Linear Motion Adaptive Filtering ##
#
# ( Portions from AviSynth's manual ) - This will apply temporalsoften to
# very static scenes, and apply variable blur on moving scenes.
# We also assign a variable - and this is why a line break is inserted:
SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2
ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf >= SwitchThreshold ? \
unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ) : \
TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1) ")
#
#
#

GripBorders()

ColorYUV(off_y=6,gain_y=-1
RemoveGrain(mode=2)
CNR2()
converttoyuy2()
PeachSmoother(baseline=1.38,noiselevel=2.04,dospat ial=false)
unfilter(-5,-5)
Limiter()


trim(2957,15016)++trim(19576,32250 )++trim(41774,60609)++trim(66092,74146)++trim(7871 3,82517)++trim(85075,85874)
++trim(91103,93086)++trim(93252,104043)++trim(1101 33,124310)
++trim(137267,147385)+trim(152919,157485)+trim(161 495,163966)
+trim(169857,180627)+trim(185184,199940)
SelectRangeEvery(1200, 12)
Which has given me a 23 Mb file.

The trims are to get rid of the ads etc.

The SelectRangeEvery is to give me 1% of the frames to test on.

Anything else I can do to improve it?

Thanks in advance.

Zaf
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
01-26-2005, 10:07 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
VMesquita templates were inspired by one of my old script for avi -> kvcd jobs. You give a look to last one and update that part of your current script :

http://www.kvcd.net/forum/viewtopic.php?t=7223
Reply With Quote
  #3  
01-26-2005, 10:17 AM
zafh zafh is offline
Free Member
 
Join Date: Jan 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Dialhot
VMesquita templates were inspired by one of my old script for avi -> kvcd jobs. You give a look to last one and update that part of your current script :

http://www.kvcd.net/forum/viewtopic.php?t=7223
Thanks Phil,

One more really stupid question.

When you say last one do you mean the last on in the list or version 4.
They are numbered backwards.

Zaf
Reply With Quote
  #4  
01-26-2005, 10:17 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
Quote:
Originally Posted by zafh
I am currently capturing a PAL analogue source on my hard drive recorder, then burning it to DVD.

I rip the DVD on my pc and run it through the KDVD templates for CCE by Vmesquita.
A harddrive recorder already uses a non optimal compression, and even when targeting a single DVD-R using the harddiskrecorders internal comprssion will result in a Picture which is anything but not good for a recompression via CCE or whatever.

My 2 cents, do use your harddrive recorder capturing at highest possible quality and keep the capture on its internal HD. If possible do connect your harddrive recorder to the pc and try to access that data from the harddrive recorder (is it possible like if connecting to an ext. Harddrive?).
Reply With Quote
  #5  
01-26-2005, 10:29 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by zafh
When you say last one do you mean the last on in the list or version 4. They are numbered backwards.
As said in top of the message, the old version are given for historical reason, but latest is V4
Reply With Quote
  #6  
01-26-2005, 10:31 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by incredible
A harddrive recorder already uses a non optimal compression, and even when targeting a single DVD-R using the harddiskrecorders internal comprssion will result in a Picture which is anything but not good for a recompression via CCE or whatever.
Last Recoders have a 400 GB disc and a "HQ+" recording mode that is a CBR at 15 MB/s.
Reply With Quote
  #7  
01-26-2005, 10:46 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
YEP, but he said that he captures, burns it ta a DVD-R and on the PC that DVD-R Content will be reencoded So I dont think that this HQ Quality on the HD at 18Mbit/s will be on a HDrecorder-burned DVD-R
Reply With Quote
  #8  
01-26-2005, 11:12 AM
zafh zafh is offline
Free Member
 
Join Date: Jan 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Dialhot
Quote:
Originally Posted by zafh
When you say last one do you mean the last on in the list or version 4. They are numbered backwards.
As said in top of the message, the old version are given for historical reason, but latest is V4
Yup, must read first post later.

I'll let you know how I get on.

Zaf
Reply With Quote
  #9  
01-26-2005, 11:19 AM
zafh zafh is offline
Free Member
 
Join Date: Jan 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by incredible
Quote:
Originally Posted by zafh
I am currently capturing a PAL analogue source on my hard drive recorder, then burning it to DVD.

I rip the DVD on my pc and run it through the KDVD templates for CCE by Vmesquita.
A harddrive recorder already uses a non optimal compression, and even when targeting a single DVD-R using the harddiskrecorders internal comprssion will result in a Picture which is anything but not good for a recompression via CCE or whatever.

My 2 cents, do use your harddrive recorder capturing at highest possible quality and keep the capture on its internal HD. If possible do connect your harddrive recorder to the pc and try to access that data from the harddrive recorder (is it possible like if connecting to an ext. Harddrive?).
Can't connect it to the PC, well not easily anyway.

I can burn my DVDs at the highest setting I can record at which works out at just over an hour on a DVD-R.

I have always assumed is was because my source was mainly fast action that I was having probelms with compression.

Zaf
Reply With Quote
  #10  
01-26-2005, 11:51 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by zafh
I have always assumed is was because my source was mainly fast action that I was having probelms with compression.
Not at all. Recoders often use a CBR method for encoding that set the recorded time whatever the source kind.

SP = 1 hour
LP = 2 hours
ELP = 4 hours...
Reply With Quote
  #11  
01-26-2005, 12:49 PM
zafh zafh is offline
Free Member
 
Join Date: Jan 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Dialhot
Quote:
Originally Posted by zafh
I have always assumed is was because my source was mainly fast action that I was having probelms with compression.
Not at all. Recoders often use a CBR method for encoding that set the recorded time whatever the source kind.

SP = 1 hour
LP = 2 hours
ELP = 4 hours...
Mine has

Fine - 60 mins
SP - 120 mins
LP - 240 mins
EP -360 mins

With 32 in between settings.

Most TV I record and watch at LP.
The quality is good enough to watch for me.
Sports and fast action I record at Fine.

I used to burn my DVD's somewhere between fine and sp depending on the length of footage.

The only footage I have really played around with is wrestling, hence me thinking fast action was my problem.

Still these filters have managed to reduce my file size by about 25%.
~6 hours on a half D1 DVD-R is in my sights.

Zaf
Reply With Quote
  #12  
01-26-2005, 12:51 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by zafh
With 32 in between settings.
These are generally VBR ! Check the manual or your recoder, it should be indicated.

Quote:
Still these filters have managed to reduce my file size by about 25%.
~6 hours on a half D1 DVD-R is in my sights.
Which min and max video bitrate are you using ?

Note: 6hours on a DVD is okay but not wiht fullscreen footage !
Reply With Quote
  #13  
01-26-2005, 01:22 PM
zafh zafh is offline
Free Member
 
Join Date: Jan 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Dialhot
Quote:
Originally Posted by zafh
With 32 in between settings.
These are generally VBR ! Check the manual or your recoder, it should be indicated.
Yup you are right.


Quote:
Quote:
Still these filters have managed to reduce my file size by about 25%.
~6 hours on a half D1 DVD-R is in my sights.
Which min and max video bitrate are you using ?
300 and 2500 with Q 40 in CCE.
Vmesquita defaults.

I haven't really started playing around with these yet.
I was just using them as a constant while testing out the filters.

Quote:
Note: 6hours on a DVD is okay but not wiht fullscreen footage !
I am recording for a friend and average about 3 hours per week.

If I can get 6 hours on one DVD at a watchable quality I will be happy.

What I have managed so far is better than the 3 hours I was getting using DVD shrink.

Zaf
Reply With Quote
  #14  
01-26-2005, 02:45 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Thinks about audio : if the tv show is mono, use mono mp2 at 64 kbit/s. It's far enought.
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Avisynth: Bad interlaced source? tengo6dedos Avisynth Scripting 24 09-18-2009 09:32 PM
Recording Video: Whats better for converting analogue? WOWIEGURL Video Capturing / Recording 0 10-18-2003 08:42 PM
Avisynth: How to select source range with Avisynth? rs008f Avisynth Scripting 4 09-21-2003 11:31 PM
Avisynth: Source conversion? MrTibs Avisynth Scripting 2 06-14-2003 11:50 PM
Avisynth only does the resizing of my source? jrv331 Avisynth Scripting 1 12-04-2002 12:50 AM

Thread Tools



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