Skip to content

Instantly share code, notes, and snippets.

@EchedelleLR
Last active November 19, 2024 19:11
Show Gist options
  • Save EchedelleLR/3a1dc3530c5c78e07202de1c05ab44fd to your computer and use it in GitHub Desktop.
Save EchedelleLR/3a1dc3530c5c78e07202de1c05ab44fd to your computer and use it in GitHub Desktop.
Ffmpeg quick VP8 encoding to 720p
# GPLv3.0
find /original/path/ -type f | xargs -I "{}" -P 1 sh -c 'rm /destination/path/"$(basename "{}" | cut -f -3 -d '.')".original_extension; ffmpeg -i "{}" -vf "scale=-1:720,fps=24" -c:a libvorbis -c:v libvpx -ar 48k -b:v 1M -b:a 128k -crf 30 -pix_fmt yuv420p -deadline realtime -cpu-used 0 /destination/path/"$(basename "{}" | cut -f -3 -d '.')".destination_extension'
@EchedelleLR
Copy link
Author

This is thx to @GamePlayer-8 with the original combination of find and xargs (I don't really know how to use it).

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