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 video filter and reverse audio 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. Remember that you have to concat the reversed segments in the reverse order!

  • No such filter: 'reverse' getting error Feb 24 '16 at 9:19
  • 3
    This method consumes too much memory. How can I segment the file?
    – bukkojot
    Apr 20 '18 at 20:10
  • 1
    @Gyan please add the code for segment muxer code. May 27 '19 at 10:08
  • 1
    I am surprised this cannot be done without encoding.
    – bonobo
    Dec 31 '20 at 12:47
  • 2
    @bonobo Video encoding is usually asymmetric / unidirectional. To reduce size, it describes how to transition from frame 1 to frame 2, but not the other way around. Feb 25 '21 at 9:06

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.