If you want to create Boomerang with FFmpeg command then you can use below command to use.

Single command to create boomerang video

ffmpeg -y -i input.mp4 -filter_complex [0]reverse[1];[0][1]concat=n=2,setpts=0.5*PTS output/boomerrang.mp4
where
setpts=0.5*PTS : This is for fast video.
[0]reverse[1]  : this is for reversing the input video

Still if you need to do with mp4 Parser then we can do with below library.

 
Library Link : https://github.com/yellowcath/VideoProcessor
 
Use : Android’s native MediaCodec to achieve video compression, editing, mixing, fast and slow playback and reverse streaming (fast and slow playback and backwards support audio synchronization changes), better than FFmpeg on mobile phones supporting MediaCodec Small size: compiled aar only 262K, ffmpeg a so7, 8M, almost half the size after streamlining Fast: Compressed on huaweiP9 (1080P 20s 20000k -> 720p 2000k)

You may also like

Leave a Reply