Skip to content

Instantly share code, notes, and snippets.

@EchedelleLR
Last active May 30, 2025 18:35
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).

@EchedelleLR
Copy link
Author

ffmpeg -i [origin].[extension] -i [origin].[subtitle-extension] -vf "scale=-1:720,fps=24" -c:a libvorbis -c:v libvpx -ar 48k -b:v 1M -b:a 128k -crf 28 -pix_fmt yuv420p -metadata:s:s:0 language=[language] [destination].[webm/mkv/mp4]

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