boram
boram copied to clipboard
Set framerate (change video speed)
Hi! I have a habit of watching a lot of YouTube videos on 2x speed, and I've built myself a pipeline using youtube-dl & ffmpeg to download offline copies of videos, and re-encode them to save file size AND turn 24fps content into 48 fps content by playing it back twice as fast. Here's the filter chain I use:
-filter_complex "[0:v]subtitles='subtitles.vtt':force_style='FontName=Roboto',setpts=0.5*PTS[v];[0:a]atempo=2.0[a]" -map "[v]" -map "[a]"
Would it be possible to add a slider (or even a checkbox) to add the setpts & atempo filters to my filter change in boram? Thank you!
Seems like a lot of users request this feature.
As a workaround, if FPS of your video is 24:
- To speedup 2 times:
-vf "setpts=PTS/2" -r 48
- To slowdown 2 times:
-vf "minterpolate=48,setpts=PTS*2"
- To slowdown 2 times without interpolation:
-vf "setpts=PTS*2" -r 12
If you're cutting some fragment you need to specify the duration with -t
option as well (two times lower for speedup or bigger for slowdown respectfully).