Video compression on Android devices

Only devices with Android 4.1+ are able to do video compression in Telegram. It is related with the resolution of the video that is sent too. It has to be bigger than 640px in width or height. It's disabled for some devices too because some Androids (4.1 and 4.2) don't have a public API for video encoding.

  • Audio codec = mp4a
  • Video codec = supported by the device
  • Any side of the video more than 640px
  • Or if a side is less than 640px but video codec is h264
  • Any side of the video over 640px
  • Audio codec = mp4a
  • Video codec = h264
  • A video encoder _different_ than:
    • OMX.google.h264.encoder
    • OMX.ST.VFM.H264Enc
    • OMX.Exynos.avc.enc
    • OMX.MARVELL.VIDEO.HW.CODA7542ENCODER
    • OMX.MARVELL.VIDEO.H264ENCODER

compressionerror.jpg

Happens on Android 4.3 and older devices. It's an Android problem, which means that the device vendor didn't pass CTS and released the device without checking. On 4.3+ it can't be fixed by the Telegram Android developer anymore because on these Android versions Telegram is using only the Android API for conversion.