I'm currently using a batch file which (amongst other things) runs the following handbrakecli command line to convert a video:
HandBrakeCLI.exe -v0 --input "D:\input.mkv" --preset="Universal" --ipod-atom -t 1 --angle 1 --gain 0 --output="D:\output.mp4"
This has served me well for many years, producing a video file which is smaller than the original (good when you only have 16Gb devices), looks good enough and works on pretty much any iPod, iPad and iPhone I put it on.
However over time handbrakecli is struggling to convert more and more videos to the point that I need to look for an alternative. It's not helped by the fact that the logs provide absolutely no information as to why it has crashed. This video, for example, crashed at 71% through the conversion and this is the last 4 lines:
AC3 Passthru requested and input codec is not compatible for track 2, using AC3 encoder x264 [info]: using SAR=9593/9600 x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX x264 [info]: profile Constrained Baseline, level 3.0
Not very helpful.
I looked at using ffmpeg as an alternative, but all the examples I've seen on the internet do one or more of the following:
- Don't work (command line options aren't recognised) - common!
- Result in a file which is larger than the original - very common!
- Distort the picture, especially when an unexpected video size is converted (eg. non-widescreen PAL)
- Remove the audio
- Result in a video that the iPhone, iPod or iPad won't play
Is there a decent all-purpose ffmepg command line which will make any video run happily on all Apple device plus achieving a reduction in file size?
Bonus points if it'll shrink (but not distort) any video over 720p too.