Skip to content

Instantly share code, notes, and snippets.

@alexnask
Created May 23, 2012 17:22
Show Gist options
  • Select an option

  • Save alexnask/2776491 to your computer and use it in GitHub Desktop.

Select an option

Save alexnask/2776491 to your computer and use it in GitHub Desktop.
Processes!
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