Skip to content

Instantly share code, notes, and snippets.

@mfd
Last active April 16, 2025 07:17
Show Gist options
  • Save mfd/db823703095e8fe54d140c47b20b3045 to your computer and use it in GitHub Desktop.
Save mfd/db823703095e8fe54d140c47b20b3045 to your computer and use it in GitHub Desktop.
Resize videos to h640

#by width

for i in *.mp4; do; ffmpeg -i $i -vf scale=800:-1 ${i%.*}_w800.mp4; done

#by height

for i in *.mp4; do; ffmpeg -i $i -vf scale=-2:800 ${i%.*}_h800.mp4; done
ffmpeg -i file.wmv -vcodec libx264 -acodec aac file_enc.mp4

`` ffmpeg -framerate 30 -pattern_type glob -i '*.png' c:v libx264 -pix_fmt yuv420p out.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment