Including sound to a movie
in
Contributed Library Questions
•
8 months ago
Hi
I've made a video using GSVideo library since, for some reason, the MovieMaker in Processing IDE doesn't work for me (Windows 7, Processing 2b7). The video is here: http://www.youtube.com/watch?v=Nen93v6CXrs
The music track was analysed with Minim to produce some effects. My question is, is there a way to include the music track in the produced video. In the above video I had to use an external tool (NCH VideoPad) to combine the sound and video, which brings the problem of syncing the sound with the movie!
If there is not a way to straightly include the sound into the video in the movie making process in Processing so what would be your advice to syncing the sound.
Another problem is of course the poor quality of the video due to the compressing. Will the Processing MovieMaker help in this, when it eventually works. How to make higher quality videos?
Stone Richnau
And here is the skeleton code:
import codeanticode.gsvideo.*;
import ddf.minim.*;
import ddf.minim.analysis.*;
import ddf.minim.effects.*;
GSMovieMaker mm;
int fps = 30;
Minim minim;
AudioPlayer song;
void setup()
{
size(500,500,P2D);
background(0);
frameRate(fps);
smooth();
mm = new GSMovieMaker(this, width, height, "video/drawing.avi", GSMovieMaker.MJPEG, GSMovieMaker.BEST, fps);
minim = new Minim(this);
song = minim.loadFile("groove.mp3", 2048);
song.play();
mm.setQueueSize(50, 10);
mm.start();
}
void draw()
{
background(0);
// DO SOMETHING
loadPixels();
// Add window's pixels to movie
mm.addFrame(pixels);
}
I've made a video using GSVideo library since, for some reason, the MovieMaker in Processing IDE doesn't work for me (Windows 7, Processing 2b7). The video is here: http://www.youtube.com/watch?v=Nen93v6CXrs
The music track was analysed with Minim to produce some effects. My question is, is there a way to include the music track in the produced video. In the above video I had to use an external tool (NCH VideoPad) to combine the sound and video, which brings the problem of syncing the sound with the movie!
If there is not a way to straightly include the sound into the video in the movie making process in Processing so what would be your advice to syncing the sound.
Another problem is of course the poor quality of the video due to the compressing. Will the Processing MovieMaker help in this, when it eventually works. How to make higher quality videos?
Stone Richnau
And here is the skeleton code:
import codeanticode.gsvideo.*;
import ddf.minim.*;
import ddf.minim.analysis.*;
import ddf.minim.effects.*;
GSMovieMaker mm;
int fps = 30;
Minim minim;
AudioPlayer song;
void setup()
{
size(500,500,P2D);
background(0);
frameRate(fps);
smooth();
mm = new GSMovieMaker(this, width, height, "video/drawing.avi", GSMovieMaker.MJPEG, GSMovieMaker.BEST, fps);
minim = new Minim(this);
song = minim.loadFile("groove.mp3", 2048);
song.play();
mm.setQueueSize(50, 10);
mm.start();
}
void draw()
{
background(0);
// DO SOMETHING
loadPixels();
// Add window's pixels to movie
mm.addFrame(pixels);
}
1