wader / static-ffmpeg

Multi-arch docker image with ffmpeg/ffprobe binaries built as hardened static PIE binaries with no external dependencies
https://hub.docker.com/r/mwader/static-ffmpeg/
MIT License
255 stars 62 forks source link

Suggestion: using UPX to pack binaries #379

Closed mathieu-aubin closed 5 months ago

mathieu-aubin commented 9 months ago

using UPX greatly reduces filesizes, without issues so far (at least with ffprobe and the few months i've been trying...) upx -v --ultra-brute --preserve-build-id --best --8086 --8mib-ram ffprobe is the command i use.

97573416 ->  25757873   26.40%   linux/amd64   ffprobe
Packed 1 file.

as per this asciicast

feel free to discard

wader commented 9 months ago

Hey, quiet impressive yes :) the image currently for 6.1 is ~70MB per architecture it seems, so i guess ffprobe is roughly about 35MB compressed at the moment, quite a difference still.

Do you know if it affects start up time better/worse? searched a bit about issues using it, and i guess the most undesirable effect seems to be that multiple processes will not be able to share file mapped pages any more.

Hmm i'm still a bit reluctant because of things like that, the rule of least surprise :) I guess one way would be to have a -upx variant of the image if ppl are concerned about size, but then again if i was concerned about size i would probably build a custom image with lots of features and libraries disabled. Maybe something like #216 could be helpful for that?

btw is download size or size on disk the most concern?

wader commented 5 months ago

Some spring cleaning and not sure this will happen