Skip to content

User Manual: Video Compression

hihain edited this page Aug 23, 2020 · 1 revision

Video Compression / Sending Videos

Most (Telegram) messengers can only send videos uncompressed by sending them as a file. Unigram is different! By default, the video is send untouched as most videos are already optimized (perfect bitrate for the resolution and content) and it is almost impossible to decrease the file size any further. Read on to find out why.

Compression profiles

Unigram contains preset profiles for different resolutions:

  1. 240p - (maximum size: 432px)
  2. 360p - (maximum size: 640px)
  3. 480p - (maximum size: 848px)
  4. 720p - HD ready - (maximum size: 1280px)
  5. 1080p - FHD - (maximum size: 1920px)
  6. UHD - (maximum size: 3840px)
  7. 4k - (maximum size: 4096px)
  8. It seems to be impossible to transcode higher resolutions on current Windows Mobile hardware.

Preview of New Video Size

Moving the slider to preview the different video options changes the text of the video resolution. The new resolution depends on the original video size / ratio.

The new file size is estimated using the following formula: File size = bitrate * video length in seconds / 8 / 1000

The resolution has no influence on the video file size. The bitrate (bits per second) is the key indicator. Every profile has for each resolution a different default bitrate resulting in different file sizes. Depending on the bitrate the video has more or less artifacts. A rule of thumb: A higher resolution needs a higher bitrate to have less artifacts. The higher the bitrate, the higher the video file size.

Why does the File Size does not change for different Resolutions?

This might be the case if the video to send is already optimized. As the resolution has no impact on the file size, the file size is the same for different profiles if they all use the same bitrate.

Unigram Mobile uses the smallest possible bitrate. If the original video has a lower bitrate than the profile, the original bitrate is used.

Hint: If the estimated file size stays the same for the different resolutions, the actual file size will too. The actual and estimated file size usually differ more or less, depending on the video content.

Why is my Original Video Smaller?

Unigram uses for its different video profile settings well tested bitrates that results in good results for most videos. If your video is already optimized, it may not make sense to change the video settings, but sent it untouched.

The best way to decrease the file size is to decrease the bitrate. A rule of thumb: A lower resolution needs a lower bitrate. Videos with a lot of details and movement need a higher bitrate than videos with little movement and few details in order to prevent compression artifacts. Nowadays, software might optimize the video files size by choosing a bitrate on the video content or good guesses trying not to impact the enjoyment of the human viewer too much. Unigram Mobile does not have such optimization features as the typical Windows Mobile hardware is not very powerful.

Two reasons why a by Unigram transcoded video might be bigger than the original:

  1. Unigram Mobile uses the mentioned profiles, calculating a new (smaller) video resolution and picking either the default bitrate for that resolution or the original bitrate of the video. The smaller bitrate is chosen. Unigram assumes that the original video is already optimized, if its bitrate is lower than the default for that resolution. The file size should not increase just because of a higher bitrate without a gain in quality.

  2. Unigram Mobile uses the Windows.Media.Transcoding API to transcode video files. It may be less efficient than the transcoder of your original video, resulting in a larger file.

Clone this wiki locally