Tutorial: Honey, I Shrunk GStreamer: Using Meson to Slim Down Dependencies
summary
Meson replaces typical autotools workflows to cross-compile GStreamer for Android using an Android NDK cross file and wrapdb subprojects, producing a minimal runtime by disabling plugins with --auto-features, installing only runtime files and stripping symbols with meson install --tag runtime and --strip, and switching to static linking (--default-library=static). A full feature build starts ~150 MB; pruning to needed plugins yields ~48 MB, stripping drops to ~11 MB, and static linking falls to ~5 MB (down to ~4 MB with extra options).
AI-written summary · about
chapters (13)
- 0:00Intro
- 1:30Compile a simple C/C++ project
- 3:35Build both shared and static libraries
- 4:33Cross compile for target device
- 8:17Any Meson project can be a subproject Application using libexample
- 10:17WrapDB to the rescue
- 11:24Dependencies goes wild...
- 13:38Build only needed features
- 19:26Install only runtime files
- 20:32Strip binaries
- 21:16Static build GStreamer
- 26:39Remove GVariant ABI
- 28:12Replace GLib unicode support
related talks
19mA journey to smaller apk size
33mPruning Your App- Good Practices for Reducing App Size
22mHow to Make Your App Lose Weight
49mEmbedded Linux Size Reduction Techniques
45mHas Your App Slimmed Down for Summer?
40mGenerating efficient apk by reducing size
41mShrink, Secure & Optimize Your App With R8
33mHoney, I shrunk your Ember app
