Downscaling 4K iPhone video to 1080

ffmpegiphonevideo

I am trying to downscale a huge 4K video taken with an iPhone 14 so that I can further process it with Powerdirector's mobile app for Android. I spent hours fiddling with both Handbrake and ffmpeg converting the source video, but the result was always too jerky, especially when the camera was moving, as if the number of frames per second was too low. Is there maybe a special codec that I need?

Here are the characteristics of the source video: MPEG-4, 26.3 Mb/s variable, 32.587 FPS, AVC High 5.2, 3840×2160, YUV, BT.709.

Apparently, Powerdirector works best with MPEG-2, and 1080 should be sufficient for my purpose. Can anyone help me find the correct command line for doing that conversion with ffmpeg? Since the video is almost an hour long, I would like to run the command for the first 30 seconds of the video only and then check the result.

Best Answer

The check after 30 seconds:

ffmpeg -i [inputfile] -t 30 -c:v mpeg2video -crf 22 -c:a mp3 -vf scale=1920:1020 [outfile].mpg

To encode the whole file:

ffmpeg -i [inputfile] -c:v mpeg2video -crf 22 -c:a mp3 -vf scale=1920:1020 [outfile].mpg


Notes

Since your original video was in 4K, it was likely encoded in HEVC. Going from HEVC to mpeg2 is a major quality loss as HEVC as 4x more efficient than mpeg2

Related Question