Mobile Development 10 min read

Optimizing GIF Usage in Information Flow: Converting GIF to MP4 and SharpP Evaluation

To address the slow loading and high bandwidth costs of GIFs in short‑content feeds, the team evaluated APNG, WebP, SharpP, and MP4, found MP4 video conversion offers the best compression, universal support and comparable CPU usage, achieving a 62% size reduction, 90% instant‑open rate and a 5.6% exposure boost.

Tencent Cloud Developer
Tencent Cloud Developer
Tencent Cloud Developer
Optimizing GIF Usage in Information Flow: Converting GIF to MP4 and SharpP Evaluation

In information‑flow scenarios, GIFs are widely used but suffer from large file sizes, slow loading on weak networks, and high bandwidth consumption. This article presents a comprehensive solution that replaces GIFs with more efficient formats, focusing on a case study from Tencent’s short‑content platform.

Problem background

Short‑content feeds (similar to micro‑blog posts) contain many GIFs. Under poor network conditions, GIF loading can exceed 10 seconds, and over half of the GIF files are larger than 1 MB, with about half taking more than 1 second to load. This creates a poor user experience and increases bandwidth costs.

Data collection

Statistics on GIF size and load time were gathered. The results showed that >50% of GIFs exceed 1 MB and >50% take >1 s to load, with a long tail of users waiting tens of seconds.

Alternative animated‑image technologies

Four alternatives were evaluated:

APNG – PNG‑based, supports 8‑bit alpha, better quality but limited browser support.

WebP – Google’s format with lossy and lossless compression, supports animation, adopted by some apps.

SharpP – Tencent’s proprietary format built on HEVC, supported on Windows, Linux, Android, iOS, and X5 browser.

MP4 video – converting GIF to MP4 (H.264/H.265) as used by Facebook and Twitter.

Comparison of compression ratios

Test conversions of a sample GIF to APNG, WebP (quality 85), SharpP (two levels), and MP4 (H.264, H.265) showed that APNG and WebP have far lower compression than SharpP and MP4.

CPU usage test

On Android, playback CPU usage was measured for SharpP and MP4. SharpP stayed stable at 7‑9% CPU, while MP4 showed a brief initial spike due to link opening, then dropped to a similar level. Overall CPU impact is comparable.

Feature comparison table

Feature

SharpP

H264

H265

Encoding speed ratio

10

3

140

Alpha channel support

Supported

Not supported

Not supported

Universality

Third‑party platforms (browsers) not compatible

Universal

Universal

Hardware decode support

Not supported

Generally supported

Partial device support

Video formats win on universality and hardware decode, and they allow progressive download‑while‑play, reducing development effort compared to SharpP.

Final decision

Considering compression, compatibility, and development cost, the team chose MP4 video as the primary replacement for GIFs in the short‑content flow.

Optimization results

After deployment, the following improvements were observed:

File size reduced by 62%.

“Instant‑open” rate (loading within 1 s) increased from 50% to 90%.

User waiting time decreased by 75%.

AB‑testing also showed a 5.62% increase in short‑content exposure, indicating business impact.

Limitations

Not all GIF scenarios are suitable for video conversion; in cases with many simultaneous GIFs, formats like GIF or WebP may still be preferable due to lower CPU overhead.

Conclusion

Converting GIFs to video (MP4) is an effective, widely applicable technique that improves user experience, saves bandwidth, and drives business metrics. Future developments such as H.266 may further enhance this approach.

mobile performanceImage Formatsbandwidth reductionGIF optimizationMP4 conversionSharpP
Tencent Cloud Developer
Written by

Tencent Cloud Developer

Official Tencent Cloud community account that brings together developers, shares practical tech insights, and fosters an influential tech exchange community.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.