Skip to content

Instantly share code, notes, and snippets.

@tayiorbeii
Created October 20, 2023 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tayiorbeii/0fa03e2dcc3743c30b26af19c943a3a3 to your computer and use it in GitHub Desktop.
Save tayiorbeii/0fa03e2dcc3743c30b26af19c943a3a3 to your computer and use it in GitHub Desktop.
import "@johnlindquist/kit"
let longVideoFiles = await drop()
cd(path.dirname(longVideoFiles[0].path))
for (let longVideoFile of longVideoFiles) {
let {name, dir} = path.parse(longVideoFile.path)
await exec(`ffmpeg -i "${longVideoFile.path}" -vcodec libx264 -crf 24 "${dir}/${name}-encoded.mp4"`)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment