I don't want to use a player like vlc to speedup the playback. I want to actually speedup playback in the original file; I want the video to be played 2 times faster.
After doing some research on this I found that the following command line option works well with ffmpeg:
ffmpeg -i input.mp4 -filter_complex "[0:v]setpts=0.5*PTS[v];[0:a]atempo=2[a]" -map "[v]" -map "[a]" -c:v libx264 -c:a aac output.mp4
First install ffmpeg.
setptsis for video speed (.5 means twice as fast).
atempois for audio speed (2 means twice as fast).
The native FFmpeg AAC encoder used to be considered experimental, but this is no longer the case. If your ffmpeg is old, you will need to add
-strict experimentalto enable this encoder (the console output will mention this if you don't).
Control video quality and encoding speed with
-presetas described in FFmpeg Wiki: H.264 Video Encoding Guide. Or just use the defaults if it looks acceptable to you.
Control audio quality with
-b:aas described in FFmpeg Wiki: AAC Audio Encoding Guide.
Reference: FFmpeg Wiki: MP3 Audio Encoding Guide.
slowmoVideo is able to speed up and slow down video
slowmoVideo is an OpenSource program that creates slow-motion videos from your footage.
But it does not simply make your videos play at 0.01× speed. You can smoothly slow down and speed up your footage, optionally with motion blur.
How does slow motion work? slowmoVideo tries to find out where pixels move in the video (this information is called Optical Flow), and then uses this information to calculate the additional frames.
First download and install the program. When it is loaded go to File > New and select your video file.
With your video loaded draw you curves (by clicking on an empty area) to describe how the video should speed up and slow down.
When you have finished go to File > Render (Ctrl + R) and choose a directory to save your video
Kdenlive is a video editor for KDE that also can do it and even has a GUI.