Speedup a video x2 using ffmpeg
✓ Published0🌍 Public
CChristosT
Last edited Apr 29, 2019
Created on Apr 29, 2019
This example demonstrates a shell script that doubles the playback speed of a video file using ffmpeg. It shows how the ffmpeg command-line tool manipulates video timing through the `setpts` filter, which adjusts presentation timestamps by multiplying them by 0.5. The script takes a filename as input, extracts the file extension, and constructs a new output filename with an `_x2` suffix. It uses bash scripting with `set -u` and `set -e` for error handling, and relies on standard shell utilities like `basename` and parameter expansion to process the filename.
AI-generated description