Hacker News new | ask | show | jobs
by jaggederest 1038 days ago
I use a shell script with ffmpeg. I encourage you to check out what works best for you but honestly the quality is pretty stellar with just a really simple one like

    mkdir -p reencoded

    ffmpeg -i input_filename.mp4 -c:v libx265 -crf 26 -preset fast -c:a aac -b:a 128k reencoded/output_filename.mp4
That's a fast single-pass constant quality encode - a two-pass encode would be better quality for the size but I find that very acceptable. It knocks down what would be a ~2gb file all the way to between 800mb - 1200mb with very reasonable quality, sometimes even more - I've seen a 5gb file become a 400mb file (!!). You can experiment with the -crf 26 parameter to get the quality/size tradeoff you like. I run that over every video in the directory as a cron job basically.