Loading...
Logo
Processing Forum
Mac OSX snow Leopard 10.6.8 - Processing 1.5.1, 2.0.3
Dear P5 team and fans!

i have a lot of questions about video  and video package from processing:

1°) in the reference doc about movie class i cannot understand why, sometimes, the method " void movieEvent(Movie m) { m.read()} is present and sometimes is not present, depends of examples (jump, available, read, play....) - Furthermore i have tried with it and without it and the result seems to be the same...What is for example the difference between this method and someting like ::

void draw(){

if (video.available(){
video.read();}
}  ???

2°) Trying to read .mov videos in 1.5.1 i have often the OutofBoundsArray exception and finally understood that this error happens when the width and height for the video is read like 0 (or1!!!) I have tried a lot of solutions:
- putting  video = new Movie("monfilm.mov") at the very beginning of setUp(), and before "size(1024, 768,P2D)"
- putting in the same setup()
                 video.play();
                 video.jump(0);
                 video.pause();

and calling the play() method in draw()
::::: Results are better... Yet sometimes (with the same video & the same code) i got the ArrayException. How is it possible that it happens AFTER play() jump() and pause()???

3°) i am now working with big videos (.mov, PAL, 500MO); with 1.5.1 i got the ArrayException 1/10. So i decided to try with 2.0.3. The videos are the same. But they are loaded and read very very slowly...I had the same result with 1.5.1 when i used the GSvideo library with GStreamer....

4°) i have tried to export .app: it fails, memory error, probably because the videos are too big...

---- And using exactly the same videos but in director and lingo everything works perfectly, not any error and export as .app. Strange! --- But i cannot use director because in the same work i need the Capture class which is now impossible (the myron Xtra was never updated...)

If somebody can help i would be very happy

Replies(23)

1)

In order to understand the cause of your problem you need to understand how video/display/decoding works. 
The best metaphor to understand it is to think that your "void draw()" is executed on one CPU core, and the "video-decoding process" is executed on "2nd processor core". This should emphasize to you the fact that ther'ere two things happening in your computer SIMULTANIOUSLY (in parallel). 
1st CPU core is constantly:
drawing screen
redrawing  screen
redrawing  screen
redrawing   screen
redrawing  screen
redrawing  screen
redrawing  screen
redrawing   screen
redrawing  screen
redrawing  screen
redrawing   screen
redrawing  screen
redrawing  screen
redrawing screen
60 times per second


And 2nd CPU core is doing completely different task:
decode next frame from compressed video file
decode next frame
decode next frame 
decode next frame
decode next frame 
decode next frame
decode next frame 
decode next frame
decode next frame 

and this happens at SMALLER rate (for an average video it may be 30 frames per second or even 25 or 24).

Now let's take a look at the movie-related method examples, but keeping in mind that there're 2 cpu cores involved into this task:

Copy code
  1. import processing.video.*;
    Movie myMovie;
    
    void setup() {
      size(200, 200);
      frameRate(30);
      myMovie = new Movie(this, "totoro.mov");  
      myMovie.loop();   // this starts on your "2nd CPU core" code, which reads video file and decodes it into frames
    }
    
    // when you run draw() it is run on your "1st CPU core", the draw() method has no
    // idea that there, somewhere on the "2nd CPU core" there's something happening, working
    // and decoding.
    void draw() {
      if (myMovie.available()) { // here we ask "2nd cpu core" whether there's next frame availble.
                                 // we need to ask it, because draw(), which runs on the "1st core"
                                 // may be running with rate of 60 frames per second,
                                 // whereas many modern videos only have 30 frames per second.
                                 // which means that draw() will be called 60 times per second,
                                  // half of that time .available() will return TRUE and 
                                  // another half of the time it will return FALSE. This way
                                  // the sketch will eventally be able to display maximum of 30 video
                                  // frames per second, which is limit of the video.
    
        myMovie.read();   // with this call to read(), we tell processing that it needs to
                          // ask "2nd cpu core" for the result of it's work (a frame)
                          // and we "read" it from the "2nd CPU memory" into our current
                          // memory into myMovie variable.
    
    
      }
      image(myMovie, 0, 0); // this is just call which looks into our "local" memory and just draw the image.
    }
    


Copy code
  1. import processing.video.*;
    Movie myMovie;
    
    void setup() {
      size(200, 200);
      myMovie = new Movie(this, "totoro.mov");
      myMovie.loop();
    }
    
    void draw() {
      tint(255, 20);
      image(myMovie, mouseX, mouseY);
    }
    
    // Called every time a new frame is available to read
    // As from previous example we remember that
    // out of 60 times per second we would call .available() 
    // it would return TRUE only 30 times (frame rate of the video)
    // so this means that the other 30 times we just call .available() for nothing.
    // so instead of calling .available() 60 times and getting 30 times FALSE
    // we can use this movieEvent() method, which will be called ONLY 30 frames per 
    // second, which is exactly as many as maximum frame rate your video can provide.
    void movieEvent(Movie m) {
      m.read();
    }

Both of the methods are doing basically same thing. You can choose one or the other based on which one is more convenient for you (to code, or to think of). You DON'T use both of them at the same time.

Compressed video file is NOT a sequence of frames. (because then it wouldn't be called compressed). 

To compress video, codecs do very simple opertion:
  • store 1st frame of the video sequence (simply a rectangular image, just like your regular JPG file)
  • store NOT the 2nd frame, but store difference between 2nd and 1st frame
This difference can be seen on the video and pictures below: 
There're two frame sequences (in color) and in Black&white you can see difference between current and previous frame. The darker(black) is the image, the less movement is there, hence less difference between frames.
The brigher(white) is the image: the more movement was on the sequence, hence bigger difference between current and previous frames.

On the BW image on the lef you can see that probably camera-man has shaked the camera, because all the image seems to have little differences. Whereas on the right BW image, we can see that only runner is moving and this is why are around him is black (there's no movement, hence no difference vs previous frame).


This is the original video



When your computer is decompressing video, it reverses this process: it takes sequence of those "bw" images and from the sequence restores the original sequence. This is why your frames "aren't available immediately". It will take "2nd CPU core" some time to decode(restore) the original frame from the compressed video. And when it has restored it it will call movieEvent(Movie) method. Or in case YOU don't want to use movieEvent() in your sketch, then you will have to ask "2nd CPU core" 60 times per second whether there's a frame availble by calling .avaiable() method.

HTH


For the rest of your problems you need to present us with complete sketch code, so that we can see what's the problem really is. Because from your explanation it is not clear what exactly went wrong. It's just clear that you're not sure what you're doing. I suggest to find some videos on youtube about video compression and with some Video Compression 101 which I have mentioned above, you should get a better grasp of what's happenign "under the hood" and then you may solve your problems yourself.
dear D,

first of all thanks for answering.

As for the technical explanations, ok, you are very precise & clear.
As for my questions about "available" & the method void movieEvent... you confirm what i guessed: that it s the same thing, except perhaps if you want to get some boolean with available()" .

But my main problems remain
:
1)---- why (1.5.1) the ArrayBoundOf exception is throwed AFTER play() then jump(0) then pause(), in setup()???, knowing that i have some void method (and available() in the draw) asking (only one time) for starting:

void videoStart(){
if (videoAvailable){
video.play();
}else{
return;}
---- i am sure that it is not a problem with coding because let us say 8 times/10 it works fine...

2)---- why processsing 2.03 is so slow with big UNCOMPRESSED videos, DV-PAL 768/576???
and, in this case i have used the doc code, not adding nothing, but of course changing the video and adding it to my sketch folder...FrameRate is 1 or 2 fps... (24 with 1.5.1) - Same problem with GSvideo library in 1.5.1 (and the same video)

--- As for sending the code, i cannot now because it s a very big one with a lot of classes ; i shall try tomorrow to send some "simple sample" but i cannot send four 500 mo video file!

--- and as i continue to work to this project (with 1.5.1 till now) i add another question: at some moment and after having worked the whole day without having this new problem i got a  Null missing file exception for 2 videos ("you have to add etc...) : but the files WERE in the data folder!!!! - I decided to re-add them (not manually) and it says "they are allready present....! ???? - I am now guessing (???) that there is some kind of limits with the data folder. Or how to explain this last mystery??? - When i accepted the proposal to replace the files that were present, P5 seemed to work sometime and when i looked at my data folder (allways in the same place & sketch folder) my video files have disappeared...

thanks again and best reguards!


1) you cannot call in setup() all three operations one by one
 play() 
then 
jump(0) 
then pause()

Here's table which may help you understand what's happening:



Solution for you would be to  only call .play() in the setup(), and 
and start calling other methods ( jump() or pause() ) only after you have read first frame.

why processsing 2.03 is so slow with big UNCOMPRESSED videos, DV-PAL 768/576???
 
You need to be even more specific: how big is your file (in Megabytes, I am not aware of what is "mo"). 
What is the resolution of the original video? What is the resolution you're outputting it? With which command are you outputting it?   Can you play same video in VLC video player or other video player?

The best thing for you would be to provide code AND the original video, so that I can try to reproduce the problem. So far it doesn't look like a processing bug.


As to this paragraph, it is not clear at all what you wanted to say. And again: if it's hard to explain - make SCREENSHOTS.
--- and as i continue to work to this project (with 1.5.1 till now) i add another question: at some moment and after having worked the whole day without having this new problem i got a  Null missing file exception for 2 videos ("you have to add etc...) : but the files WERE in the data folder!!!! - I decided to re-add them (not manually) and it says "they are allready present....! ???? - I am now guessing (???) that there is some kind of limits with the data folder. Or how to explain this last mystery??? - When i accepted the proposal to replace the files that were present, P5 seemed to work sometime and when i looked at my data folder (allways in the same place & sketch folder) my video files have disappeared...
 




deatr D
------first : i am anot a" new ...", i! developp (my job) since 30 years with java,lingo, basic, C++  and (3 years only!) ::: P5. So ==there is it some kind of "explainations" that i dont need...

i ASK: What happens when the data folder is more than let us say 3 MEGAS OCTETS (or more)

And if i ask this strange question irt 's because i have seen that ::

a) no .app is exported (memory error, but i have 8M0 for RAM and never have this kind of problem with director, with bigger videos fiiles, god bless it)

b) my files magically disappeared (unfortunaly i have not, now, screen schots, but to morrow ill 'get them because i am sure that it will happen again (and i have cloned my files, so...)

c) IF i have tried to code (play(), jump(), pause() and so on it s because the STANDARD doc coding does not work!!!
or works 5/10
and as i have to present this work i dont want 5/10, i want 10/10!

d) have you tried to play some big viedeo with P5 2.03??? [dv pal without compresssion, 500 or more megas Octets)
try!!!--- if you get time to that

thanks and best wishes...



excuse me

as for the other quuestions::
of course QuickTime opens  & read normally these videos (it have created them!) and vlc the same:and afetr effects and and : not any codec problem!!!
also ::: mo === megas octets=== 500M0 (average weigth for the videos i use, without any problem with quickTime or Vlc  or processing 1.5.1 ----- except the ArraysBoundException!!!! which happens SOMETIMES,  not ALLWAYS, and without any "human" reason!!!

---but does not work with P5 2.03 in any case or 1 FPS....

like GSvIdeo library

and i think that it is the same problem [GStreamer]

try with another "totoro" (500M0) ... & see!
and i understand what you explain, very well
BUT

ÌF
 i dont call (jump()
neither
(pause)
or...

it does not work!!!! (except for the "totoro" example!!! - [what is its weight???].)

what do you mean? Concretly:::

i have to write some
timer???--ok

-----that is possible, but  is not explained in the examples

and which would be the boolean?? [ready, loaded.....]

i cannot see that in the doc

--------


which i want is ::: 'everything loaded; && ok"
and i see that "available()" is not  that

am i false????
l am reading once upon a time your answer:: so ::
----- 500 mo == 500 mega octects (3' hD video without compression) - made by QT, DVPAL without COMPPRESSION
------ read without any problems by vlc && quickTime
---- read  with 2 (or1!)`/10 problems with 1.5.1 (problem == arrayOutOf...)---
----never read (1FPS????)  by p5 2.03
--- without any errror but ... not read (in my way!)
am i precise??

thanks!
ps: i have worked 3 months about this project that i have to present next week  &&& was sure that there
was not any probmem with the video  aspects, so i worked with the other ones
and now i see that ....
now i think that te technical datas are cleared
500 MO
DV PAL
768/576
NO COMPRESSION
read with any problem by
QuicKTime
VLC
an so on

read , sometimes (5,6/10) by processing 1.5.1 at a convenient fRrate

never read at a convenient FR by processing 2.03
or by GS video ( 1.0) with 1.5.1 or 2.0.3

hence my questionj::: "big videos ,with processsing...."
adding:: i cannot export my app....
&& files"dispapearing" ( i am not fool)! from the data folder
so another question, very silmple:
are they LIMITS for the data  folder (less than 1 GB or...) [ i have to know!!!!]
are they lilmits for exporting .app (or .exe....)
if they are what are they???


dear D.,

thanks again for your technical explaination: i am happy to understand exactly what does the mysterious method movieEvent. And Available();

As for calling play();jump(0); pause() in setup() i have done that because of my various problems (and found this in some code from Andres colubri, it seems to me, i am not sure); but in this case also you are very clear:------[you must ask for putting your schema about jum and so on in the processing video doc!], so i have suppressed this in my code, which now is (of course it s not the complete code for my app!):::::




import processing.video.*;
Movie mov;
String[] videoList = {"video1.mov", "video2.dv","video3.dv"};
int index= 0;

boolean starter = false;




  void setup() {
   
    
  size(1024,768,P2D);
 
  background(0);
 

}

void movieEvent(Movie m) {
  m.read();
}

void draw() {
  frameRate(25);
println(starter); 
if (starter  ) {

if (mov.time() < mov.duration()) {
     
      image(mov, width/2-(mov.width/2), height/2-(mov.height/2));
    }
    else if (mov.time() == mov.duration()) {
      starter = false;
      mov.stop();
      mov.dispose();
      index= index+1;
    
      background(0);
    }
  }
 
}

void keyReleased() {
 
  if (key == 'v' && index<videoList.length) {
    mov = new Movie(this, videoList[index]);
  
   

//    mov.play();
//    mov.jump(0);
//    mov.pause();
   
   
   
    
      mov.play();
starter = true;
mov.read(); //is it useful???
 
  }
}


When i use it with little videos (mp4, 10 megabytes , like "station.mov" or "totoro", not any problem neither with 1.5.1 nor with 2.03. BUT when i use my real videos (.DV or .Mov, more or less 500 megas):
--- with 2.03 the video appears only after 10 or 15 seconds and then what i see is a kind of diaporama, very very slow...
-- with 1.5.1 it 's normal, but not allways...; sometime i have the ArrayOutOfBounds exception, as i had before changing the code;
sometime it crashes completely ::: and in the processing console i have
Invalid memory access of location 0xffffffff eip=0x5e2e8d8
   

and in the Apple report if you think it is interesting for you, only the beginning because "it exceeds the message limits" (!)

Process:         java [1226]
Path:            /usr/bin/java
Identifier:      com.apple.javajdk16.cmd
Version:         1.0 (1.0)
Code Type:       X86 (Native)
Parent Process:  JavaApplicationStub [986]

Date/Time:       2013-09-18 10:30:36.934 +0200
OS Version:      Mac OS X 10.6.8 (10K549)
Report Version:  6

Interval Since Last Report:          14505566 sec
Crashes Since Last Report:           178
Per-App Interval Since Last Report:  3583242 sec
Per-App Crashes Since Last Report:   86
Anonymous UUID:                      4D18C230-54C6-4F9B-AFCF-688909ABB9D4

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000ffffffff
Crashed Thread:  28  Java: Thread-3

Application Specific Information:

Java information:
 Exception type: Bus Error (0xa) at pc=0000000005e2e8d8
 
 Java VM: Java HotSpot(TM) Client VM (20.1-b02-384 mixed mode macosx-x86)
 
Current thread (0000000003001c00):  JavaThread "Thread-3" [_thread_in_native, id=-1314103296, stack(00000000b19c6000,00000000b1ac6000)]
Stack: [00000000b19c6000,00000000b1ac6000]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  quicktime.qd.Pict.GetMoviePict(II)I+0
j  quicktime.qd.Pict.fromMovie(Lquicktime/std/movies/Movie;I)Lquicktime/qd/Pict;+5
j  quicktime.std.movies.Movie.getPict(I)Lquicktime/qd/Pict;+2
j  processing.video.Movie.read()V+73
j  CodeVideoForum.movieEvent(Lprocessing/video/Movie;)V+1
j  sun.reflect.GeneratedMethodAccessor3.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+40
J  sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
J  java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
j  processing.video.Movie.run()V+61
j  java.lang.Thread.run()V+11
v  ~StubRoutines::call_stub
 
Java Threads: ( => current thread )
=>0000000003001c00 JavaThread "Thread-3" [_thread_in_native, id=-1314103296, stack(00000000b19c6000,00000000b1ac6000)]
  0000000008067400 JavaThread "DestroyJavaVM" [_thread_blocked, id=-1341124608, stack(00000000b0001000,00000000b0101000)]
  000000000804b000 JavaThread "Animation Thread" [_thread_blocked, id=-1318354944, stack(00000000b15b8000,00000000b16b8000)]
  0000000008066000 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=-1320468480, stack(00000000b13b4000,00000000b14b4000)]
  000000000805a000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=-1321525248, stack(00000000b12b2000,00000000b13b2000)]
  0000000003141c00 JavaThread "AWT-Shutdown" [_thread_blocked, id=-1323151360, stack(00000000b1125000,00000000b1225000)]
  0000000003141400 JavaThread "AWT-AppKit" daemon [_thread_in_native, id=8189248, stack(00000000bf800000,00000000c0000000)]
  0000000008022c00 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=-1325264896, stack(00000000b0f21000,00000000b1021000)]
  0000000008021c00 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=-1326321664, stack(00000000b0e1f000,00000000b0f1f000)]
  0000000008020c00 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=-1327378432, stack(00000000b0d1d000,00000000b0e1d000)]
  00000000030a3800 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=-1328435200, stack(00000000b0c1b000,00000000b0d1b000)]
  000000000801fc00 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=-1329491968, stack(00000000b0b19000,00000000b0c19000)]
  000000000801d000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=-1330548736, stack(00000000b0a17000,00000000b0b17000)]
  000000000801c000 JavaThread "Surrogate Locker Thread (Concurrent GC)" daemon [_thread_blocked, id=-1331605504, stack(00000000b0915000,00000000b0a15000)]
  00000000030a0800 JavaThread "Finalizer" daemon [_thread_blocked, id=-1333727232, stack(00000000b070f000,00000000b080f000)]
  000000000309f800 JavaThread "Reference Handler" daemon [_thread_blocked, id=-1334784000, stack(00000000b060d000,00000000b070d000)]
Other Threads:
  0000000008012800 VMThread [stack: 00000000b050b000,00000000b060b000] [id=-1335840768]
  000000000801f400 WatcherThread [stack: 00000000b1023000,00000000b1123000] [id=-1324208128]
 
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
 
Heap
 par new generation   total 14784K, used 11201K [00000000200c0000, 00000000210c0000, 00000000220c0000)
  eden space 13184K,  75% used [00000000200c0000, 0000000020a7d300, 0000000020da0000)
  from space 1600K,  76% used [0000000020f30000, 00000000210632b8, 00000000210c0000)
  to   space 1600K,   0% used [0000000020da0000, 0000000020da0000, 0000000020f30000)
 concurrent mark-sweep generation total 49152K, used 6146K [00000000220c0000, 00000000250c0000, 000000007dcc0000)
 concurrent-mark-sweep perm gen total 12288K, used 8400K [000000007dcc0000, 000000007e8c0000, 0000000081cc0000)
 
Code Cache  [0000000008801000, 00000000088ea000, 000000000a801000)
 total_blobs=530 nmethods=294 adapters=180 free_code_cache=32608128 largest_free_block=0
 
Virtual Machine Arguments:
JVM Args: -Xrunjdwp:transport=dt_socket,address=127.0.0.1:8314,suspend=y -Xms64m -Xmx1500m -Djava.library.path=:/Applications/Processing 2.app/Contents/Resources/Java/modes/java/libraries/video/library:/Applications/Processing 2.app/Contents/Resources/Java:/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Resources:.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java -ea
Java Command: processing.core.PApplet --location=463,59 --external --display=0 --sketch-path=/Users/nimac/Documents/applisPERF_F/perfBPIproces/CodeVideoForum CodeVideoForum
Launcher Type: SUN_STANDARD
Physical Memory: Page Size = 4k, Total = 3840M, Free = 1083M
 


dear D,

as for the export problem: this is the error message; it seems to me that there are java virtual machine limits for exporting (heap space); but i dont know if there is a way to increase the default memory for that in processing...

Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
    at processing.app.Base.loadBytesRaw(Base.java:2191)
    at processing.mode.java.JavaBuild.addDataFolder(JavaBuild.java:1532)
    at processing.mode.java.JavaBuild.exportApplication(JavaBuild.java:1227)
    at processing.mode.java.JavaBuild.exportApplication(JavaBuild.java:1108)
    at processing.mode.java.JavaMode.handleExportApplication(JavaMode.java:222)
    at processing.mode.java.JavaEditor.exportApplicationPrompt(JavaEditor.java:430)
    at processing.mode.java.JavaEditor.handleExportApplication(JavaEditor.java:239)
    at processing.mode.java.JavaEditor$2.actionPerformed(JavaEditor.java:62)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:389)
    at com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:95)
    at java.awt.MenuItem.processActionEvent(MenuItem.java:627)
    at java.awt.MenuItem.processEvent(MenuItem.java:586)
    at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:337)
    at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:325)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:682)
    at java.awt.EventQueue.access$000(EventQueue.java:85)
    at java.awt.EventQueue$1.run(EventQueue.java:638)
    at java.awt.EventQueue$1.run(EventQueue.java:636)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
    at java.awt.EventQueue$2.run(EventQueue.java:652)
    at java.awt.EventQueue$2.run(EventQueue.java:650)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:649)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)

dear D,

thanks for the link...
having read it i tryed
1.5.1::: increasing memory allocated (preferences) to 2000= the sketch cannot run and the export is impossible.
2.03 : the export is possible and it says done exporting (32 bits and 64) ; result is 1,18 gigas.
---- the 32 bits app does not run at all, it does not launch
---- the 64 one runs but as it s the 2.0.3 version there is the other problem (the first one: big videos with 2.03) that s to say it runs but very very slowly....Crazy! = if i use 1.5.1 videos are well read but i cannot export and if i use 2.03 i can export but videos are poorly and slowly read!
--- last experience: i have tryed with 2.03 and videos not so big: 130 megas:: same result ::: loaded & read but very slowly....
If you have a 64-bit Java JDK installed in your system OS, you can delete the 32-bit bundled /java subfolder
which comes w/ the old Processing 1.5.1 installation. Doing so will force it to use the system's default Java.
A 64-bit Java can use much more RAM!  
dear gtl,

yes, i can do what you propose;
but if you have read the precedents mails i have not only the problem for exporting the .app (or.exe), my main problem is to Read big videos and with 1.5.1 they are read correctly but not allways (see cash report),; with 2.03 they are loaded very slowly (15") and then read very very slowly, something like 1 fps.
Futhermore : if i destroy the old 32bits jvm in 1.5.1 do you think that 1.5.1 will run in 64 bits mode???
thanks.
Well, you can also rename or backup the bundled /java subfolder instead of getting rid of it forever! 
And whether it's gonna work? Well, Processing v1.5.1 used to come w/ an advanced package install too.
Only difference from default install was exactly the lack of the /java subfolder!!!  
dear gtl,

thanks for replying....

yes and yes, i can do that, i didn't remember about  the default install with 1.5.1!...I shall try & tell you about the result! - But i have made new experiences since this morning, and some of them are interesting for my main problem & question: is 2.03 able to read my videos (at the beginnin they were .dv, 768/720, 576, high quality and were readwith all players, QT, VLC...and also by p1.5.1 with the standard video library ( with a lot of crashes and error messages at the very begining.

------i have transcoded my big (500MO videos) from DV to AVI; and now :

i can read them (without error or crashes) with 1.5.1 and processing video import  and also with GSvideo library (which was impossible before: no sound and very slow, error messages like "seek failed" (which is referenced in the gs library doc:: time, duration etc)).
Well, this a progress,but not so big because when i try to read the new videos with 2.03, it does not work at all when 32 bits (as before) but not at all when 64 (before it worked slowly and without sound, like GSvideo llbrary): and not any error message!

Last experience: 2.03 + GSVideo and my new videos AVI: now i get sound! but not any video!---- and a lot of messages from the console: It seems that it s some kind of ArrayBoundsOfException...

rror, disabling movieEvent() for video1.mov
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at codeanticode.gsvideo.GSMovie.invokeEvent(Unknown Source)
    at codeanticode.gsvideo.GSMovie$2.rgbFrame(Unknown Source)
    at org.gstreamer.elements.RGBDataAppSink$AppSinkNewBufferListener.newBuffer(RGBDataAppSink.java:162)
    at org.gstreamer.elements.AppSink$2.callback(AppSink.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.jna.CallbackReference$DefaultCallbackProxy.invokeCallback(CallbackReference.java:384)
    at com.sun.jna.CallbackReference$DefaultCallbackProxy.callback(CallbackReference.java:414)
Caused by: java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0
    at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:999)
    at java.awt.image.BufferedImage.<init>(BufferedImage.java:315)
    at processing.core.PImage.getNative(PImage.java:322)
    at processing.core.PImage.resize(PImage.java:616)
    at codeanticode.gsvideo.GSMovie.read(Unknown Source)
    at Loop.movieEvent(Loop.java:49)
    ... 14 more

dear all, & especially D and GTL,

today new experiences and some big progress

 I have "cut" my initial big .mov videos & again tried to read them with 2.0.3:
-----no sound, very slow performance....SO: it s not a memory or megas problem.

THEN:

i have tried to read the initial videos (.mov, without cutting them) with the jmc library::

1.5.1: it runs fine, without crash and outof bound exception (the isReady() method is very useful for that, and the method isPlaying is much more sure than the starttime and duration comparison from processing video native library which does not work (or not allways...)).

---- same success with the AVI videos !

2.0.3:

IT RUNS normally, 64 bits, like in 1.5.1 and with exactly the same videos wich it refuses to read with the video native library.

FIRST CONCLUSION:: thanks to jmcVideo & a forbes....

BUT some new problem: as for Capture (there is also live capturing in my app) i had ecided to use GSvideo library: runs perfectly awith 1.5.1....but not at all with 2.0.3:: when launching here is the error code:

[after having told that the capture size is too big though it s of course that used without problem with 1.5.1]

(GSVideo:889): GStreamer-CRITICAL **:
Trying to dispose element rgb, but it is in READY instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.

Is it a problem with GS video??? Something uncompatible with 2.0.3??? i dont know...
    import processing.video.*;
    import codeanticode.gsvideo.*;

    Capture myCapture;
    GSCapture cam;

    void setup()
    {
      size(1024, 768);
   
    
     myCapture = new Capture(this, width, height, 30);///with p5 videolibrary

      //cam = new GSCapture(this, width, height, 30);// with GS

      myCapture.start();
      ///cam.start();
    }
    void draw() {

      if(myCapture.available()){
   myCapture.read();
 image(myCapture, 0, 0);////works
  }
  }
   
//      if(cam.available()){
//       cam.read();
//        image(myCapture, 0, 0);//does nt work ::: resolution (1024/768) not supported by this device; the same with ///1.5.1:: works..........accepting without problem 1024/768!!!----Puzzling!
//      }
//    }
   
    void mousePressed(){
     
      myCapture.stop();
//cam.stop();
      myCapture.dispose();
//cam.dispose()
      background(0);
     
    }

i try to resume, hoping that this long story could be useful for others

1° As for the initial problem (2.0.3 and big videos) as for me it s now solved:

--- it s not a memory problem
--- it s a codec problem

--- some codecs which could be used with 1.5.1 cannot be used, in this moment, with 2.0.3, though they are read by QT or VLC: they are loaded without error message but read very slowly and without sound.
my initial videos were made by QuickTime DVCPRO-PAL.
--- the problem disappeared when i change this codec for AVI  DV-PAL.

Could be interesting to "test" with a lot of quickTime standard codecs....

2° As for Capture with 1.5.1 i always used GSvideo library; but with 2.0.3 there are limits for the capture size. The solution was simple:  use the native library which allows capturing more than 640/480: my capture is 1024/768.

3°) As for displaying the videos i have finally choosen to use 2 solutions:
------- JMC video library instead of the native video library because i have to be sure when the video is finished: i dont know why but the standard solution (movieTime() & movieDuration () does not work or rather does not always work ...IsPlaying() with JMC was always sucessful with the same videos: i cannot tell why!
--------Native library for 1 case, a looping video: the JMC loop() does not work with 2.0.3...

4°) As for coding i am very happy to have understood , thanks to dimkir, what was the meaning of the movieEvent(); before i used available() and i see now that it was the bad choice; other error was to try to be sure that the video was loaded using play() then jump(0) then pause(). The schema given by Dimkir is perfect!!!

5°) my last problem was to export the result (1,75 Gigas); I will try tomorrow, using 1.5.1 and the advice from GoToLoop but perhaps that now 2.0.3 will be able to do that....