[Extractstream [MM]] Re: Avisynth (was: Using LSX to encode DVD)

John Douglass douglass at artships.com
Tue Dec 31 16:56:22 2002


(Scott:  Please note that you should be replying to
extractstream@lists.merlins.org instead of me directly so that
everybody gets to hear you.  Just verify the "To:" field before you
send.)

On Tue, 31 Dec 2002 01:03:46 -0800, Scott Alfter <scott@alfter.us>
wrote:

>On Mon, Dec 30, 2002 at 03:53:10PM -0600, John Douglass wrote:
>> On Mon, 30 Dec 2002 11:31:11 -0800,Scott Alfter <scott@alfter.us
>> wrote:
>> 
>> >On Sun, Dec 29, 2002 at 10:26:49PM -0800, John Douglass wrote:
>> >> On Sun, 29 Dec 2002 14:47:55 -0800, you wrote:
>> >> 
>> >> >I've been using TMPGEnc to encode my extracted videos from my Tivo=
 to
>> >> >DVD, so I can burn some shows off the machine.  I've been using
>> >> >JDouglass's technique to do so =
DVD2AVI->VFAPI->VirtualDub->TMPGEnc->DVD.
>> >> 
>> >> Actually, my technique is more like DVD2AVI->TMPGEnc->DVD.
>> >
>> >That sounds not too different from what I do, except I throw Avisynth
>> >between DVD2AVI and TMPGEnc (it offers much more flexibility in =
editing) and
>> >I encode to SVCD.
>> 
>> Um, care to share your Avisynth script?  I was just starting to get
>> into avisynth before I re-installed WinXP.
>
>Once you've split foo.ty into foo.m2v and foo.m2a, run foo.m2v through
>DVD2AVI to produce foo.d2v, and run foo.m2a through LAME to produce =
foo.wav,

Um, why?  TMPGEnc will also run it through LAME during the transcode.
(Why may become apparent in a moment.)

>something like this will load the files together: (needs mpeg2dec.dll)

You mean the version of mpeg2dec that goes with one's version of
Avisynth, right?  I went to avisynth.org and got version 2.07.  I got
a version of MPEG2DEC.dll, extracted to C:\Avisynth2\plugins, put in
my script:
LoadPlugin("c:\program files\avisynth2\plugins\MPEG2DEC.dll")

>AudioDub(MPEG2Source("foo.d2v"),WAVSource("foo.wav"))

This associates a frameserved video (through DVD2AVI) with a synched
audio that has been converted to 48KHz (for DVD) or 44KHz (for SVCD),
right?

>If your splitter mentioned that you need an audio offset of 5 ms, =
include
>that in the script:
>DelayAudio(.005)

>To get rid of the noise that sometimes appears in the first two =
scanlines,
>try this:

Well, for my "Best quality" recording:
>Crop(0,2,544,478)
>AddBorders(0,2,0,0)

>Get the inverse telecine filter (another DLL) and you can apply that to
>shows that were originally filmed:
>InverseTelecine(40,10,15)

I'm... An unbeliever, here, as I don't see every fourth frame being a
copy of another frame.

>To do non-linear editing, start by loading what you have so far into
>VirtualDub (so you can find your cutpoints).  Create your cuts like this
>(the frame numbers are examples):

>c1=Trim(100,200)

"c1 is that portion of foo.m2v (frameserved as foo.d2v) that has been
muxed with foo.wav between frame 99 and 199 (as the first frame is
numbered 0, not 1)", right?

>c2=Trim(300,400)
>c3=Trim(500,600)
>etc.
>
>Combine them together with UnalignedSplice:
>
>UnalignedSplice(c1,c2,c3)

(Functions that don't appear to yield a value to a variable instead
assign a value to the builtin, understood variable, "last".)

>To load the script into TMPGEnc for encoding, you'll need to disable the
>DirectShow input filter (don't know why you have to do that, but it =
won't
>work if you don't).

Oops.  Just got lost.  Assuming Avisynth has been installed, the above
script, written to the file "foo.avs",  is loaded into TMPGEnc...
Where?  As the video?  I did that, and... Cool!  Both the video and
audio source are "foo.avs", and the output file is "foo.mpg".   

>> >Ouch.  With settings similar to the OP, I can encode the typical =
"1-hour"
>> >show (sans ads) in somewhere around 3 hours.

Are you saying that, now that I have foo.avs loaded in TMPGEnc, and
although the picture in TMPGEnc looks to be 720x480, I still need to
push the TMPGEnc "Start" button to transcode the show to 720x480 and
save it to an mpg file?  And that by letting avisynth do all this
editing and resizing TMPGEnc has little else to do, so the time
TMPGEnc runs is reduced by half?  This I gotta try! 

The script I'm trying is:
LoadPlugin("c:\program files\avisynth2\plugins\MPEG2DEC.dll")
AudioDub(MPEG2Source("serenity.d2v"),WAVSource("serenity.wav"))
DelayAudio(.014)
Crop(0,2,544,478)
AddBorders(0,2,0,0)
BicubicResize(720,480)
#Above three lines are much the same as the following line
#BicubicResize(720,480,0,0.75,0,2,544,478)
#
#	The following Trim lines are not what I'm going to use,
#	they are just examples of the six I will use.
#
c1=Trim(900,-100) 	
# Start with frame 1999, and encode the next 100
c2=Trim(2000,-100)
UnalignedSplice(c1,c2)
# Following line added for TMPGEnc
ConvertToRGB24

 
>> You have this on your website?

>IIRC, the TMPGEnc settings on my TiVo-to-SVCD page are the ones I'm
>currently using.
>http://salfter.dyndns.org

Yeahbut, your website talks about a whole lot of VirtualDub stuff
that, with avisynth, just ain't necessary, right?

John,
Wishing everybody a Happy New Year!
--
"Exodus will never disconnect a spammer. By the time the complaints
reach a level adequate to persuade them, the small-arms fire will
prevent their admins from reaching the servers." -- Clifton T. Sharp



More information about the Extractstream mailing list