How to cut and publish a video for WhatsApp

I have a camcorder which records videos to .MTS files. These are huge files – 400 MB for 3 min of video.

WhatsApp will not support such big files.

Cutting the video losslessly

An application cold LosslessCut can be used to cut the video:

Using LosslessCut you can trim away any unnecessary portions at the beginning and end of the video. It is also super-fast, as it does not re-encode the video (it cuts the stream and adjusts the timestamps).

Exporting to a format WhatsApp supports

WhatsApp supports MP4 files, which use H264 (for video) and AAC (for audio) internally.

Using ffmpeg you can reencode this on the Windows command line like this:

ffmpeg\bin\ffmpeg.exe -i "d1-step2.mkv" -vf scale=1280:-1 -vcodec libx264 -acodec aac "d1-final.mp4"

provided that ffmpeg is located in a subdirectory ffmpeg/bin/ffmpeg.exe from the current path (where the video is).

This command also resizes the video to 1280×720 (HD) to reduce the size further.

The result is a 30.6 MB file in my case. Re-encoding is quite fast, taking less than 5 minutes for a 3 min video run length.

Although the official WhatsApp page claims that only up to 16 MB can be uploaded, I was able to upload a video with about 40 MB in a test, and they were received by my test partner. (Android mobiles in both cases). I have read somewhere that the limit is 64 MB. YMMV.

Leave a Comment

Your email address will not be published. Required fields are marked *