Last active
August 29, 2015 14:26
-
-
Save Oceanswave/37f0d8d49933565569da to your computer and use it in GitHub Desktop.
This file contains 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
Since you're getting old and senile. | |
1) Run node script to output files in date order to a file. | |
var recursive = require('recursive-readdir'); | |
var fs = require("fs"); | |
var inputFolder = process.argv[2]; | |
if (!inputFolder) { | |
console.log("** YOU GOTTA SPECIFY THE TARGET PATH AS THE FIRST PARAM! **"); | |
process.exit(1); | |
} | |
recursive(inputFolder, ['ff*', '.*'], function (err, files) { | |
var filesOrdered = files.map(function (v) { | |
return { | |
name: v, | |
time: fs.statSync(v).mtime.getTime() | |
}; | |
}) | |
.sort(function (a, b) { return a.time - b.time; }) | |
.map(function (v) { return v.name; }); | |
filesOrdered.forEach(function (fileName) { | |
console.log("file '" + fileName + "'"); | |
}); | |
}); | |
Then run that sucker | |
/Volumes/Slug Bug/node outputFile.js "/Volumes/Slug Bug/YourFolderHere" > files.txt | |
then review the ffmpeg documentation (LOL): | |
https://www.ffmpeg.org/ffmpeg-formats.html | |
then run | |
ffmpeg -f concat -i files.txt -vcodec mpeg4 -b:v max -s 1920x1080 -r 60 stx.mp4 | |
rember the -f {{command}} indicates the input preference, not the operation! duh! | |
q q saves and quits. Read the text that flashes by. duh! | |
See | |
https://ffmpeg.org/ffmpeg.html | |
http://linuxers.org/book/export/html/593 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment