Pooja Jadav
Pooja Jadav

Reputation: 309

How to change video speed only while adding a same-speed separated audio stream with ffmpeg?

I'm using ffmpeg for video filter.

But, When I changed video speed, that time I got issue

I want to set audio's length same as video's length.

In my case, shortest is not working. Video file and audio file, both are different and then after merging in a video file. Video's last frame stop and audio is continued working.

Upvotes: 3

Views: 12420

Answers (2)

T Hansda
T Hansda

Reputation: 141

You can use complex filters

ffmpeg -i input.mkv -filter_complex "[0:v]setpts=0.5*PTS[v];[0:a]atempo=2.0[a]" -map "[v]" -map "[a]" output.mkv

https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video

Upvotes: 5

Pooja Jadav
Pooja Jadav

Reputation: 309

Got it worked!!!

ffmpeg -filter_complex [0:v]setpts=0.5*PTS -i INPUT -i INPUT -filter_complex [1:a]apad -shortest -y -preset ultrafast OUTPUT 2>&1

Upvotes: 1

Related Questions