Skip to content

Instantly share code, notes, and snippets.

@BYVoid
Created October 19, 2013 06:08
Show Gist options
  • Save BYVoid/7052159 to your computer and use it in GitHub Desktop.
Save BYVoid/7052159 to your computer and use it in GitHub Desktop.
Batch convert multimedia files
fs = require("fs");
path = require("path");
var files = fs.readdirSync(".");
for (var i = 0; i < files.length; i++) {
var file = files[i];
var ext = path.extname(file);
if (ext != '.ogg') {
continue;
}
var base = path.basename(file, ext);
console.log("ffmpeg -i " + file + " aac/" + base + ".aac");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment