I'm getting "Avisynth message: invoke environment error - pass 1"
My script is like so:
video000 = AVISource("path/blah/blah")
video001 = AVISource("path/blah/blah1")
#etc to video 0038
Dissolve(video000, video001, ...etc)
FadeIO2(15)
ConvertToYV12()
Now, there are 39 avi's, totalling a few dozen frames over 10,000. This bombs with all 39, but if I remove two or three from the Dissolve, it doesn't bomb. It is NOT any particular avi, I have tried basically a binary search to find the culprit, there isn't one. It appears to be a avi source file or array-size limitation, because yanking any two or three fixes it. Sometimes just two, sometimes three. It just so happens that in every case that works, the frame number goes under 10,000. But I tried taking out just the one largest avi I have, that put it under 10,000, still bombed. So that appears to be coincidence.
This same exact full 39-file .avs script plays fine in vdub. It encodes fine with ffmpeg. But the error returned by HC indicates that it is an error returned by Avisynth.
I'm tearing my hair out here, dumping a couple of clips just isn't the way to go. Can anybody shed some light on this?
Avisynth 2.5.6
HCenc_019.exe, file version 0.19.0.1
When it fails with 38 or 39 clips, the log is pretty sparse, as follows:
==================================================
==================================================
*** Avisynth message: invoke environment error - pass 1 ***
*** HCenc message: aborting, can't start pass 1 ***
When it works, it's something like this:
==================================================
==================================================
-----------------------------------------
| HCenc - MPEG2 encoder - rel. 0.19.0.0 |
-----------------------------------------
input: g:\all_northside\2006\dvd\avs\test.avs
output: G:\All_Northside\2006\DVD\avs\02.m2v
--------------------
| encoder settings |
--------------------
profile: NORMAL
frames: 0 9903
framerate: 29.97
aspect ratio: 4:3
bitrate Kb/s: 4000
max. bitrate Kb/s: 8000
pulldown: no
closed gops: no
VBV check: yes
scene change det.: yes
interlaced: no
goplen,B-pic: AUTO
dc_precision: 9
scan method: ZIGZAG
bias: 0
chapter frames: 0
time code: 0 0 0 0
CPU: SSE3
matrix: MPEG
--------------------
| source stats |
--------------------
nr. of frames in source: 9904
width*height: 720*480
fps: 29.97
nr. of frames to encode: 9904
frames to encode: 0 - 9903
---------------------
| encoding - pass 1 |
---------------------
+ Reply to Thread
Results 1 to 7 of 7
-
-
Before running an avisynth script through your encoder is is always worth opening it in virtualdub (or mod or mpeg2) first. If there is an error in the script, you will get an error message and line number to start looking at.
Read my blog here.
-
...or simply open it in some media player like MPC.
/Mats -
"Environment error" possibly is program environment; the memory used to store variables.
There may be some old DOS-style problems.
First, paths should use \ not /, though maybe it works anyway.
Maybe making the list of filenames smaller would help.
Try putting all the video files. and the AVS, into the same folder,
then instead of
video000 = AVISource("path/blah/blah")
just use
video000 = AVISource("blah")
and/or rename all the video files to have very short names. -
You're running out of RAM. Do a
Setmemorymax(512)
or, 50% of whatever your total memory is -
I had this same error ("invoke environment") and eventually determined that it was actually due to the audio not being 48 kHz as required for the dvd standard. So I'd recommend to anyone who stumbles upon this topic hoping to solve their problems to verify that both the audio and video for the source are in an allowed dvd format.
Similar Threads
-
Hcgui conversion help
By dylz in forum Video ConversionReplies: 6Last Post: 24th Jan 2011, 07:51 -
Sudden RipBot error (avisynth error)
By Charles314 in forum DVD RippingReplies: 5Last Post: 24th Oct 2010, 01:44 -
FFmpegSource2 error in Avisynth
By fidogenial in forum Video ConversionReplies: 1Last Post: 11th Oct 2010, 17:51 -
Get many error messages, AviSynth error message and meGUI error
By MKVcrazy in forum Video ConversionReplies: 0Last Post: 25th Aug 2007, 16:41 -
AviSynth Error
By koberulz in forum Newbie / General discussionsReplies: 17Last Post: 21st Jun 2007, 19:42