Skip to content

Instantly share code, notes, and snippets.

@tayiorbeii
Created October 13, 2022 17:12
Show Gist options
  • Select an option

  • Save tayiorbeii/e66caae2ba6f3002caa9954acb7b55d4 to your computer and use it in GitHub Desktop.

Select an option

Save tayiorbeii/e66caae2ba6f3002caa9954acb7b55d4 to your computer and use it in GitHub Desktop.
import "@johnlindquist/kit"
/*
* Highlight the long video we are taking clips out of in Finder
*/
let longVideoFiles = await drop()
/**
* Tell kit we want to be working in the same directory as the source file
*/
cd(path.dirname(longVideoFiles[0].path))
dev(longVideoFiles)
for (let longVideoFile of longVideoFiles) {
await exec(`ffmpeg -i "${longVideoFile.path}" -c copy "${longVideoFile.path.slice(0,-4)}.mp4"`)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment