I don't know who might need this but. You can compress a 2 minute video and kept...
Luzzy @meluzzy@woof.tech
I don't know who might need this but.
You can compress a 2 minute video and kept it looking HD into less than 10MB (for discord or social media in general) with this #ffmpeg command:
`ffmpeg -i in.mp4 -threads 8 -preset:v veryfast -c:v hevc -pix_fmt yuv420p -color_range 0 -crf 25 -c:a libopus -ac 1 -b:a 64k -ar 24000 -vf "fps=30,scale=-2:720:flags=lanczos" -map_metadata -1 out.mp4`
> It shouldn't take more than 1 minute to run the command if you have a decent computer, but this depends on the size and length of the input video. I have my camera set to record at 1280x960 so that it takes less to process.
> Also, this command gets rid of metadata like geolocation, author and sh*t like that so that you don't accidentally dox yourself (although most social media do this automatically for you).
> Also change the `-threads 8` to 4 if you only have 4 cores, increasing it beyond 8 probably achieves nothing even if you have the cores, but that depends on the encoder.
> And, of course, you can use the GPU for this with something like `-hwaccel vulkan` or just use a specific h265 encoder that runs on your GPU instead for `-c:v`.