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

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

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

    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

    Using Processing 3.3.6 Program and tried older versions.

    Best Regards,
    Last edited by emk; 12-18-2017 at 10:09 AM.

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

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

    Click image for larger version. 

Name:	Capture1.PNG 
Views:	42 
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:	52 
Size:	168.1 KB 
ID:	12277

  4. #4
    Junior Member
    Join Date
    Nov 2017
    Posts
    8
    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:	46 
Size:	55.0 KB 
ID:	12280
    Last edited by emk; 12-14-2017 at 06:10 AM.

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

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

    Click image for larger version. 

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

  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    18,349
    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
    8
    another same error

    Click image for larger version. 

Name:	pj_3.JPG 
Views:	72 
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:	58 
Size:	38.0 KB 
ID:	12282
    Last edited by emk; 12-14-2017 at 06:41 AM.

  9. #9
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    18,349
    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
    641
    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; 12-16-2017 at 04:21 PM.

  11. #11
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    18,349
    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:	71 
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.

  12. #12
    Junior Member
    Join Date
    Nov 2017
    Posts
    8
    Quote Originally Posted by linuxgeek View Post
    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);

    I do not use special characters i used your file paths still same error
    Last edited by emk; 12-18-2017 at 10:05 AM.

  13. #13
    Junior Member
    Join Date
    Nov 2017
    Posts
    8
    Quote Originally Posted by PaulStoffregen View Post
    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:	71 
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?




    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.
    Hi Paul ,
    as u said the video library does not work on Win Xp. I will also try windows 10 and write the results here

  14. #14
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    18,349
    Did you get it running on Windows 10?

  15. #15
    Junior Member
    Join Date
    Nov 2017
    Posts
    8
    Quote Originally Posted by PaulStoffregen View Post
    Did you get it running on Windows 10?
    Problem solved but i have some wiring problem and short circuit but the codes working on Win10.

    Note:

    Avi files showing black screen on processing ,mov files working properly.

    Thank you for your support.

Posting Permissions

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