For archiving, storage space and sharing purposes, it might be interesting to transcode videos, either by using a more recent/efficient encoder or by reducing quality to yield smaller file sizes.
Nowadays, the usually used GPL encoders are (from worst to best file sizes since that's our main concern) :
- (sometimes in mid 2017) AV1
Right now, x265 is the newest and is good to reduce file size while keeping an overall decent quality, of course there's no magic, x265 manages to do that by being more demanding in terms of CPU when decoding (less if you have an hardware decoder like on recent GPU (2016) and encode time.
Of course, when watching the video later on, you'll need the appropriate codecs to decode the stream, on a Gentoo system, this is hardly a problem but if you plan to use this file on, say, a TV, please check that the TV can read x264 and specially x265 which is more recent at the time of writing (2017) :)
Using handbrake to transcode a video with x265.
First, install the x264 and x265 encoders :
emerge --ask media-libs/x264 =media-libs/x265-2.2
Make sure to use the latest ~amd64 release of x265 (2.2 at this time) for the sweet performance improvements, see https://packages.gentoo.org/packages/media-libs/x265
Enable x265 support in handbrake
then install it :
emerge --ask --newuse media-video/handbrake