Skip to content

Instantly share code, notes, and snippets.

@erfan-mehraban
Created February 22, 2019 12:14
Show Gist options
  • Save erfan-mehraban/65245d15567b56bb8c6bcbf992f79d05 to your computer and use it in GitHub Desktop.
Save erfan-mehraban/65245d15567b56bb8c6bcbf992f79d05 to your computer and use it in GitHub Desktop.
By this bash and ffmpeg tool, I merge and convert(resize) long recorded videos from my phone. You can set output file name as an argument.
echo "" > concat.list;
for f in ./*.mp4; do echo "file '$f'" >> concat.list; done;
ffmpeg -f concat -safe 0 -i concat.list -c copy output.mp4;
ffmpeg -i output.mp4 -vcodec libx264 -crf 21 $@.mp4;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment