i am implementing an android app in kotlin that records a 15 seconds video using camera2 API and i want to compress it into a specific size . How can i figure it out ?
How to compress a video into a specific size in kotlin
302 views Asked by Patrick Renaud At
1
There are 1 answers
Related Questions in ANDROID-CAMERA2
- Camera2 how to detect focus on a metering area
- MAUI - Android Camera2 - How set Rotate and Crop in CaptureRequest
- Using Camera2 with physical lenses does not show all lenses on all phones
- Long initialization of USB camera when using Camera X
- Set up remote camera monitoring on Android OS without user input
- Saving Images as Ultra HDR (JPEG_R)
- CameraX custom OpenGL Video Pipeline (`UseCase`/`VideoOutput`)
- Manual white balance using Camera2 API on Google Pixel phones
- Android Camera 2 API , Focus Distance and EV Control query
- Understanding LENS_FOCUS_DISTANCE Accuracy and Calculation for Distance Measurement on Samsung S22
- Android FotoApparat library how to make the cameraView zoom how?
- Android - Camera2 tap to focus not working
- How can i perfectly Pass Processed frames to Display?
- Android - take a 200mp photo programmatically
- Android: Get native HardwareBuffer Format (ImageFormat.PRIVATE)
Related Questions in VIDEO-COMPRESSION
- The overall size of three images stitched together is greater than the sum of the individual images, why?
- How to process float32 arrays by video compression tools and get back float32 values? Video and image formats which natively supports float32 values
- how to reduce video file sizes for long term storage
- Flutter Web: How Do You Compress a Video?
- How can I optimize video reels in flutter
- Compression Artifacts using sws_Scale() AVFrame YUV420p-> openCV Mat BGR24 and back
- FFmpeg: What re-encoding settings can be used to achieve results similar to Google Drive's video processing?
- How to losslessly compress a sequence of slowly-changing images into a video?
- Is there a uncompressed, lossless udp or tcp streaming solution with gstreamer
- How to compress a video into a specific size in kotlin
- Video created with OpenCV python cannot be uploaded to Social Media Platforms
- How to compress the video before uploading to database using react native
- How can I compress videos in React Native
- Is it necessary to transmit predicted block of intra-prediction of H.264 or H.265 to decoder side?
- Gstreamer and hardware video encoding on tinkerboard
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?
Popular Tags
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)
This can be done using a library like
ffmpeg. An ffmpeg command like below would reduce the size significantly:ffmpeg -i input.mp4 -vcodec libx265 -crf 28 output.mp4where
input.mp4is your source video file andoutput.mp4would be the target. It re-encodes your video file withlibx265to haveH.265format. You can read more about it here: https://unix.stackexchange.com/questions/28803/how-can-i-reduce-a-videos-size-with-ffmpegOf course, to be able to use ffmpeg in android, you need to add it to your project. The most complete implementation I have seen so far is:
https://github.com/arthenica/ffmpeg-kit/tree/main/android
With the help of that library, you can execute aforementioned ffmpeg command.