Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 11 of 11

Thread: movie2serial issue ( a library used by this sketch)

  1. #1
    Junior Member
    Join Date
    Nov 2017
    Posts
    5

    movie2serial issue ( a library used by this sketch) UNSOLVED

    Hi to all ,

    This error is happening when I press the play button :

    A library used by this sketch is not installed properly.

    A library relies on native code that's not available.
    Or only works properly when the sketch is run as a 64-bit application.

    I have been working for about a month on this problem ,many people in different subjects have experienced this problem.I have investigated most forums but still have same problem please help me..

    Code:
    import processing.video.*;
    import processing.serial.*;
    import java.awt.Rectangle;
    
    Movie myMovie = new Movie(this, "C:/Documents and Settings/opera.avi");  // there is a problem with this line
    
    float gamma = 1.7;
    
    int numPorts=0;  // the number of serial ports in use
    int maxPorts=24; // maximum number of serial ports
    
    Serial[] ledSerial = new Serial[maxPorts];     // each port's actual Serial port
    Rectangle[] ledArea = new Rectangle[maxPorts]; // the area of the movie each port gets, in % (0-100)
    boolean[] ledLayout = new boolean[maxPorts];   // layout of rows, true = even is left->right
    PImage[] ledImage = new PImage[maxPorts];      // image sent to each port
    int[] gammatable = new int[256];
    int errorCount=0;
    Tried these lines


    Movie myMovie = new Movie(this, "C://Documents and Settings/opera.avi");
    Movie myMovie = new Movie(this, "C://Documents and Settings//opera.avi");
    Movie myMovie = new Movie(this, "C://opera.avi");
    Movie myMovie = new Movie(this, "C:/opera.avi");
    Movie myMovie = new Movie(this, "opera.avi");
    ..

    Tried OS s

    Win Xp 32bit
    Win 7 32bit
    Win 10 64bit

    Using Processing 3.3.6 Program and tried older versions.

    Best Regards,
    Last edited by emk; 12-15-2017 at 01:07 PM.

  2. #2
    Junior Member
    Join Date
    Nov 2017
    Posts
    5
    anybody knows ? thanks

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    15,943
    Click Sketch > Import Library > Add Library.

    Click image for larger version. 

Name:	Capture1.PNG 
Views:	3 
Size:	72.8 KB 
ID:	12276

    Then scroll down to the bottom of the list. Select the Video library, and click Install.

    Click image for larger version. 

Name:	Capture2.PNG 
Views:	4 
Size:	168.1 KB 
ID:	12277

  4. #4
    Junior Member
    Join Date
    Nov 2017
    Posts
    5
    Hi Paul,

    Thank you for your respond , i have already installed this library and still have same problem.
    Click image for larger version. 

Name:	pj.JPG 
Views:	2 
Size:	55.0 KB 
ID:	12280
    Last edited by emk; 12-14-2017 at 07:10 AM.

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    15,943
    What is the exact error? (screenshot would be best to see)

  6. #6
    Junior Member
    Join Date
    Nov 2017
    Posts
    5
    always this error

    Click image for larger version. 

Name:	pjrc_2.JPG 
Views:	6 
Size:	39.3 KB 
ID:	12279

  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    15,943
    Have you tried a MP4 or MOV file? I know AVI doesn't work on Mac, but MP4 and MOV do.

  8. #8
    Junior Member
    Join Date
    Nov 2017
    Posts
    5
    another same error

    Click image for larger version. 

Name:	pj_3.JPG 
Views:	8 
Size:	42.9 KB 
ID:	12281

    using Win Xp at this moment



    different name different file path

    Click image for larger version. 

Name:	pj_try.JPG 
Views:	6 
Size:	38.0 KB 
ID:	12282
    Last edited by emk; 12-14-2017 at 07:41 AM.

  9. #9
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    15,943
    This is probably a question for Processing's forum. Sorry, I'm not a Processing expert. I've also never really used it much on any platform other than Macintosh.

  10. #10
    Senior Member
    Join Date
    Jan 2013
    Location
    San Francisco Bay Area
    Posts
    638
    Not sure if it's your problem, but I'm fairly sure it should be "\" in windows and not "/" for path separator.
    If you do it that way I'm not sure if you have to escape the special character

    Code:
    C:\try\help.mp4
    or maybe this:

    Code:
    C:\\try\\help.mp4
    Also good to use File.separator for cross-platform.

    Code:
    String moviePath="C:" + File.separator + "try" + File.separator + "help.mp4";
    Movie myMovie = new Movie(moviePath);
    Last edited by linuxgeek; Yesterday at 05:21 PM.

  11. #11
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    15,943
    I tested on Windows 10. It's works. I tested with the MOV file for this video.

    Click image for larger version. 

Name:	capture.jpg 
Views:	5 
Size:	189.0 KB 
ID:	12315
    (click for full size)

    A single forward slash in the filename worked fine, as you can see in this screenshot. The only other edit was adding a serialConfigure line with "COM11" and commenting out the two example serialConfigure with Linux device names.

    I tried to get all of these details and all relevant info into this screenshot. Hopefully it helps?


    Quote Originally Posted by emk View Post
    using Win Xp at this moment
    Maybe Processing's Video library simply does not work on Windows XP?

    As you can see in this screenshot, it works perfectly on Windows 10. I did not need to install anything beyond the Video library from Sketch > Import Library > Add Library.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •