Modify sound speed

Problem

The playing speed of a sound should be changed from 24 fps as used in cinema to 25 fps as used by “European” television, while keeping the correct pitch.

Solution

ffmpeg \
    -i input_file \
    -filter:a "atempo=25/24" \
    output_file

General command

ffmpeg \
    -i input_file \
    -filter:a "atempo=output_fps/input_fps" \
    output_file

Command syntax

ffmpeg
starts the command
-i input_file
path, name and extension of the input file
-filter:a "atempo=output_fps/input_fps"
modifies sound speed while keeping the same sound pitch
output_file
path, name and extension of the output file

Discussion

In sound cinema the projection speed is 24 fps (frames per second) and the “European” television has 25 fps. The correct filtering allows to keep the original sound pitch in both world.

The sound filter is specified by -filter:a. We advise to avoid the alias -afilter and its abbreviation -af as well. The sound filter atempo is used. The numerator output_fps sets the output speed and the denominator input_fps sets the input speed; both values are given in frames per second. The quotation marks are not mandatory.


2020-07-15