|
Author |
Topic: creating a database (Read 424 times) |
|
inadaze
|
creating a database
« on: Nov 7th, 2004, 3:50am » |
|
If I had a few dozen movie clips (quicktimes) in a folder and I wanted processing to select only a few of them and put them together depending on what the user selects, how would I do this? I would prefer the result to be showed as a quicktime movie and not in the processing environment. i just want it to edit them together depending on the users choices. Any idea's? Thanks Jay
|
|
|
|
REAS
|
Re: creating a database
« Reply #1 on: Nov 7th, 2004, 6:59pm » |
|
Try SMIL.
|
|
|
|
fjen
|
Re: creating a database
« Reply #2 on: Nov 8th, 2004, 2:32am » |
|
i had good results using a playlist on os-x ... it's just a text-file in which you write the files in a certain manner/order and then pass it on to quicktime-player to run that. check google for ".pls" (i think that was the ending i used on mac) to learn how to write such a playlist. it's actually the same as an mp3-playlist, quicktime-player treats mp3's just as movies ... if you're on os-x i can send you an applescript to run a movie in fullscreen-mode in quicktime-player from processing ... /F
|
|
|
|
inadaze
|
Re: creating a database
« Reply #3 on: Nov 8th, 2004, 3:59am » |
|
Please do send me the applescript! that would be great. inadaze at mac dot com I looked into SMIL and that looks good also. But how would I communicate with SMIL from processing? Thanks guys! Jay
|
|
|
|
fjen
|
Re: creating a database
« Reply #4 on: Nov 8th, 2004, 5:00pm » |
|
smil works like html/xml, just write the code into a text-file, name it with .smi ending and pass it to quicktime, realplayer ... no need for communication. might be helpfull to someone else ... applescript to run movie fullscreen-mode in quicktime: Code: -- hfg offenbach rundgang 2004 / digital design II, david linderman -- florian jenett, juni 2004, www.florianjenett.de tell application "QuickTime Player" activate if (the (count of windows) ? 1) then repeat with the_window in windows close the_window end repeat end if enter full screen display 1 set the_movie to open file ":Developer:Examples:Java:QTJava:QTJavaDemos:media:jumps.mov" present the_movie scale normal display 1 repeat while (playing of the_movie is true) -- waiting for movie to finish -- end repeat close the_movie exit full screen display 1 end tell tell application "Processing" activate end tell |
| Code: // run script from processing: try{ String script_location = "/path/to/script.app" Process p = Runtime.getRuntime().exec(script_location); println(p.waitFor()); // will halt processing 'til finished } catch (Exception e) { e.printStackTrace(); } |
| you need to edit the script with "scipt editor" to have it run the movie you want .. and then save it as application. /F
|
|
|
|
inadaze
|
Re: creating a database
« Reply #5 on: Nov 9th, 2004, 6:25pm » |
|
Thanks for the code! I will use it. What I wanted to know about communication between Processing and SMIL was this: How would I output names of movie from processing so that my SMIL file accepts them as the scenes in a sequence so that it shows them all one after another? The SMIL portion I can figure out, but how do I send a message out of Processing so that my SMIL file can be updated with whichever scenes the user chose for the movie? Thanks Jay
|
|
|
|
fjen
|
Re: creating a database
« Reply #6 on: Nov 9th, 2004, 6:36pm » |
|
it's saveStrings() in the reference. let's you save a text-file to from where your sketch is currently running. put the smil-code in a string-variable, then save it using savestrings into a text-file with smil-ending and then use the code & applescript from above to run it in quicktime-player. /F
|
« Last Edit: Nov 9th, 2004, 6:38pm by fjen » |
|
|
|
|
inadaze
|
Re: creating a database
« Reply #7 on: Nov 27th, 2004, 11:28pm » |
|
Hi, I have just been trying to use the saveString(); function in a method i created for one of my objects. It gives me this error. "no method named "saveStrings" was found in type "Temporary_7238_2755$RunComparison". Here's my code: class RunComparison { //Properties String a; String Output; //Constructor RunComparison() { } //Methods void testLinePlacement() { this.a = "TEST THIS"; this.Output = this.a; this.saveStrings("Test.txt",this.Output); } } I am not to sure how this function is used in an object. i tried to initialize it first, but that did not work. Anybody know? Thanks Jay
|
|
|
|
inadaze
|
Re: creating a database
« Reply #8 on: Nov 28th, 2004, 9:35pm » |
|
....eh... That would probably because I'm a dumbass and put "this.saveStrings()" instead of just "saveStrings()", right. Got it. Jay
|
|
|
|
|