Forum
>
Site Discussion
>
Thread
I tried Handbrake a while ago, but from what I remember it always re-encodes and doesn't really do lossless conversions even when it should be possible (i.e. moving a video stream from an .mkv container format to .mp4, etc)
After downloading, if the video needs to be cut down in length, combined with other segments, or rotated correctly, I like to do it without lossy re-encoding of the video stream if possible, since that lowers the original video quality.
Rotating/Cropping-
For lossless rotation of videos filmed sideways and such, the best thing I've found is the free program FFmpeg Batch, which is basically a graphical frontend for the FFmpeg command-line suite, and quite powerful (it comes with its own version of FFmpeg so you don't need to download anything else). The default rotation parameters it comes with also do format conversion, but I found out you can use the parameters:
-metadata:s:v rotate="-90" -codec copy
instead, which seems to work fine without messing with the original data. The "-90" (90 degree clockwise rotation) can be changed to "-180" or "-270" depending on how far the video needs to be rotated. If you're working with .mp4 files, make sure the format field is set to mp4 also.
FFmpeg Batch can be used to do pretty much anything FFmpeg can, including non-lossless stuff like cropping, example parameters for cropping a video:
-filter:v "crop=640:420:0:0" -crf 10
where 640x420 is the final size you want and 0:0 (x:y) is the starting point, top-left; it would be 640:420:0:200 if you wanted to start the crop box 200 pixels down, for instance. The "-crf 10" part sets a Constant Rate Factor of 10 which should be nearly lossless quality, and is a useful thing to add for any function that isn't inherently lossless, i.e. not the rotation command above.
Trimming/Combining Videos-
For losslessly trimming down the length of a video or combining multiple videos into one (the latter is useful for Instagram Stories, where often a single video is spread into multiple 15-second clips), I like the program Machete. It's paid, but only costs $20 (there's a free version, but it doesn't work with mp4 files). The only limitation is that you have to cut the videos at the keyframe points, which aren't always exactly where you want them, but they're usually close enough. A good free alternative to Machete is Avidemux, just be sure it's set to copy mode, use the keyframe buttons to select the edit points, and have the output format set to MP4 (if that's what you're editing). This page lists a bunch of other alternative programs.
EDIT: Added a free alternative to Machete for trimming, and more detail in the cropping section.