-1

I am trying to convert video file in slow motion or fast forward motion, just like snapchat. Tried mediacodec but didn't worked. Can anyone tell me if there is any 3rd party library or something to accomplish my task. Any help is highly appreciated.

1 Answers1

0

You can use ffmpeg library for this

To double the speed of the video, you can use

ffmpeg -i input.mkv -filter:v "setpts=0.5*PTS" output.mkv

To slow down your video, you can use this comand

ffmpeg -i input.mkv -filter:v "setpts=2.0*PTS" output.mkv

For more details look into this link https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video

Rohan Sharma
  • 374
  • 4
  • 11