i am use to FFmpeg library in android for reverse video. I can dump images from video but how to reverse all images and make video. See this link that from i am use to library in my gradle.. Library is compile 'com.github.hiteshsondhi88.libffmpeg:FFmpegAndroid:0.2.5' i can use some of command and some are not. i use command as like below

-i /storage/emulated/0/ffvid/frameCount.mp4 -an -qscale 1 /storage/emulated/0/ffimg/revi%06d.jpg

above command use for dump images from video. i can't use command as liki $ffmpeg , $sox and $cat

i have referred many link but not success in see below some links...



So please help me and give me solution. if other library available then suggest me. thanks advance

  • 3
    It is discouraged crosspost the same question to multiple Stack Exchange sites. – llogan Feb 22 '16 at 17:20

ffmpeg has a reverse filter.

For video only:

ffmpeg -i /storage/emulated/0/ffvid/frameCount.mp4 -vf reverse reversed.mp4

For audio and video:

ffmpeg -i /storage/emulated/0/ffvid/frameCount.mp4 -vf reverse -af areverse reversed.mp4

This filter buffers the entire clip. For larger files, segment the file, reverse each segment and then concat the reversed segments.

  • No such filter: 'reverse' getting error – Ravi Vaghela Feb 24 '16 at 9:19
  • Looks like you're using Oct 2014 or older build. You need a build from the last 6 months. The more recent, the better. – Gyan Feb 24 '16 at 9:35
  • writingminds.github.io/ffmpeg-android-java i am using that – Ravi Vaghela Feb 24 '16 at 9:57
  • have you any latest version for android or correct way to configure it. – Ravi Vaghela Feb 24 '16 at 9:58
  • Is it possible to use audio and video copy parameter, so the reverse could be done quicker (without re-encoding)? now it takes minutes till ffmpeg completes the operation for a 4 minute video. while adding -vcodec copy it errors: Filtering and streamcopy cannot be used together. Yes, I've read this - superuser.com/questions/565205/… but was interested if something can be done diferently with REVERSE. – T.Todua Apr 14 '18 at 12:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.