

You can smooth out slow/fast video with the minterpolate video filter. To slow down your video, you have to use a multiplier greater than 1:įfmpeg -i input.mkv -filter:v "setpts=2.0*PTS" output.mkv For example, to go from an input of 4 FPS to one that is sped up to 4x that (16 FPS):įfmpeg -i input.mkv -r 16 -filter:v "setpts=0.25*PTS" output.mkv You can avoid dropped frames by specifying a higher output frame rate than the input. Note that this method will drop frames to achieve the desired speed. For example, if there are two succesive frames shown at timestamps 1 and 2, and you want to speed up the video, those timestamps need to become 0.5 and 1, respectively.

The filter works by changing the presentation timestamp (PTS) of each video frame. To double the speed of the video with the setpts filter, you can use:įfmpeg -i input.mkv -filter:v "setpts=0.5*PTS" output.mkv

Then generate new timestamps while muxing to a container:įfmpeg -fflags +genpts -r 30 -i raw.h264 -c:v copy output.mp4Ĭhange the value of -r to the desired playback frame rate. Use this if you require no other changes to your input video.įirst, copy the video to a raw bitstream format.įfmpeg -i input.mp4 -map 0:v -c:v copy -bsf:v h264_mp4toannexb raw.h264įfmpeg -i input.mp4 -map 0:v -c:v copy -bsf:v hevc_mp4toannexb raw.h265 This method is lossless and apart from changing the timestamps, copies the video stream as-is. Note that in the following examples, the audio stream is not changed, so it should ideally be disabled with -an. This can be done via two methods: using the setpts video filter (which requires re-encoding) or by erasing the timestamps by exporting the video to a raw bitstream format and muxing to a container while creating new timestamps. Good luck and let me know what you find out.The speed of a video stream can be changed by changing the presentation timestamp (PTS) of each video frame. Might be a good idea to comment on the YouTube video, that way this discussion can be seen by others and maybe help someone else stuck in your scenario.
#AVIDEMUX SLOW MOTION FREE#
If you have any other questions, feel free to ask. I had a lot of requests for a tutorial for years and finally got around to creating one. It's not ideal and it's slow going but it's a good way to get introduced into datamoshing before getting into Python or Ruby scripts.I rarely use it these days but most of my early datamosh videos on my YouTube channel were made using Avidemux. Copy more frames and save as "copy 3", then open "copy 3" back into Avidemux.so on and so forth. So, if you want to copy more, you will have to save the video as "copy 2" for example, then open "copy 2" up in Avidemux and proceed from there. I think around 40 frames is about what I can get before the program crashes. That way you can prevent crashing in the future. If you're copying a single frame, try to keep track of how many times you copy it before it crashes. It's annoying for sure, but patience is definitely required.
#AVIDEMUX SLOW MOTION MAC#
Also, are you on Mac or Windows?ĭoes it crash when you are copying or when you save? As I mentioned in the tutorial, it is common for this program to crash if you copy a lot in one go or try to do a lot at once. Which version of Avidemux are you using? I believe older versions like 2.5.6 (the one I used for the tutorial) have less problems.
