Created
May 23, 2012 17:22
-
-
Save alexnask/2776491 to your computer and use it in GitHub Desktop.
Processes!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| makeVideo: func(music, image, dest: File, name: String) { | |
| // just launch ffmpeg :D | |
| "Making video..." println() | |
| process := Process new(["ffmpeg", "-loop_input", "-shortest", "-y", "-i", image getAbsolutePath(), "-i", music getAbsolutePath(), "-acodec", "copy", "-vcodec", "mjpeg", dest getChild(name) getAbsolutePath()]) | |
| process setStdout(Pipe new()) . setStderr(Pipe new()) | |
| "ffmpeg exited with status %d" format(process execute()) println() | |
| "Made video!" println() | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment