Open ColorfulRhino opened 2 months ago
We recently added the ability to remove metadata from some documents and videos that need some bigger dependencies. Do you see any way to make the builds smaller, @Rashxz?
Yes, the increase is comming from the ffmpeg library, Ill see how to reduce the binary size.
Thanks for clearing that up! I'm sure there is some way. In my opinion (!) it's totally not worth it for one or two features to have a >1500% size increase.
I manage to build a new binary, new size per ABI is roughly 30 MB, universal APK is 40MB.
I manage to build a new binary, new size per ABI is roughly 30 MB, universal APK is 40MB.
That's an improvement 👍 Still quite an increase and too big for Izzy's repo, but well done regardless.
Yes, the increase is comming from the ffmpeg library, Ill see how to reduce the binary size.
I manage to build a new binary, new size per ABI is roughly 30 MB, universal APK is 40MB.
That's an improvement 👍 Still quite an increase and too big for Izzy's repo, but well done regardless.
Is it possible to get the same coverage by using using a different library, e.g., exiftool
? On my termux
, that's ¼ the installation size of ffmpeg
, but has a perl
dependency, so might come out even?
Yes, the increase is comming from the ffmpeg library, Ill see how to reduce the binary size.
I manage to build a new binary, new size per ABI is roughly 30 MB, universal APK is 40MB.
That's an improvement 👍 Still quite an increase and too big for Izzy's repo, but well done regardless.
Is it possible to get the same coverage by using using a different library, e.g.,
exiftool
? On mytermux
, that's ¼ the installation size offfmpeg
, but has aperl
dependency, so might come out even?
The size its not comming only from ffmpeg, but also from the apache-poi library. It indeed could be a reeplacement as it supports a wide range of formats, but it wont help reducing the app size.
Someone mentioned a already made port for android in this issue and that one weights about 40MB, so our current solution is still even / maybe lighter,
@Rashxz The thing about ffmpeg
(oh, did you see #117?) is that it's bit overkill for this project, since we don't need >90% of its capabilities here, & ffmpeg-kit
doesn't seem to allow for modular import of just the needed sections, so that's just frustrating bloat.
@Rashxz Wait, maybe 1 can decrease that bloat.… Did you see https://github.com/arthenica/ffmpeg-kit/wiki/How-to-Decrease-Binary-Size?
@Rashxz Wait, maybe 1 can decrease that bloat.… Did you see https://github.com/arthenica/ffmpeg-kit/wiki/How-to-Decrease-Binary-Size?
Yes, I build a new binary with everything stripped. As you can see in the Image, ffmpeg takes 6.9MB of the total size. The rest is coming from all the other dependencies, being the biggest ones apache poi (for libre office) and iText (for pdf).
I will take a look on the dependencies to see if theres room for improvement.
Yes, I build a new binary with everything stripped. As you can see in the Image, ffmpeg takes 6.9MB of the total size. The rest is coming from all the other dependencies, being the biggest ones apache poi (for libre office) and iText (for pdf).
@Rashxz I'm certain there's cheaper avenues to take for these. For pdf, may I suggest qpdf
or cpdf
as alternatives? I'll research for an alt for office docs, as well.
Yes, I build a new binary with everything stripped. As you can see in the Image, ffmpeg takes 6.9MB of the total size. The rest is coming from all the other dependencies, being the biggest ones apache poi (for libre office) and iText (for pdf).
I'll research for an alt for office docs, as well.
@Rashxz I wonder if a separate dedicated utility is actually needed for LO? Per https://superuser.com/questions/1195338/what-metadata-does-a-libreoffice-file-contain-and-how-to-remove-it, it's matter of "just" deleting 1 file & 2 lines out of another out of the doc (as LO docs are actually zip archives of a certain structure).
Yes, I build a new binary with everything stripped. As you can see in the Image, ffmpeg takes 6.9MB of the total size. The rest is coming from all the other dependencies, being the biggest ones apache poi (for libre office) and iText (for pdf).
@Rashxz I'm certain there's cheaper avenues to take for these. For pdf, may I suggest
qpdf
orcpdf
as alternatives? I'll research for an alt for office docs, as well.
Thanks
Yes, I build a new binary with everything stripped. As you can see in the Image, ffmpeg takes 6.9MB of the total size. The rest is coming from all the other dependencies, being the biggest ones apache poi (for libre office) and iText (for pdf).
I'll research for an alt for office docs, as well.
@Rashxz I wonder if a separate dedicated utility is actually needed for LO? Per https://superuser.com/questions/1195338/what-metadata-does-a-libreoffice-file-contain-and-how-to-remove-it, it's matter of "just" deleting 1 file & 2 lines out of another out of the doc (as LO docs are actually zip archives of a certain structure).
Sorry, I did not specify it well in my previous comment, that library is not just for LO but also for Microsoft office docs.
@Rashxz How did https://github.com/Crazy-Marvin/MetadataRemover/commit/6928c9e100fd96e332f2e88ea0ee897d2fe0913f effect APK/installed size?
@Rashxz How did 6928c9e effect APK/installed size?
I think its a ~2MB increase
IIUC, https://github.com/Crazy-Marvin/MetadataRemover/issues/104#issuecomment-2270767530 notes all this is blocked from landing in F-droid, so no way to see these improvements for such users.
Something is wrong with the latest apk. This has also been talked about here https://github.com/Crazy-Marvin/MetadataRemover/issues/34#issuecomment-2231929176.
Size comparison: v2.0.2: 9.29 MB v2.0.3: 151 MB
More than 15x increase (!). Something's wrong, maybe a debug build was accidentally published or some recent commit added some unneccessarily large library?