TransWikia.com

How to use FFmpeg Command for Reverse Video?

Video Production Asked by Ravi Vaghela on November 11, 2021

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…

https://unix.stackexchange.com/questions/214327/how-can-i-reverse-a-video-clip

http://jiaxihu.blogspot.in/2012/05/reverse-video-clip-with-ffmpeg.html

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

One Answer

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!

Answered by Gyan on November 11, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP