Log in

View Full Version : avisynth error


alemala
25th November 2002, 10:39
I have built a java tool to produce an avisynth script.
From a long time i have a problem i always get an error
after a certain ammount of frames processed, with version
0.3 i get the error after 5.000 frames with the current 2.0
after (about) 27.000 frames, i bypass the problem splitting
in more than one script.
The error is something like: unable to load the video codec.
All the avi loaded are encoded using pynnacles dc10+
mjpeg builtin encoder.
Someone can help ? bye to all of you !
Alessandro
http://web.tiscali.it/minomala/

Suzahara
26th November 2002, 07:39
Is this a video for windows codec? E.G. does it show up in virtualdub? If it's not, this is likely your problem. Does it have a directshow decoder? You could use DirectshowSource() if it does. Other than that, the error is in your program, or avisynth cannot handle the codec if it's not a VFW or directshow format. I don't understand enough about what your program does, or what the "timeline" is, or why you need to write a program in java to feed the avi into avisynth except to make the avs writing more graphical.

alemala
26th November 2002, 09:54
May be I have been not clear !
Don't worry about how i produce it, i have an
avisynth script to process MJPEG avi encoded with
Pinncles DC10+ encoder. I process them with virtualdub,
look at them with media player and so on ...

Now if my script produces less than 25000 frames it works.
If i have more of them it crashes, sayng its unable to load
a proper codec (the same one has been used for previous
25000 working frames). As I told now i do everything,
splitting the avisynth script.
The first avisynth (version 0.3) was crashing after 5000
frames with 2.0.6 (i am using) i can go above 25.000 frames
than it crashes.

Thanks for your answer, hope for help,
Alessandro.

Guest
26th November 2002, 14:12
Can't you post the script?

alemala
26th November 2002, 15:21
bye Donald !!
It's somthing like this ...
if i add some more frames, it stops working !

Alessandro

START_SCRIPT*****************************************
BlankClip(10,10)
First("b5 bis catture.avi",7565,7676)
Add("b5 bis catture.avi",7678,7695) # [2] 0:00:04.12
Add("b5 bis catture.avi",7565,7662) # [3] 0:00:05.05
Add("_z0000.avi",0,0) # [4] 0:00:09.03
Add("b5 bis catture.avi",204,206) # [5] 0:00:16.18
Add("_z0002.avi",0,0) # [6] 0:00:16.21
Add("b5 bis catture.avi",307,500) # [7] 0:00:20.21
Add("_z0003.avi",0,0) # [8] 0:00:28.15
Add("b5 bis catture.avi",555,1317) # [9] 0:00:29.15
Add("b5 bis catture.avi",1320,1568) # [10] 0:01:00.03
Add("_z0004.avi",0,0) # [11] 0:01:10.02
Add("b5 bis catture.avi",43,354) # [12] 0:01:11.02
Add("_z0005.avi",0,0) # [13] 0:01:23.14
Add("b5 bis catture.avi",1619,2050) # [14] 0:01:24.14
Add("b5 bis catture.avi",2051,2540) # [15] 0:01:41.21
Add("_z0006.avi",0,0) # [16] 0:02:01.11
Add("b5 bis catture.avi",6233,6349) # [17] 0:02:02.11
Add("b5 bis catture.avi",2566,4792) # [18] 0:02:07.03
Add("_z0007.avi",0,0) # [19] 0:03:36.05
Add("b5 bis catture.avi",6233,6349) # [20] 0:03:37.05
Add("b5 bis catture.avi",4822,5650) # [21] 0:03:41.22
Add("_z0008.avi",0,0) # [22] 0:04:15.01
Add("b5 bis catture.avi",6474,7552) # [23] 0:04:20.00
Add("_z0009.avi",0,0) # [24] 0:05:03.04
Add("b5 bis catture.avi",7725,8019) # [25] 0:05:09.21
Add("b5 bis catture.avi",8020,8294) # [26] 0:05:21.16
Add("b5 bis catture.avi",8298,10587) # [27] 0:05:32.16
Add("_z0010.avi",0,0) # [28] 0:07:04.06
Add("b5 bis catture.avi",10640,10642) # [29] 0:07:05.06
Add("_z0011.avi",0,0) # [30] 0:07:05.09
Add("b5 bis catture.avi",10743,11237) # [31] 0:07:09.09
Add("_z0012.avi",0,0) # [32] 0:07:29.04
Add("b5 bis catture.avi",11345,13663) # [33] 0:07:32.11
Add("_z0013.avi",0,0) # [34] 0:09:05.05
Add("b5 bis catture.avi",6233,6349) # [35] 0:09:06.05
Add("b5 bis catture.avi",13689,13981) # [36] 0:09:10.22
Add("b5 bis catture.avi",13983,14409) # [37] 0:09:22.15
Add("b5 bis catture.avi",14413,15840) # [38] 0:09:39.17
Add("_z0014.avi",0,0) # [39] 0:10:36.20
Add("b5 bis catture.avi",15918,16243) # [40] 0:10:38.22
Add("_z0015.avi",0,0) # [41] 0:10:51.23
Add("b5 bis catture.avi",16281,17039) # [42] 0:10:59.10
Add("b5 bis catture_01.avi",0,257) # [43] 0:11:29.19
Add("_z0016.avi",0,0) # [44] 0:11:40.02
Add("b5 bis catture_01.avi",340,1204) # [45] 0:11:43.09
Add("_z0017.avi",0,0) # [46] 0:12:17.24
Add("b5 bis catture_01.avi",1273,1481) # [47] 0:12:20.17
Add("_z0018.avi",0,0) # [48] 0:12:29.01
Add("b5 bis catture_01.avi",1564,3646) # [49] 0:12:32.08
Add("_z0019.avi",0,0) # [50] 0:13:55.16
Add("b5 bis catture.avi",6233,6349) # [51] 0:13:56.16
Add("b5 bis catture_01.avi",3713,4279) # [52] 0:14:01.08
Add("_z0020.avi",0,0) # [53] 0:14:24.00
Add("b5 bis catture_01.avi",4355,6072) # [54] 0:14:27.00
Add("_z0021.avi",0,0) # [55] 0:15:35.18
Add("b5 bis catture.avi",6233,6349) # [56] 0:15:36.18
Add("b5 bis catture_01.avi",6098,6812) # [57] 0:15:41.10
Add("b5 bis catture_01.avi",6813,6978) # [58] 0:16:10.00
Add("_z0022.avi",0,0) # [59] 0:16:16.16
Add("b5 bis catture_01.avi",7054,7562) # [60] 0:16:19.16

return AudioDub(last,Audio(last,"_z0000",0))

function Audio(clip c,string name, int start) {
black = BlankClip(c, start+Framecount(c))
wave = Wavsource(name)
return AudioDub(black,Wave).Trim(start,-Framecount(c))
}
function First(clip c, string name, int start, int stop ) {
return AVISource(name).Trim(start,stop).KillAudio()
}
function Add(clip c, string name, int start, int stop ) {
return c + AVISource(name).Trim(start,stop).KillAudio()
}
END_SCRIPT*******************************************

hakko504
26th November 2002, 15:50
I think you open way too many files, not to mention that you open the same file over and over. Internally in AviSynth the files are called with handles, and I'm not sure how many handles you can have open at the same time. Your script seems to suggest 64. Don't know what exactly to do about it as you seems to have a lot of _z00xx.avi files, but one idea might be to put all of them into one before calling them in AviSynth.

alemala
26th November 2002, 17:19
seems not related to file, i try this loop,
but using (by now) a different codec !
this one opened in virtualdub works.
but stop working if i set max to 552
(more than 550 files)
alessandro
*******************
o=AviSource("d:\temp\avi\italiac.avi").Trim (0,-10)
a=o
loop(a,o,0,551)

function loop(clip all, clip one, int i,int max) {
return i<max ? loop(all+one,one,(i+1),max) : all
}
*******************

hakko504
26th November 2002, 18:38
This script only opens ONE file.
o=AviSource("d:\temp\avi\italiac.avi").Trim (0,-10)
a=o
loop(a,o,0,551)

function loop(clip all, clip one, int i,int max) {
return i<max ? loop(all+one,one,(i+1),max) : all
}


Try this:o=AviSource("d:\temp\avi\italiac.avi").Trim (0,-10)
loop(o,o,0,551)

function loop(clip all, clip one, int i,int max) {
return i<max ? loop(all+one,AviSource("d:\temp\avi\italiac.avi").Trim (0,-10),(i+1),max) : all
}

alemala
27th November 2002, 09:50
Well! i think you are right, with your script the last working value for max is 74, and with 75 i get the same error i get with my script.
I'll change my tool to open as less files as possible.
Do you think it would pe bossible to increase the number of files properly handled ?
thanks a lot,
Ale

hakko504
27th November 2002, 12:05
Not likely, this is probably something limited by windows itself, and is not really a property in AviSynth. (Haven't checked though, someone else who knows?)

vinetu
27th November 2002, 16:26
Finaly I see here a similar problem that I have not so long time ago!
I've open in Premiere 6.01 more than 500 files ,but only first 74 has been
with picture - others - just an error message something like "error in ... unknown codec".
Every avs file was exactly _AviSource("X:\YYY\video.avi")_ and nothing more .
Then I tested this with DirectShowSource - same result - Then I've changed AviSource of
all files to point to only one avi file - no difference !!!
And the funny thing is when on the next day I start the "battle" again - the maximum
correctly opened avs files was 37 !!!
... This is the end ...:)

P.S.: avisynth version 1.05 ~ 2.06+ was tested.