x265 transcoding
I continue to re-encode video I get into x265. It’s much smaller, which helps both with storage and bandwidth. And it looks fine to my tin eye.
My script has evolved over time. This is what I do now:
ffmpeg -i “$1” -map 0 -c copy -c:v libx265 “${1%.*} x265.mkv”
In theory this leaves all the audio and subtitles alone, just copies them, but re-encodes the video in x265 with default settings.
I was in a hurry today and so got fancy with resizing the video to 360p and using a faster / less accurate encoding setting.
ffmpeg -i “$1” -map 0 -c copy -vf scale=-1:360 -c:v libx265 -preset faster “${1%.*} x265.mkv”
Quality definitely suffers for this, but I can encode at 3-4x playback speed on my CPU this way.