Howdy, Stranger!

We are about to switch to a new forum software. Until then we have removed the registration on this forum.

  • Call MovieMaker tool inside code

    @nikos_nt -- It sounds like you want the Video Export Library by @hamoid so that you can do it right from your sketch:

    If not, check out previous MovieMaker posts -- some recent ones discuss the source code and documentation, so there might be something there:

  • Call MovieMaker tool inside code

    Hello, I'm a beginner.

    Could the MovieMaker tool be called inside code so as to create movies automatically?

    Any direction to this matter would be very helpful.

  • Movie Maker Bug?

    Could you check that you don't have the same problem using P3.3.4? An alternative to MovieMaker is VideoExport by @hamoid:

    https://www.funprogramming.org/VideoExport-for-Processing/

    https://forum.processing.org/two/discussion/9195/video-export-library

    Kf

  • Processing MovieMaker Tool source code.

    @MichelNimes --

    Are trying to pop up the Movie Maker wizard UI form while your sketch is running?

    Or are you trying to automatically start and stop screen recording to a video file as a background operation while your sketch is running?

    If the second, you probably don't want to use the want the MovieMaker Tool -- instead you want the Video Export Library by @hamoid :

  • Video Export Library, need help testing update for Windows

    That obvious fact is very important - with his library you don't need to distribute the MovieMaker tool along with any program that creates movies.

  • Non-realtime Rendering - Performance Workaround

    Right. But the frameCount just increases by 1 each time draw is called and the image is created.

    60 images are produced by this sketch but when they are turned into a movie file (using MovieMaker), all the movement in the animation is lost.

    Are people creating each frame manually outside of draw and then adding 1 to the framecount after each saveFrame call ?

    PShader basicShader;
    
    void setup()
    {
      size(1280,720, P3D);
      frameRate(30);
      basicShader = loadShader("fragNoise.glsl");
      basicShader.set("u_resolution", float(width), float(height));
    
    }
    
    void draw(){
      basicShader.set("u_time", millis() / 100.0);  
      shader(basicShader); 
      rect(0,0,width,height);
    
    
      saveFrame("noise-######.png");
    
      println(frameCount);
    
      if(frameCount == 60)
      {
       exit(); 
      }    
    }
    
  • Movie Maker bug?

    Got it.

    1. What Processing version / OS?
    2. Did the exported frames already appear upside down before going into MovieMaker?
  • use opencv output data/frames for further analysis

    Dear team,

    I have an issue regarding the following: I use opencv to perform a first analysis of a video. I also use Daniel S. code on computer vision to analyse pixels.

    I would like to take further actions on the processed videodata/frames (generated in draw() by opencv, though it keeps using the original video as input. What is the correct way to use the opencv generated data in draw (the drawed contours + created background) as input for further analysis?

    import gab.opencv.*;
    import processing.video.*;
    
    Movie video;
    OpenCV opencv;
    
    
    ////////////////////new code
    int blobCounter = 0;
    int framecount= 0;
    int maxLife = 50;
    
    color trackColor; 
    float threshold = 100;
    float distThreshold = 50;   //   the treshold for making a new blob if treshold (distance of pixels) is too big
    
    
    
    ////////////////////end new code
    
    
    void setup() {
      size(480, 360);
      video = new Movie(this, "drukke_straat.mp4");    // drukke straat
      
    
      
      opencv = new OpenCV(this, width, height);
      opencv.startBackgroundSubtraction(20, 3, 0.5);
      
      video.loop();
      video.play();
     
    }
    
    
    void draw() {
      
      if(video.width > 0 && video.height > 0){//check if the cam instance has loaded pixels else do nothing 
      
      //frameRate(25);
      //image(video, 0, 0);  
      background(0);
      
      
      opencv.loadImage(video);
      opencv.updateBackground();
      opencv.dilate();
      opencv.erode();
     
      
      for (Contour contour : opencv.findContours()) {
         fill(255,0,0);
         strokeWeight(1);
         stroke(255, 0, 0);
         contour.draw();
          }
      }
      
      // saveFrame("output2/frames"+framecount+".png");
        framecount ++ ;
    
    }
    
    
    
     void movieEvent(Movie m) {
         m.read();
          }
    

    bellow code is the code that uses video as input. I am not sure how to correctly feed the bellow code with the opencv generated data. Currently I have two scripts sepperatly , furst i run opencv scipt and save all the frames, then i make an mp4 file with moviemaker. after it i use it on the second scipt. Some advice would be appreciated.

       void draw() {
      
      if(video.width > 0 && video.height > 0){//check if the cam instance has loaded pixels else do nothing 
      
      frameRate(8);
      image(video, 0, 0);  
     //background(0);
      
    
    ArrayList<Blob> currentBlobs = new ArrayList<Blob>();    // new array is created previous current array is cleared
    
      // Begin loop to walk through every pixel
      for (int x = 0; x < video.width; x++ ) {
        for (int y = 0; y < video.height; y++ ) {
          int loc = x + y * video.width;
          // What is current color
          color currentColor = video.pixels[loc];
          float r1 = red(currentColor);
          float g1 = green(currentColor);
          float b1 = blue(currentColor);
          float r2 = red(trackColor);
          float g2 = green(trackColor);
          float b2 = blue(trackColor);
    
          float d = distSq(r1, g1, b1, r2, g2, b2); 
    
          if (d < threshold*threshold) {       // treshold* treshhold as d is operated in the same way (squared)
    
  • recording a video

    Hi @farm402 -- apologies for missing you last question.

    Correct:

    1. Generate timeslice audio data. Create one data row (e.g. Table) for each time slice. Then save the data (e.g. saveTable) to disk. You can now generate different non-realtime rendering of audio from that data as many times as you want.

    2. Load the data from disk (e.g. loadTable). Loop through timeslice rows, and draw an image for each row. Either save the images with saveFrame (if you plan to assemble them into a movie e.g. QuickTime, After Effects etc.) or use MovieMaker. Use nf to pad the image filenames to make them easy to work with.

  • Processing MovieMaker Tool source code.

    Where on github can I found the source code for the Movie Maker tool. I can't find it anywhere and I need to access it by code rather then by a tool.

  • recording a video

    Thank you so much for your comment @jeremydouglass, makes things a lot clearer!

    I do not use MovieMaker as I’m used to work with After Effects.

    Regarding the code … so in the first run I save the value from the audio analysis for every frame, together with the values from my MIDI controller (I control the movement, behaviour of the elements).

    Then in the second run I read the values from the table instead of the audio analysis, and write out an image for every frame. Is that correct?

  • recording a video

    @farm402 -- also, just to be sure, are you working with Processing > Tools > MovieMaker? The key thing with that workflow is to saveTable your audio analysis with a correct frame number identifying each sample row, and then loadTable the per-frame data and use it to render named frame files. This will allow you to easily create perfectly synced MovieMaker files even if it takes a very long time to render each frame.

  • render off frame / not on fps realtime

    Well just saying, I tried the movieMaker tool when using saved images with "saveFrame()" but it does not give me the smootheness and quality I need. Or do I need to have different settings in some way?

  • Exporting 3D interactive sketch

    Hi guys,

    Im trying to (I know, ongoing question here..) export this sketch Im doing as movie. I did a bit of research and it seems the best way is to use the internal tool Processing has called MovieMaker, which just means rendering some pngs and have MovieMaker do the rest. Unfortunately when I write "saveFrame("frames/####.png");" my sketch just freezes and doesnt run properly.

    I dont know if its an issue of too much data.. but I've seen many processing sketches online that look more robust than what Im doing, so Im a bit confused. Is it because Im using 3D? If anyone has any help I would really appreciate it.

    Screen Shot 2016-04-07 at 5.19.10 PM

    Uploaded an image, because every time I paste in the code it starts quoting some of it...

  • export audio-video

    hi guys! i'm working on audio-visual using minim libreries. i want export the sketch result in a .mov file. i've tried to using saveFrame function and moviemaker tools but the problem is that it don't create a .mov with the right time. i've tried to stretch the video, but it isn't sync with audio...i think that is a frameRate problem... anyone have a solution??? thanks!!

  • Processing for android discontinued?

    Yes - where is the Android Mode add on please?

    Here is the official processing-2.2.1-linux64.tgz top level folders:-

    . ./tools ./tools/MovieMaker ./modes ./modes/java ./core ./core/library ./java ./java/plugin ./java/man ./java/bin ./java/lib ./lib ./lib/fonts ./lib/icons

  • Syncing video to audio

    So the right approach so far to this problem is using Krister's ESS R2 instead of the minim library for FFT analysis. Simultaneously you make a video out of your frames using GSVideo; the crucial thing here is not to display the frames to prevent lag. Instead, you create a PGraphics object and save the frames to that. Once you have the video, you use an external editing software to put the video and audio together (I used moviemaker for this). Video quality is low right now, but I'm working on making HD videos. Will update once I figure that out.

  • Making HD Videos with GSVideo

    Hello fellow Processing users!

    I'm trying to create HD movies out of processing sketches. Everything is set up using GS moviemaker, the only issue is that it only has a Theora encoder which really destroys the quality (or at least thats what I think the source of the problem is). From what I've read, they will not have any other encoders until the next build. Any ways of getting around this?

    Cheers

  • Processing 1.5 with Moviemaker

    Hello,

    I recently downgraded to processing 1.5 because its more stable than other releases. I'm trying to use moviemaker class to make a video out of the single frames that I am saving to disk, the problem is that when I run the code, I get the error: ClassNotFoundException: quicktime.QTException I have installed the latest version of quicktime and even tried re-installing, but the same error keeps popping up everytime. Does anyone know how to fix this issue?

    Many thanks!!