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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 18th December 2008, 00:01   #1  |  Link
budinst
Registered User
 
Join Date: Dec 2008
Location: Poland
Posts: 8
AVS script m2v file trouble

Hi,
input jkm_8_12_2008.m2v + jkm_8_12_2008_1.wav and jkm_8_12_2008_2.wav
I open m2v ( DGIndex-brilliant) >> make HDV.d2v >>>make avs script and use VirtualDub

#START AVS script
LoadPlugin("C:\Program Files\GordianKnot\DGMPGDec\DGDecode.dll")
LoadVirtualDubPlugin("E:\instalki_\VirtualDub-1.7.1\plugins\logo17b2\Logo.vdf", "Logo", 0)
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\decomb.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\UnDot.dll")

MPEG2Source("G:\jkm_8_12_2008.d2v")
LanczosResize(1280,720) # Lanczos (Sharp)
video=MPEG2Source("G:\jkm_8_12_2008.d2v")

Tweak(bright=10) #

# DEINTERLACING (1)
#FieldDeinterlace()
FieldDeinterlace(blend=false)
#TomsMoComp(1,5,1)

# DENOISING: choose one combination (or none)
Undot()

audio1 = WAVSource("G:\jkm_8_12_2008_1.wav")
audio2 =WAVSource("G:\jkm_8_12_2008_2.wav")
stereo = MergeChannels(audio1,audio2) # STEREO!
return AudioDub(video, stereo)

Trim(117,3254,false)

#Fade
FadeIn(30)

#Dissove clips, add subtitle
clip1=Trim(0, 110)
clip2=Trim(61, 250).Subtitle("9 grudnia 2008", font="Verdana", size=32, text_color=$FFE87C, x=120, y=660)
clip3=Trim(201, 999999999)
Dissolve(clip1, clip2, clip3, 50)

ConvertToRGB()
Logo(1180, 50, 95, 1, 0, 0, 0, 0, "E:\logo_przezr_rozmiar4.BMP", 0, 125, 200, 0, 0, 9400, 130)
Logo(1180, 50, 95, 1, 0, 0, 0, 0, "E:\logo_przezr_rozmiar4.BMP", 0, 400, 3100, 0, 0, 9400, 3100)
ConvertToYV12()

FadeOut(30)


#END

Hmm not work here:
LanczosResize(1280,720)
Trim(117,3254,false) ( trim audio and video)
subtitle
logo
DEINTERLACING
Tweak
DENOISING

When I remove this audio segment :

audio1 = WAVSource("G:\jkm_8_12_2008_1.wav")
audio2 =WAVSource("G:\jkm_8_12_2008_2.wav")
stereo = MergeChannels(audio1,audio2) # STEREO!
return AudioDub(video, stereo)

All works corretly.

What I want?

1) load movie + audio (two wav file to stereo)
2) Trim audio and movie start and end of movie
3) save wav (stereo audio file -trimmed )
4) compress video (VirtualDub) (here use : logo , subtitle and other function) -
5) mux compressed video and wav audio with NanDub

any sugestion?
budinst is offline   Reply With Quote
Old 18th December 2008, 10:56   #2  |  Link
hanfrunz
Registered User
 
hanfrunz's Avatar
 
Join Date: Feb 2002
Location: Germany
Posts: 540
Do you get an errormessage, and if which one?
hanfrunz is offline   Reply With Quote
Old 18th December 2008, 12:10   #3  |  Link
budinst
Registered User
 
Join Date: Dec 2008
Location: Poland
Posts: 8
script is full of bugs
budinst is offline   Reply With Quote
Old 18th December 2008, 13:04   #4  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: UK
Posts: 1,673
I'm guessing you're new to AVIsynth and this is based on a template script? If so, here's some help...

Lines of AVIsynth script which don't start with some_variable_name=some_function will put the output of that line into a variable called "last".
Lines of AVIsynth script which don't say which video they are processing will use the variable "last" as an input.

So, if you don't have any "=" in your script, you process one video, always automatically storing it in the variable "last".

Your first problem is that you do most things to the default "last" video stream, but also load a stream into the variable "video" which you then never process.

Your second "problem" is that you're using "return" - that tells AVIsynth to return the value at that point - the rest of the script won't ever be used!

Try something like this...
PHP Code:
#START AVS script
LoadPlugin("C:\Program Files\GordianKnot\DGMPGDec\DGDecode.dll")
LoadVirtualDubPlugin("E:\instalki_\VirtualDub-1.7.1\plugins\logo17b2\Logo.vdf""Logo"0)
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\decomb.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\UnDot.dll")

MPEG2Source("G:\jkm_8_12_2008.d2v")
LanczosResize(1280,720# Lanczos (Sharp)

Tweak(bright=10#

# DEINTERLACING (1)
#FieldDeinterlace()
FieldDeinterlace(blend=false)
#TomsMoComp(1,5,1)

# DENOISING: choose one combination (or none)
Undot()

audio1 WAVSource("G:\jkm_8_12_2008_1.wav")
audio2 =WAVSource("G:\jkm_8_12_2008_2.wav")
stereo MergeChannels(audio1,audio2# STEREO!

AudioDub(laststereo)

Trim(117,3254,false)

#Fade
FadeIn(30)

#Dissove clips, add subtitle
clip1=Trim(0110)
clip2=Trim(61250).Subtitle("9 grudnia 2008"font="Verdana"size=32text_color=$FFE87Cx=120y=660)
clip3=Trim(201999999999)
Dissolve(clip1clip2clip350)

ConvertToRGB()
Logo(1180509510000"E:\logo_przezr_rozmiar4.BMP"0125200009400130)
Logo(1180509510000"E:\logo_przezr_rozmiar4.BMP"040031000094003100)
ConvertToYV12()

FadeOut(30
I don't know if that will do what you want, but it's removed the two problems I described above.

Hope this helps.

Cheers,
David.
2Bdecided is offline   Reply With Quote
Old 18th December 2008, 13:42   #5  |  Link
budinst
Registered User
 
Join Date: Dec 2008
Location: Poland
Posts: 8
Wow!
work perfectly !
I translate all and respond more.
Best Regards
Andrzej Wayda
budinst is offline   Reply With Quote
Old 19th December 2008, 00:17   #6  |  Link
budinst
Registered User
 
Join Date: Dec 2008
Location: Poland
Posts: 8
Yes I'm new in AVIsynth and realy I used template script's .For me it is clearl how to find the end of segment ( early Fortran software)
this "last" video stream really shows when to add audio and later trimm Video and audio.. Thanks .
I need the "last" when I want to add two other movies, one insert before and other insert after precessed segment ( movie1.avi and movie2.avi ). How to dissolve this ? movie1.avi and movie2.avi have audio (wav) and same size (1280 x 720) or other. . How to make it ?

Regards Andrzej
budinst is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:04.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.