Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
outputs avconv configuration
// argument input_file
// process inFile and outFile
var inFile = process.argv.pop();
var cutAt = inFile.lastIndexOf('.');
var inExt = inFile.substr(cutAt + 1);
var inName = inFile.substr(0, cutAt);
var outFile = [inName, 'mp4'].join('.');
var cmd = [
'-i', inFile,
'-f', 'mp4',
'-c:v', 'libx264',
// '-c:v', 'mpeg4',
'-preset', 'ultrafast',
'-b:v 2M -maxrate 1M -minrate 1M -bufsize 1M',
'-r', 25,
'-s', '480x270',
// '-c:a', 'aac',
'-c:a', 'libvo_aacenc',
// '-c:a', 'libmp3lame',
//'-c:a', 'copy',
'-b:a', '96k',
//'-ss', '00:00:00', // start at hh:mm:ss[.xxx]
//'-t', 60, // trim duration, in seconds or hh:mm:ss[.xxx]
].join(' ');
list formats:
avconv -formats
list encoder codecs:
avconv -codecs|grep "^..EV"|less
avconv -codecs|grep "^..EA"|less
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment