How do I speed up video ffmpeg?
Changes video and audio speed together, which needs two filters because one alone desynchronises the file.
Changes video and audio speed together, which needs two filters because one alone desynchronises the file.
ffmpeg -i https://cdn.rendobar.com/assets/examples/sample.mp4 -filter_complex "[0:v]setpts=0.5*PTS[v];[0:a]atempo=2.0[a]" -map "[v]" -map "[a]" -t 5 out.mp4job_d3a1fc6095a549e3
The two factors are inverses of each other. Doubling speed is setpts=0.5*PTS for video and atempo=2.0 for audio. Getting them the same way round is the classic bug. atempo also caps at 2.0 per instance, so 4x needs atempo=2.0,atempo=2.0.
setpts speeds up the video only, and copying the audio leaves it at the original speed, so the two drift apart immediately.
ffmpeg -i https://cdn.rendobar.com/assets/examples/sample.mp4 -vf setpts=0.5*PTS -c:a copy -t 5 out.mp4It did not error. It produced 433.3 KB against the correct command's 413.6 KB, a 1.0x larger file. A pipeline would accept this silently.
job_df145596e5764e36
Changes video and audio speed together, which needs two filters because one alone desynchronises the file.
The two factors are inverses of each other. Doubling speed is setpts=0.5*PTS for video and atempo=2.0 for audio. Getting them the same way round is the classic bug. atempo also caps at 2.0 per instance, so 4x needs atempo=2.0,atempo=2.0.
We ran the naive version too. It did not error. It produced 433.3 KB against the correct command's 413.6 KB, a 1.0x larger file. A pipeline would accept this silently.
Not with Rendobar. The command on this page ran through the API against a URL, with no local FFmpeg and no server. The job id below it is the job that produced these numbers.
This exact command ran through the API against a URL.