I'm trying to double the speed of a video.
I use the commands:
ffmpeg -i output.mp4 -filter:v "setpts=0.5*PTS" output2.mp4
and
ffmpeg -i output.mp4 -vf "setpts=0.5*PTS" output3.mp4
which I find all over the internet as being the standard method.
However, all my files are the same length:
joe@joe-Amd-Am4-Home-Office:~$ for file in *.mp4; do duration=$(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "$file"); echo "$file: $duration seconds"; done
output2.mp4: 373.014000 seconds
output3.mp4: 373.014000 seconds
output.mp4: 373.014000 seconds
What's going on and how do I properly speed up the video? I'm using ubuntu.
setptscould be described as non-destructive, whileatempodefinitely transcodes the audio (stretch/pitch-shift). They are very different operations, which also explains why they take "inverse" numbers. They just happen to be used simultaneously in this case... so I'd say the filtergraph doesn't need a rewrite ;) – kubi Jul 12 '23 at 09:05