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 29th March 2007, 18:53   #621  |  Link
boombastic
Registered User
 
Join Date: Oct 2003
Location: Ascoli Piceno-Italy
Posts: 279
Sorry if this has already been asked but i'd like to backup the script i made to an avi encoded with xvid and ,possibly with ac3 or mp3 audio.
I know that i can call avs2avi but how can i specify xvid options and parameters?
For the audio part how can i do?
boombastic is offline   Reply With Quote
Old 29th March 2007, 19:31   #622  |  Link
boombastic
Registered User
 
Join Date: Oct 2003
Location: Ascoli Piceno-Italy
Posts: 279
i'm almost done with this script:
mpeg2source("E:\Black2\prova.d2v")
trim(0,172155)
Crop(8,120,-8,-120)
parity = GetParity() ? 1 : 0
LeakKernelDeint(threshold=4,twoway=true,order=1)
LRemoveDust_YV12(1)
dull = last
sharp = dull.LimitedSharpenFaster()
Soothe( sharp, dull, 20 )
ColorMatrix()
a=last
b=mpeg2source("E:\Black2\prova.d2v")
b=b.trim(172156,177132)
b=b.Crop(8,120,-8,-120)
b=b.TomsMoComp(1,1,1)
video=a+b
audio=NicAC3Source("E:\Black2\prova T01 2_0ch 256Kbps DELAY -384ms.ac3")
Audiodub(video,audio)
DelayAudio(-0.384)

but now the problem of how to tell avs2avi the xvid parameters(q value,trellis,vhq mode,ecc...) remains,any clue?
boombastic is offline   Reply With Quote
Old 29th March 2007, 21:37   #623  |  Link
qwerpoi
Registered User
 
qwerpoi's Avatar
 
Join Date: Oct 2002
Posts: 298
Quote:
Originally Posted by boombastic View Post
but now the problem of how to tell avs2avi the xvid parameters(q value,trellis,vhq mode,ecc...) remains,any clue?
The way avs2avi works with xvid is by running the xvid configuration gui. In other words, open your script in AvsP, run "Tools -> Save as avi...", in the dialog that shows up select the number of passes and hit run. The rest is taken care of by avs2avi, it will show you the standard video codec configuration dialog, select xvid as the compressor and hit the configure button, etc. If you're running 2 passes, the video codec configuration dialog will show up twice.

If you'd rather specify all your parameters without a gui, then you need to use a special build of xvid, xvid encraw. In this case instead of using AvsP's avs2avi dialog, you should using a macro. You can check out the "Encoding example" or "Encoding example 2" macro to get you started.
qwerpoi is offline   Reply With Quote
Old 30th March 2007, 09:10   #624  |  Link
jolson
Registered User
 
Join Date: Dec 2006
Posts: 117
Maybe the avs2qxvid.bat could help...?
http://forum.doom9.org/showthread.php?t=119500
jolson is offline   Reply With Quote
Old 30th March 2007, 17:03   #625  |  Link
boombastic
Registered User
 
Join Date: Oct 2003
Location: Ascoli Piceno-Italy
Posts: 279
Quote:
Originally Posted by jolson View Post
Maybe the avs2qxvid.bat could help...?
http://forum.doom9.org/showthread.php?t=119500
Yes thatcould be usefull but someone(i'm not able but i can try...) sholud create a Macro for AvsP that encode the current script with avs2qxvid.The best thing would be that this macro let the user input the TGHQ-CT, TGFAST-CT, TGEDIT-00, TGANIME-00.or MTK-CT parameter for the bat file....
boombastic is offline   Reply With Quote
Old 2nd April 2007, 20:23   #626  |  Link
martino
masktools2 (ab)user
 
martino's Avatar
 
Join Date: Oct 2006
Location: PAL-I :(
Posts: 235
I keep getting an error when I want to open just a simple AVS script, only with AviSource() in it;
Code:
Traceback (most recent call last):
  File "AvsP.py", line 4552, in OnMenuFileOpen
  File "AvsP.py", line 6200, in OpenFile
  File "wx\stc.pyo", line 2842, in SetText
  File "encodings\cp1252.pyo", line 22, in decode
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 49: character maps to <undefined>
The script opens up fine in VDub and media players though and even encoding works without any problems...

UPDATE: Looks like changing the input avi filename resolved this issue... :/

Last edited by martino; 2nd April 2007 at 20:26.
martino is offline   Reply With Quote
Old 6th April 2007, 22:08   #627  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,867
avsp 1.3.7 bug

Pixel color display in YUV mode, shows wrong values.
Code:
colorbars(pixel_type="YV12")
click on the yellow bar, it should read 161, not 159.
But thanks for adding this feature, I've been waiting a long time to have it
ps you can't just convert from rgb, some YUV can't be displayed as well. There's several yuv that can map to one rgb.
The main reason I wanted it is to measure yuv colors ;(

Last edited by jmac698; 6th April 2007 at 22:12.
jmac698 is offline   Reply With Quote
Old 7th April 2007, 00:44   #628  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
Do this:
StackHorizontal(StackVertical( \
ConvertToRGB(matrix="bt.601"), \
ConvertToRGB(matrix="pc.601")), \
StackVertical( \
ConvertToRGB(matrix="bt.709"), \
ConvertToRGB(matrix="pc.709")), \
)

One of them is bound to match your expectations, unless you use a totally different colormatrix. (I don't think any of them will give you 159 or 161 - $99 or $A1 - unless you're converting back to yuv by hand.)

Oh! And make sure you use avisynth 2.5.7. There was a lot of discussion between .6 and .7 about colorbars, and some changes were made to it.

I can throw together a small plugin that just plops YUV values into RGB if you'd like that. Since it probably isn't particularly easy to get it to show in avsp otherwise.
foxyshadis is offline   Reply With Quote
Old 7th April 2007, 04:03   #629  |  Link
qwerpoi
Registered User
 
qwerpoi's Avatar
 
Join Date: Oct 2002
Posts: 298
Quote:
Originally Posted by martino View Post
I keep getting an error when I want to open just a simple AVS script, only with AviSource() in it;
Code:
Traceback (most recent call last):
  File "AvsP.py", line 4552, in OnMenuFileOpen
  File "AvsP.py", line 6200, in OpenFile
  File "wx\stc.pyo", line 2842, in SetText
  File "encodings\cp1252.pyo", line 22, in decode
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 49: character maps to <undefined>
The script opens up fine in VDub and media players though and even encoding works without any problems...

UPDATE: Looks like changing the input avi filename resolved this issue... :/
Thanks for bringing that up, I'll try and get this and the other unicode issues squared away for the next release.

Quote:
Originally Posted by jmac698 View Post
avsp 1.3.7 bug

Pixel color display in YUV mode, shows wrong values.
Code:
colorbars(pixel_type="YV12")
click on the yellow bar, it should read 161, not 159.
But thanks for adding this feature, I've been waiting a long time to have it
ps you can't just convert from rgb, some YUV can't be displayed as well. There's several yuv that can map to one rgb.
The main reason I wanted it is to measure yuv colors ;(
I'm not very knowledgeable about color space conversions, as you guessed all I did was use the rgb to yuv conversions (rec601) as pointed out in this thread. At the time that was the only way I could handle it, since the frames were being passed to AvsP in rgb. In the next version, AvsP will be doing more direct communication with AviSynth (thanks to contributions from tsp), so this way of handling things may change (once I get everything figured out).
qwerpoi is offline   Reply With Quote
Old 7th April 2007, 04:31   #630  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,867
You mean like this?
Code:
Function mapYUVtoRGB(clip Y) {
  U=Y.UToY().pointresize(Y.width,Y.height)#yv12 is scaled 2x, 2y
  V=Y.VtoY().pointresize(Y.width,Y.height)#yuy2 is scaled 2x
  Return (MergeRGB(V,Y,U))
}
I *know* the yellow bar is Y=161, it's displayed wrong in the status bar. And actually, I'm the one who initiated the new colorbars :-) It's supposed to be 162, but alas I'm only using 2.56 right now (I don't know why..?)
jmac698 is offline   Reply With Quote
Old 7th April 2007, 06:36   #631  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
Hey, that's a neat little method, and I was trying so hard to think of a way to do it without a custom function, too. ;p

It's listed as A2, 162, in the G/Y on mine. Do you have photoshop, or some other editor you can collect per-channel values from? It might be that it's actually coming through as 159 for some bizarre reason.
foxyshadis is offline   Reply With Quote
Old 14th April 2007, 22:29   #632  |  Link
ChiDragon
Registered User
 
ChiDragon's Avatar
 
Join Date: Sep 2005
Location: Vancouver
Posts: 600
Been a while since I've used AvsP, is there a toggle for true/false or could this be added? Like right-click or use a keyboard shortcut to change a true value to false or vice-versa.
ChiDragon is offline   Reply With Quote
Old 15th April 2007, 19:03   #633  |  Link
qwerpoi
Registered User
 
qwerpoi's Avatar
 
Join Date: Oct 2002
Posts: 298
Quote:
Originally Posted by ChiDragon View Post
Been a while since I've used AvsP, is there a toggle for true/false or could this be added? Like right-click or use a keyboard shortcut to change a true value to false or vice-versa.
No, currently there's no way to do it. At the moment, I'm working on a way to automatically build user sliders for every single function in a script (check boxes for true/false arguments, list boxes for string arguments), but it probably won't be in the next release. Incidentally, the next release will be in about a week, if everything goes well. This release will focus on improved communication between AviSynth and AvsP, should be good stuff. Once that release is ironed out, the plan is to have the automated sliders in the following release.
qwerpoi is offline   Reply With Quote
Old 15th April 2007, 23:56   #634  |  Link
ChiDragon
Registered User
 
ChiDragon's Avatar
 
Join Date: Sep 2005
Location: Vancouver
Posts: 600
Alright cool, thanks. For the moment I'm "tagging selection for toggling" and using that to alternate between the default and my changed value.
ChiDragon is offline   Reply With Quote
Old 17th April 2007, 14:28   #635  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
not sure if this is worth pursuing or not (probably not), but i have a dream of writing a big RGBlut for lift, gain and gamma, and then using my wiimote + nunchuk to control the values in avsp.

is it possible to somehow tie a slider to an input device like a joystick?
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 17th April 2007, 19:03   #636  |  Link
qwerpoi
Registered User
 
qwerpoi's Avatar
 
Join Date: Oct 2002
Posts: 298
Quote:
Originally Posted by ChiDragon View Post
Alright cool, thanks. For the moment I'm "tagging selection for toggling" and using that to alternate between the default and my changed value.
As I mentioned, there's no quick keyboard shortcut, but as an alternative to toggle selections, you could use a user slider like this:
Code:
AVISource("C:\test.avi", audio=Select([<"audio", 0, 1, 0>], False, True))
A bit chunky, so it's up to you how you want to do it. Like I said, I'm working on a way to streamline the process, so think of these as more or less temporary solutions.

Quote:
Originally Posted by Mug Funky View Post
not sure if this is worth pursuing or not (probably not), but i have a dream of writing a big RGBlut for lift, gain and gamma, and then using my wiimote + nunchuk to control the values in avsp.

is it possible to somehow tie a slider to an input device like a joystick?
Are you serious? If you are, then yes, I believe it's doable. I'll take a look into it, if it's not too difficult I'll try and implement it (although probably not in time for the coming release). I imagine you'd be in the vast minority of people using the feature, though
qwerpoi is offline   Reply With Quote
Old 18th April 2007, 15:35   #637  |  Link
Dr.Khron
Registered User
 
Dr.Khron's Avatar
 
Join Date: Oct 2006
Location: Gotham City, USA
Posts: 389
I just started using all the power features in AvsP... VERY cool program, much thanks to the developer.

Ok, so I've got an odd issue... Is there any way to set the FPS the program uses to determine time stamps?

My current script loads a D2V file with DGDecode. The DVD is NTSC material: 720x480 at 29.97 FPS. However, the program displays the video as being 640x480 at 23.976 FPS.

This causes descrepancies between frame counts and various time stamps... its a pain in the ass to try and convert frame counts into times for the TextSub filter and other things.

EDIT:
DOH. I just realized that AvsP is displaying the information for the ouput file... my de-interlace routine causes the FPS to change, and I resize the video in the course of the script.

Still doesn't solve my problem, tho...

EDIT:
Yes, it actually does solve my problem... as long as I use the 23.976 for my FPS, all of the frame math works out (for filters added after de-interlacing, anyway).

Last edited by Dr.Khron; 18th April 2007 at 15:47.
Dr.Khron is offline   Reply With Quote
Old 19th April 2007, 14:25   #638  |  Link
tony62
Registered User
 
tony62's Avatar
 
Join Date: Dec 2006
Location: UK
Posts: 12
Hello and thank you for this great tool.
I have a problem with the avs2avi side of life though.
I have downloaded avs2avi-139.zip unzipped and specified the path within AvsP(and restarted). I have written a simple scipt:

LoadPlugin("C:\Documents and Settings\Tony62\My Documents\Downloads\DGDecode.dll")
MPEG2Source("C:\Documents and Settings\Tony62\My Documents\Working Folder\VTS_01_1.d2v", cpu=0)
Crop(0, 74, -0, -66)

and all runs well in MPC or VirtualDubMod.
The problem comes when i 'save as avi', avs2avi.exe launchs within task manager then disappears

Any help would be appreciated
tony62 is offline   Reply With Quote
Old 20th April 2007, 07:52   #639  |  Link
qwerpoi
Registered User
 
qwerpoi's Avatar
 
Join Date: Oct 2002
Posts: 298
Quote:
Originally Posted by tony62 View Post
The problem comes when i 'save as avi', avs2avi.exe launchs within task manager then disappears

Any help would be appreciated
Ah, it's been I while since I did work on the avs2avi gui. It looks like the problem is caused by spaces in the filename - try saving the avisynth script to a directory without spaces (C:\test.avs or something), it should work then. I'll try and have that fixed up by the next release.
qwerpoi is offline   Reply With Quote
Old 20th April 2007, 18:30   #640  |  Link
tony62
Registered User
 
tony62's Avatar
 
Join Date: Dec 2006
Location: UK
Posts: 12
Quote:
Originally Posted by qwerpoi View Post
Ah, it's been I while since I did work on the avs2avi gui. It looks like the problem is caused by spaces in the filename - try saving the avisynth script to a directory without spaces (C:\test.avs or something), it should work then. I'll try and have that fixed up by the next release.
Thanks for the prompt reply and yes you are correct that saving my .avs to C:\bla_bla.avs works like a charm You won't believe how long i spent trying to solve the problem before posting
I'm looking forward to your resizing calculator. Will it be completed also in the next version?
Again, good work and thanks!!
tony62 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 00:40.


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