Skip to content

Instantly share code, notes, and snippets.

@esnho
Created January 5, 2021 08:41
Show Gist options
  • Save esnho/4fed7d3d62bd00d3d36ba600886ed81b to your computer and use it in GitHub Desktop.
Save esnho/4fed7d3d62bd00d3d36ba600886ed81b to your computer and use it in GitHub Desktop.
#!/bin/bash
for folder in ./* ; do
echo -e "${folder}"
# ffmpeg -i input.file -q:v 0 -g 1 output.file
# ffmpeg -r 1/5 -i img%03d.png -c:v libx264 -vf fps=25 -pix_fmt yuv420p out.mp4
fBasename=$(basename "${folder}")
echo -e "${fBasename} ---"
ffmpeg -r 24 -i "${folder}/%04d.png" -c:v libx264 -q:v 0 -g 1 -vf fps=24 -pix_fmt yuv420p ${fBasename}.mp4
# ffmpeg -r 24 -i "./Cube/%04d.png" -c:v libx264 -q:v 0 -g 1 -vf fps=24 -pix_fmt yuv420p test.mp4
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment