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 3rd May 2007, 14:43   #701  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
That particular location is trying to find the location of the avisynth install, so whatever location is in HKLM\Software\Avisynth\@Default in the registry is probably pointing to a location with unicode characters in it. value.encode('ascii') fails on those types of conversions.

I guess one fix would be to move avisynth into another place, like the avsp folder, for now.

Something that'll help people in the future would be replacing line 3399-3400,
Code:
            if os.path.isdir('C:\\Program Files\\AviSynth\\'):
                self.options['avisynthdir'] = 'C:\\Program Files\\AviSynth\\'
with
Code:
            if os.path.isdir(os.environ.get("PROGRAMFILES")+'\\AviSynth\\'):
                self.options['avisynthdir'] = os.environ.get("PROGRAMFILES")+'\\AviSynth\\'
which will work with international installs and anything on non-standard drives, even though that won't fix this exact error. For fixing, is .encode('ascii') necessary? It works fine without, but I also haven't tested it on a folder with upper characters.
foxyshadis is offline   Reply With Quote
Old 3rd May 2007, 17:58   #702  |  Link
AlanHK
Registered User
 
Join Date: May 2006
Posts: 237
Is there a function to get the bookmark list as text?

I know I could make a macro if there isn't, but would rather not reinvent the wheel.

Also, I saw a function "Insert bookmark Trims (keyboard shortcut Ctrl-I), AvsP will insert a sequence of Trim commands into your script based on the bookmarks" which appears to not be in the current version, perhaps seen as replaced by the Trim Editor. If so, is there a way for the Trim editor to use bookmarks?

And more ambitiously, is there a way to input bookmarks &/or trims as a list instead of through the GUI?

Last edited by AlanHK; 3rd May 2007 at 18:21.
AlanHK is offline   Reply With Quote
Old 3rd May 2007, 21:26   #703  |  Link
qwerpoi
Registered User
 
qwerpoi's Avatar
 
Join Date: Oct 2002
Posts: 298
Quote:
Originally Posted by Aeolis View Post
Hello folks,

I really would like to congratulated AvsP developer for its wonderful work. Excellent software! I have tried to run AvsP 1.38 in my system, but it never runs it always displays this error log:

[Wed Apr 25 12:13:09 2007]
Traceback (most recent call last):
File "AvsP.py", line 9301, in ?
File "wx\_core.pyo", line 7700, in __init__
File "wx\_core.pyo", line 7352, in _BootstrapApp
File "AvsP.py", line 9293, in OnInit
File "AvsP.py", line 2988, in __init__
File "AvsP.py", line 3407, in getOptionsDict
UnicodeEncodeError: 'ascii' codec can't encode characters in position 28-29: ordinal not in range(128)

Somebody help me! I really love this software because I use Avisynth several times for video editing, so AvsP is a must for me. Please, any ideas?

See you later,

Aeolis
It looks like foxyshadis is right, basically AvsP is supposed to get the Avisynth installation directory from the registry but choked on the unicode pathname. It looks like I'll release a bugfix version as soon as I can (hopefully within the week, but I can't guarantee it). The bugfix version will have no new messages to make it easier on translators.

Quote:
Originally Posted by Rachima View Post
Hi qwerpoi,

it's me again,
maybe there is an alternative solution for COM. For my app it is possible to use PIPE instead of COM. I have done a test with new installed Python on my system :
import subprocess
process = subprocess.Popen('C:/test.exe', shell=True, stdout=subprocess.PIPE)
process.wait()
Text = process.stdout.read()

This works on system, but not with AvsP-Macro.
Error-MsgBox is: "an integer is required"
and it is meant to "stdout=subprocess.PIPE" in Popen
I also have tried "stdout=-1", what work on system too, but also not in AvsP-Macro. (AvsP binary Version 1.3.7 + 1.3.8)
(My PythonVersion on system is 2.5)


Rachima
I get the same error using AvsP 1.3.8, which was compiled using Python 2.4. I don't get the error when compiling AvsP with Python 2.5. So hopefully the next release will allow things to work properly. If you could use subprocess instead of win32com.client, that would be fantastic, since it will keep the distribution size down. I'll still consider including win32com if there are other developers who absolutely require it.

Quote:
Originally Posted by AlanHK View Post
Is there a function to get the bookmark list as text?

I know I could make a macro if there isn't, but would rather not reinvent the wheel.

Also, I saw a function "Insert bookmark Trims (keyboard shortcut Ctrl-I), AvsP will insert a sequence of Trim commands into your script based on the bookmarks" which appears to not be in the current version, perhaps seen as replaced by the Trim Editor. If so, is there a way for the Trim editor to use bookmarks?

And more ambitiously, is there a way to input bookmarks &/or trims as a list instead of through the GUI?
Other than a macro, there isn't a way to save the bookmark list as a text file. In case someone wants it, here's a simple macro to do it:
Code:
filename = avsp.GetSaveFilename(title='Save bookmarks to text file')
f = open(filename, 'w')
for bm in avsp.GetBookmarkList():
    f.write(str(bm)+'\n')
f.close()
Also, you're correct, the function "Insert bookmark trims" was removed and replaced with the trim editor. If you want to use the bookmarks for trimming you can write a macro, but it may make more sense to simply insert selection start/stop points using the Home and End keyboard shortcuts instead of using bookmarks.

And currently there's no way to input bookmarks other than the gui or saving a session. If it would be helpful, I could add a macro to set bookmarks, that way you could set bookmarks from a given text file.

Last edited by qwerpoi; 3rd May 2007 at 21:30.
qwerpoi is offline   Reply With Quote
Old 4th May 2007, 04:58   #704  |  Link
AlanHK
Registered User
 
Join Date: May 2006
Posts: 237
Quote:
Originally Posted by qwerpoi View Post
Other than a macro, there isn't a way to save the bookmark list as a text file. In case someone wants it, here's a simple macro to do it:
Thanks, that's good.
How could I just paste the list to the clipboard?


Quote:
Originally Posted by qwerpoi View Post
If it would be helpful, I could add a macro to set bookmarks, that way you could set bookmarks from a given text file.
Thanks. It might be useful to stash them in the AVS file in some #~ format, like sliders, so they could be reloaded semi-automatically (you should have an option to load or ignore).

Quote:
Originally Posted by qwerpoi View Post
it may make more sense to simply insert selection start/stop points using the Home and End keyboard shortcuts instead of using bookmarks.
That works, but the action of creating the Trim list changes the bookmarks, which I want to keep in their original places to check transitions.
What I'm doing is making a sequence of nologo filters, marking on and off as the logo appears with bookmarks, so the original trim list format was closest to that; I don't actually want to delete anything from the video, just run a filter on different sections.
If I persist I can probably work out how to make a Python macro to do it all, but at the moment I use Ultraedit.

I just found the "scrap window". It seems that the toggle off control-P doesn't work if the cursor is in the scrap window...

An observation: I see a few spelling mistakes in the macro files comments. Eg:
Quote:
# This example shows how to use AvsP's macros to turn AviSynth into an
# all-puropose image editor. It's similar to the batch example, but instead
And in HTML docs:

Quote:
Trimming video is fairly straightforward in AviSynth with the Trim() command. However, it can get a bit unweildy
Doing a spellcheck would find most of these.

Last edited by AlanHK; 4th May 2007 at 17:52.
AlanHK is offline   Reply With Quote
Old 4th May 2007, 22:33   #705  |  Link
Rachima
Registered User
 
Rachima's Avatar
 
Join Date: Apr 2007
Location: Cologne / Germany
Posts: 15
Macro, using PIPES, also VB6-Sourcecode attached

Hi,

Quote:
Originally Posted by qwerpoi View Post
I get the same error using AvsP 1.3.8, which was compiled using Python 2.4. I don't get the error when compiling AvsP with Python 2.5. So hopefully the next release will allow things to work properly.
by testing I accidently run this code in AvsP 1.3.8 instead of my IDE, and was wondering that it now runs without errors:
Code:
process = subprocess.Popen([exefile, params], shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
when explicitly set all three streams, stdin stdout stderr, it runs. Just curious.


Quote:
Originally Posted by qwerpoi View Post
If you could use subprocess instead of win32com.client, that would be fantastic, since it will keep the distribution size down. I'll still consider including win32com if there are other developers who absolutely require it.
To use COM maybe necessary or _must_be, when there is (more) interaction between AvsP and the called App. For my app, it is only necessary to get an initially input and to write the result back.
I have attached a sample Macro, with dummy exe and even Sourcecode in VB6 showing how to use stdIn & stdOut.

(I also have decided to write my app as a AvsP-Plugin only, because now I have seen how much power there is in AvsP. )


Rachima
Attached Files
File Type: 7z PIPES.7z (10.0 KB, 59 views)
Rachima is offline   Reply With Quote
Old 6th May 2007, 03:22   #706  |  Link
qwerpoi
Registered User
 
qwerpoi's Avatar
 
Join Date: Oct 2002
Posts: 298
New version 1.3.9, download from the AvsP download page or from the mirror. This version is actually compatible with both XP and win98. As a result, the directory structure is a little different, so in order to upgrade, you should unzip the file to a new directory and transfer over your *.dat files (you can read a bit more detail at the download page). This is a bugfix version, so the changelog's relatively small:
Code:
* remember the last saved image path (suggested by 3ngel)

* changed "Show calltip" to work when cursor is in filter name (thanks AlanHK)

* changed editor to properly clear undo buffer when loading a file

* merged windows xp and 98 versions

+ fixed parity info reported by AvsP (thanks krisq, ChiDragon)

+ fixed crash when switching zoom modes (thanks Alain2)

+ fixed unnecessary scrollbars with zoom "fit inside window" (thanks foxyshadis)

+ fixed unicode bug when saving script

+ fixed unicode bug with recent file list (thanks Henrikx)

+ fixed unicode bug with Avisynth install directory (thanks Aeolis, foxyshadis)

+ minor fixes to window layout code
The changes in this version are pretty much self explanatory. The size of the distribution file is actually smaller this version, for those curious it was mainly achieved by the different directory structure and using upx lzma compression.

In order to make things easier for translators, this version has no new messages, ie, the v1.3.8 translation is compatible with v1.3.9. There were some fairly easy feature requests that did not make it to this version because I didn't want to add any new messages, so for those requesters, I offer a small apology, you'll have to wait patiently for the next version. The main reason I wanted to release this version now is because it seems AvsP wouldn't run at all if you installed AviSynth in a directory with unicode characters, a big mistake. Hopefully everything works properly now.

Since it's important, I'll emphasize one last time that to upgrade from an older version you can't simply replace the AvsP.exe anymore since it's no longer contained in a single executable (read more details here). Anyway, I'm guessing the next version won't be for a while, since I still have a lot of work to do on the automated user slider concept. Still, be sure to report back with any new problems or requests.

Last edited by qwerpoi; 6th May 2007 at 03:32.
qwerpoi is offline   Reply With Quote
Old 6th May 2007, 09:32   #707  |  Link
Alain2
Registered User
 
Join Date: May 2005
Posts: 236
Thanks qwerpoi, will try asap About the workload for translators, to be honest I don't see the problem, the last release had a few more strings to translate but the amount was similar to previous versions (looking in the translation.py file I see that I translated similar amounts for 1.2.1), it didn't take me long to translate them. Don't restrain yourself for this
Alain2 is offline   Reply With Quote
Old 6th May 2007, 10:34   #708  |  Link
Henrikx
Registered User
 
Henrikx's Avatar
 
Join Date: Aug 2005
Location: Germany
Posts: 306
Quote:
the v1.3.8 translation is compatible with v1.3.9.
German translation v.1.3.8 does not function.
Any idea ?
__________________
Henrikx
Henrikx is offline   Reply With Quote
Old 6th May 2007, 12:03   #709  |  Link
max24
Registered User
 
Join Date: Nov 2006
Posts: 14
Hi,

version 1.3.9 doesn't the file provide "translation.pyo" can it because of it be?
max24 is offline   Reply With Quote
Old 6th May 2007, 13:12   #710  |  Link
Henrikx
Registered User
 
Henrikx's Avatar
 
Join Date: Aug 2005
Location: Germany
Posts: 306
@max24
Maybe ? Only qwerpoi knows !
In moment, i "clean" the old version,but i dont think that is the mistake.I can be mistaken....
__________________
Henrikx
Henrikx is offline   Reply With Quote
Old 6th May 2007, 15:23   #711  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
IMHO,
Rahima's suggestion is important.
It wold be great to have language-independen plugin API in AvsP.
But implementation may be various.
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.
Fizick is offline   Reply With Quote
Old 6th May 2007, 15:53   #712  |  Link
Aeolis
Registered User
 
Join Date: Apr 2007
Posts: 5
Hello folks,

Thank you very much qwerpoi! Now it works. Thank you.

See you later,

Aeolis
Aeolis is offline   Reply With Quote
Old 6th May 2007, 16:57   #713  |  Link
Aeolis
Registered User
 
Join Date: Apr 2007
Posts: 5
Hello folks,

It’s me again. I entered the path to a external player in AvsP Program Options: “C:\Arquivos de programas\Edição e Criação de Filmes e DVD\Media Player Classic\mplayerc.exe” and I had the following error after reopening AvsP:

[Sun May 06 12:02:23 2007]
Traceback (most recent call last):
File "AvsP.py", line 9358, in <module>
File "wx\_core.pyo", line 7700, in __init__
File "wx\_core.pyo", line 7352, in _BootstrapApp
File "AvsP.py", line 9350, in OnInit
File "AvsP.py", line 3026, in __init__
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position 28: ordinal not in range(128)

So, I decided to erase the option.dat file in AvsP folder and everything went back to normal if I try to enter the external player path the problem gets back. I think there is a Unicode problem to the path of external player too. qwerpoi if you can take a look on that issue I will be really happy and grateful. Thank you one more time for your attention.

See you later,

Aeolis
Aeolis is offline   Reply With Quote
Old 6th May 2007, 17:10   #714  |  Link
lolent
Registered User
 
lolent's Avatar
 
Join Date: Jul 2006
Posts: 30
Thanks for the new version qwerpoi , I will test it
lolent is offline   Reply With Quote
Old 6th May 2007, 17:14   #715  |  Link
Henrikx
Registered User
 
Henrikx's Avatar
 
Join Date: Aug 2005
Location: Germany
Posts: 306
I create a "clean" new German Language file.( 1:1) But nothing.
AvsP will not work with the new,too ?
I have no more ideas !!
Language files :
http://forum.gleitz.info/showpost.ph...3&postcount=14
__________________
Henrikx
Henrikx is offline   Reply With Quote
Old 6th May 2007, 19:00   #716  |  Link
Terranigma
*Space Reserved*
 
Terranigma's Avatar
 
Join Date: May 2006
Posts: 953
lolent, have you been able to vent that problem you've been having with AvsP? I have a pretty good idea what's causing the problem, as i've gotten the same exact error message earlier today that you've shown with the screenshot. It has to do with your plugins/scripts, so it's not an avsp problem. You could fix this by manually going to your plugins folder, right-click and choose "Arrange Icons By Modified"; Then either delete or move your latest modified plugins 1 by 1 while hitting F5 with avsp and see if it generates a preview.
Terranigma is offline   Reply With Quote
Old 6th May 2007, 19:49   #717  |  Link
krisq
Registered User
 
Join Date: Dec 2003
Location: Poland
Posts: 171
qwerpoi
__________________
(!sig)
krisq is offline   Reply With Quote
Old 6th May 2007, 19:55   #718  |  Link
qwerpoi
Registered User
 
qwerpoi's Avatar
 
Join Date: Oct 2002
Posts: 298
Quote:
Originally Posted by Henrikx View Post
German translation v.1.3.8 does not function.
Any idea ?
Oh cr**! The new directory structure alters how AvsP looks for python files to import - you'll need to add the translation.py file into the library.zip file in the lib directory (just drag translation.py into the zip file). Very sorry about that. Sigh. I may release another version within a week which will have this fixed up.

Quote:
Originally Posted by Alain2 View Post
Thanks qwerpoi, will try asap About the workload for translators, to be honest I don't see the problem, the last release had a few more strings to translate but the amount was similar to previous versions (looking in the translation.py file I see that I translated similar amounts for 1.2.1), it didn't take me long to translate them. Don't restrain yourself for this
I wasn't so worried about the amount of translation work, I was just trying to give translators some time to catch up. Right now it's a little clunky when you are in the middle of translating a new version and a newer version comes out. Again, I'm going to try and make some sort of tool that simplifies things, roughly speaking it will import an older translation file and place all identical messages into the current one.

Quote:
Originally Posted by Fizick View Post
IMHO,
Rahima's suggestion is important.
It wold be great to have language-independen plugin API in AvsP.
But implementation may be various.
It's something that has crossed my mind. I believe that Rahima's approach works well, the plugin is written as an executable which can communicate with stdout pipe, and interfaced through AvsP with a macro. The only thing that needs changing is that there should be a separate directory for plugins (instead of adding it to the macros) and that there should be more macro functions exposed for plugins to give direct access to some of AvsP's databases. I'll try and rewrite the avs2avi gui as a plugin and see how it goes.

Quote:
Originally Posted by Aeolis View Post
I entered the path to a external player in AvsP Program Options: “C:\Arquivos de programas\Edição e Criação de Filmes e DVD\Media Player Classic\mplayerc.exe” and I had the following error after reopening AvsP:

[Sun May 06 12:02:23 2007]
Traceback (most recent call last):
File "AvsP.py", line 9358, in <module>
File "wx\_core.pyo", line 7700, in __init__
File "wx\_core.pyo", line 7352, in _BootstrapApp
File "AvsP.py", line 9350, in OnInit
File "AvsP.py", line 3026, in __init__
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position 28: ordinal not in range(128)
Oof, thanks for bringing it up. I'll check it out and have it fixed by the next version.

Quote:
Originally Posted by Terranigma View Post
lolent, have you been able to vent that problem you've been having with AvsP? I have a pretty good idea what's causing the problem, as i've gotten the same exact error message earlier today that you've shown with the screenshot. It has to do with your plugins/scripts, so it's not an avsp problem. You could fix this by manually going to your plugins folder, right-click and choose "Arrange Icons By Modified"; Then either delete or move your latest modified plugins 1 by 1 while hitting F5 with avsp and see if it generates a preview.
Thanks for pointing this out, I really need to get an faq put together. I'll have the error message be more clear, and perhaps I'll make the error message have a suggestion to examine any unstable plugins as you point out.
qwerpoi is offline   Reply With Quote
Old 6th May 2007, 23:07   #719  |  Link
Henrikx
Registered User
 
Henrikx's Avatar
 
Join Date: Aug 2005
Location: Germany
Posts: 306
@qwerpoi
THX
Difficult birth!
Update German Translation.......
__________________
Henrikx
Henrikx is offline   Reply With Quote
Old 7th May 2007, 00:00   #720  |  Link
lolent
Registered User
 
lolent's Avatar
 
Join Date: Jul 2006
Posts: 30
Quote:
Originally Posted by Terranigma View Post
lolent, have you been able to vent that problem you've been having with AvsP? I have a pretty good idea what's causing the problem, as i've gotten the same exact error message earlier today that you've shown with the screenshot. It has to do with your plugins/scripts, so it's not an avsp problem. You could fix this by manually going to your plugins folder, right-click and choose "Arrange Icons By Modified"; Then either delete or move your latest modified plugins 1 by 1 while hitting F5 with avsp and see if it generates a preview.
oh, that's a good idea ! Thank you Terranigma
I will try that and found which plugin causes the problem by testing them one bye one

EDIT :
I solve my problem
I had some ***SSE3.dll that my cpu doesn't support (PIV 2.4 GHZ) that I had forgotten to delete from my avisynth plugin directory ^^
Thx again Terranigma

Last edited by lolent; 7th May 2007 at 00:32.
lolent 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 12:56.


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