Friday, January 25, 2013

FFMPEG - Rescaling with high CPU usage

When you transcoding video with FFMPEG and encounter the following symptom

1. High CPU spin (for example, 99% CPU usage)
2. Long transcoding period with slow progress (for example, a 40s video file took more than 1 minute to transcode)

You may need to tweak your transcoding parameters.

This will usually happen when

1. Transcoding high quality 1920x1080 file.
2. Rescaling high quality 1920x1080 file to lower resolution

This is usually because FFMPEG trying to transcode/re-scale the file with original high quality framerate

So, when re-scaling a high quality file, you can try the following command

ffmpeg.exe -i "input.mp4" -r 15 -s 640x360 "output.mp4"

The above assuming that input.mp4 is high quality (15000 kb/s and above) with high resolution (1920x1080).

-r 15 will reduce the framerate to 15 frame per second. 15 fps is recommended as it has little different to human eyes

-s 640x360 is to re-scale 1920x1080 to 640x360. This will retain the aspect ratio of 16:9

No comments:

Post a Comment

Windows 7 - STOP 0x0000007B (0xFFFFF880009A97E8 0xFFFFFFFFC0000034 0x0000000000 0x0000000000)

If you encounter STOP 0x0000007B (0xFFFFF880009A97E8 0xFFFFFFFFC0000034 0x0000000000 0x0000000000) blue screen of death. This is very like...