How to fix: Twitter video error: “Your media file could not be processed”

Possible cause and solution to the problem:

Is the video too long?
Twitter maximum file length is 2:20, two minutes and twenty seconds.

Is the file too large?
Twitter maximum file size

Size: 512MB
Maximum resolution:
Resolution: 1920 x 1200 or vice versa
Format: MP4 in H264 format

Working file sample:

Format: MPEG-4
Format: AVC
Bit rate : 2000 kb/s
Width: 1920 pixels
Height: 1080 pixels

Format : AAC LC
Bit rate : 192 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 44.1 kHz
Frame rate : 29 FPS

File size 200 MB