I saw many posts on internet about how to decrease FFmpeg/FFprobe lib size in Android. Also I've investigated on this topic about a few months. So I decided to share my conclusions. I'm not talking about compile time settings and disable/enabling features. Of course you can do this to get better result but this post is not about that. It's about archiving FFmpeg/FFprobe compiled files which will reduce your library size by 85% .
Reducing app size by archiving ffmpeg/ffprobe library in Android
3.1k Views Asked by S.R At
2
There are 2 best solutions below
Related Questions in ANDROID
- Creating global Class holder
- Flutter + Dart: Editing name of a tab shows up a black screen
- android-pdf-viewer Received status code 401 from server: Unauthorized
- Sdk 34 WRITE_EXTERNAL_STORAGE not working
- ussd reader in Recket Native module
- Incorrect display of LinearGradientBrush in IOS
- The Binary Version Of its metadata is 1.8.0, expected Version is 1.6.0 build error
- I can't make TextInput to auto expand properly in Android
- Creating multiple instances of a class with different initializing values in Flutter
- How to create a lottie animation
- making android analyze with coverity sast tool
- Flutter plugin development android src not opening after opening example
- I initialize my ViewModel in the Activity with several fragments as tabs, but the fragments(tabs) return null for the updated livedata
- Node.js Server + Socket.IO + Android Mobile Applicatoin XHR Polling Error...?
- How I can use the shared preferences class?
Related Questions in FFMPEG
- I need an azure product that executes my intensive ffmpeg command then dies, and i only get charged for the delta. Any Tips?
- Converting MP3/MP4 to WAV in the Frontend Using ffmpegwasm with Next.js Results in Module Not Found Error
- Get remote MKV file metadata using nodejs
- After using ffmpeg to remove some streams in mkv file, it takes much longer to open the media file in potplayer in Windows
- Implementing trim and fade filters with ffmpeg - MP3
- Merge Azure mp4 blobs via API (Preferred Azure)
- Overlaying frame number with ffmpeg
- Merge (concat) all video file present in '43. DP (Part1)' and put it into '43. DP (Part1)' and give name merged (concat) file to folder name
- I get an error when republishing the image I shot with ros2 run ffmpeg
- libav audio latency / cannot set audio_buffer_size
- An error occurred after encoding with h264_nvenc
- ffmpeg - excerpt from a large video file, preserving its additional streams
- Babel Loader error when using ffmpeg.wasm in CRA react app
- define the input FPS of a stream using ffmpeg-python
- NodeJS stream MKV as MP4 video
Related Questions in ANDROID-FFMPEG
- I am trying to compress video in Android using ffmpeg
- Burn subtitles with emojis on a video in android java
- Video file of mpeg format playing only sound in Exoplayer
- FFmpeg java.lang.UnsatisfiedLinkError dlopen failed: library "libavutil.so" not found in Vivo model device
- closed (H264 track 1 is not valid: sprop-parameter-sets is missing (96 packetization-mode=1)
- ffmpeg-kit android: how to use -f concat -i input.txt with multiple file uris?
- Applying audio to video background using ffmpeg_kit_flutter package not working in flutter
- How to enable mediacodec encoding using ffmpeg?
- windows-x86_64/bin/clang is unable to create an executable file. C compiler test failed
- Render video from Raw image in Unity
- How to save srt file with a video to be part of the video?
- FFMPEG: How to add transparency to watermark logo? Getting error: "Filter scale2ref has an unconnected output"
- İncluding .so files in Android.mk builds
- FFmpeg Android Errors
- Android 11 : FFmpeg binary not found error
Related Questions in FFPROBE
- Use `ffprobe` to display subtitle content like the `cat` command
- DVBSubtitles/Teletext Descriptors of a stream (ts-file)
- Issue with ffprobe execution within Docker Environment
- Find "Bit depth" from mediaInfo but with ffprobe?
- ffprobe different results video duration using pipe and reading a file from the file system
- FileNotFoundError: [Errno 2] No such file or directory: 'ffprobe' when trying audio = AudioSegment.from_file()
- How to define ffprobe on node.js
- how to get audio fromat name using nodeJS and ffProbeData
- ffmpeg/ffprobe input as buffer stream, get an error always
- How to embed ffmpeg and ffprobe to a python gui.exe file in Windows or Mac?
- ffprobe seems to have strange tag outputs
- Use C# and FFProbe to get bit rate of a video but it returns null for some reason
- Node 18 or Node 20 break ffmpeg (in google cloud functions -> ffprobe was killed with signal SIGSEGV)
- Extract all frames timestamps
- Using NodeJS ReadStream or Buffer with ffmpeg and ffprobe hangs
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Based on FFMpeg/FFprobe compiled for Android
1. Compress asset files
(ffmpeg && ffprobe)to any archive format, and replace with current files.2. With some extra code, copy archive file in app directory with
asynctask,3. Extract archive with this library (Also supports
rararchive).Result: 79.8MB ==> 13.2MB
Extraction time: 1 Second (Honor 8 Lite API 25/26.).
Without Compression
With Compression
I'm using this settings for compression:
Windows 10 64bit,
7-ZipApplication,.7zArchive format,Ultracompression level,LZMA2compression method.You can try other compression methods and archive formats to test different results.
Required codes to copy/extract archive to app directory:
Add this to anywhere you want to initialize copy process (I would prefer inside
onCreateofApplicationclass).Above method will process this functions:
copy archive from asset to app directory.
check CPU arch model.
extract archive based on CPU model.
delete archive after extraction.
make file executable.
return true/false if device supports ffmpeg or not.
full code:
add to build.gradle :
FFmpegArchiveUtil.java