Trim/cut video file in android

Ravi Bhojani picture Ravi Bhojani · Jul 18, 2012 · Viewed 7.3k times · Source

I want to extract some portion of video when user is playing that video via my application. While playing a video user can give start and end duration to cut the video. so are there any way to cut the video based on duration and save to sd card ?

Answer

OriolJ picture OriolJ · Jun 17, 2013

You may try to compile and integrate ffmpeg into your project. I used ffmpeg to cut video and audio, is very fast, no recording needed. I've NO experience on doing it on android, but It should work. Here you have the official wiki page about ffmpeg on android:

https://ffmpeg.org/trac/ffmpeg/wiki/How%20to%20compile%20FFmpeg%20for%20Android