Skip to content

Instantly share code, notes, and snippets.

@stormslowly
Created March 1, 2019 04:32
Show Gist options
  • Save stormslowly/9870e7f72937a9934cc1420d1a54a1fc to your computer and use it in GitHub Desktop.
Save stormslowly/9870e7f72937a9934cc1420d1a54a1fc to your computer and use it in GitHub Desktop.
time collapse using ffmpeg
#!/usr/bin/env node
const files = process.argv.slice(2)
const cmds = files.map(f =>
`ffmpeg -i ${f} -filter:v "setpts=PTS/30" -crf 20 -r 30 -an -threads 1 -y -vcodec libx264 ${f}.collapse.flv`)
console.log(cmds.join('\n'))
#!/usr/bin/env bash
printf "file '%s'\n" *.flv > mylist.txt
ffmpeg -f concat -i mylist.txt -c copy timecollapse.flv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment