21

I am trying to use FFmpeg library in Android to reverse video. I can dump images from videos, but how can I reverse all images and make a new video?

I am using a library from here in my gradle. Library is compile 'com.github.hiteshsondhi88.libffmpeg:FFmpegAndroid:0.2.5'. I can use some of the commands but not all. I'm using this command to dump images from video:

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

I can't use the commands $ffmpeg , $sox and $cat

I have unsuccessfully tried following these suggestions:

What else can I try?

10
  • Do you mean $cat or cat?
    – mchid
    Feb 22, 2016 at 5:57
  • cat command i don't know which perfect i am android developer but i need help to make video in severe. and command use time i can't abale to add prefix in command as like ffpmeg ,sox and cat. Feb 22, 2016 at 6:00
  • 1
    It is discouraged to crosspost the same question to multiple Stack Exchange sites.
    – llogan
    Feb 22, 2016 at 17:21
  • 2
    I'm voting to close this question as off-topic because this is a crosspost
    – Fabby
    Feb 23, 2016 at 22:13
  • So are you running Ubuntu or Android then? And which version?
    – user364819
    Feb 24, 2016 at 11:15

1 Answer 1

30

It looks like it runs ffmpeg and so instead of this:

ffmpeg -i inputfile.mp4 -vf reverse reversed.mp4

and this:

ffmpeg -i inputfile.mp4 -vf reverse -af areverse reversed.mp4

Run this instead:

-i inputfile.mp4 -vf reverse reversed.mp4

and this:

-i inputfile.mp4 -vf reverse -af areverse reversed.mp4

https://video.stackexchange.com/a/17739

Thanks LordNeckbeard!

It looks like this only works for ffmpeg commands and so commands like cat won't work.

I didn't look at it too close but it looks like if you try to run cat you would really be running ffmpeg cat which does not exist.

You see, if you run -i input.mkv -an -qscale 1 %06d.jpg from a terminal, this does nothing but if you run ffmpeg -i input.mkv -an -qscale 1 %06d.jpg it does. This indicates that this application runs ffmpeg and allows you to add the option -i input.mkv -an -qscale 1 %06d.jpg to the ffmpeg command.

14
  • yes you are right but i need to use that that for want i can do via above link that i give in my question Feb 22, 2016 at 6:04
  • @RaviVGHL Okay, I see. It looks like you are running the ffmpeg command and everything you run is only run after ffmpeg so commands like cat won't work. If you want to run ffmpeg -i input.mkv -an -qscale 1 %06d.jpg you should run this instead -i input.mkv -an -qscale 1 %06d.jpg
    – mchid
    Feb 22, 2016 at 6:08
  • cat command not works as like that Feb 22, 2016 at 6:09
  • 2
    @mchid See this duplicate crosspost for one method (I've never tried it however).
    – llogan
    Feb 23, 2016 at 16:54
  • 5
    Warning: this method forces ffmpeg to load the entire video into memory and unless you have a 10 second clip or 32 GB of RAM, it isn't going to work. Oct 13, 2016 at 3:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .