We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello,
I'm using video files to store data for an LED program, and would like to play the video file back in Processing, and then send the data to the LEDs using a function called 'scrape()'.
So far I'm just testing loading and playing movies. I'm able to play a video file that's 720 x 720, but when playing a smaller file (closer to the actual number of LEDs I'd use, like 100 x 10 or 10 x 10), nothing shows up in the window.
Here's my code:
Movie myMovie;
void setup() {
size(640, 640);
selectInput("Select a file to process:", "fileSelected");
}
void draw() {
if(myMovie != null) {
image(myMovie, 0, 0, 100, 10);
scrape();
}
else {
}
}
void movieEvent(Movie m) {
m.read();
}
void fileSelected(File selection) {
if (selection == null) {
println("Window was closed or the user hit cancel.");
} else {
println("User selected " + selection.getAbsolutePath());
}
myMovie = new Movie(this, selection.getAbsolutePath());
myMovie.loop();
}
My current hypothesis is that there might be a minimum size movie file that the Processing video library can handle -- could this be possible?
I also find it surprising that when I open the video in Quicktime (it's a .mov file), the video file is automatically expanded to 350 x 350 for playback. Is it possible that Quicktime has a minimum file size, and that this is causing my errors?
thanks for your help!
Answers
10 pixels is probably too small for a video height. I'm not an expert, but videos are not like images and the ratio should be constant. It also depends greatly on codec you're using. How do you create 100x10 video?
Interesting. What are the limitations?
The video file I have is an animation (uncompressed) codec in a .mov package.
@Ater && morphogencc:
--- you can create very little videos with afterEffects; i have done that with 30X30 px (never tried 10, but why not!!!) --- the ratio can be what you want with AE, as you can choose any customized ratio ----i have imported them in P5, not any problem ---- the limitation is for the quicktime player which cannot be so little in width but it does not matter when you use the video in processing....