View Full Version : Changing lenght but not pitch
tormento
1st October 2021, 11:21
I am used to ffmpeg -atempo to do some dvd to hd resync.
Now I have to change from 23.976 to 30 and the pitch is way too modified to be acceptable.
Any switch for ffmpeg to stretch an audio to have the correct lenght without changing the pitch?
tebasuna51
1st October 2021, 12:15
-atempo preserve the pitch, but the change 23.976 to 30 it's not allowed.
Don't exits any occasion than need this change, movies at 23.976 and 29.97 have different number of frames but the same length and must use the same audio without changes.
Any other situation was by a previous wrong manipulation or different sources and we can't recover the sync.
When you have different sources you can only use Audacity to insert/delete fragments.
hello_hello
2nd October 2021, 02:06
Now I have to change from 23.976 to 30 and the pitch is way too modified to be acceptable.
Yeah that's something you should never need/want to do. Plus it's quite a speed difference.
There's rubberband. This is my foobar2000 command line, modified for a 23.976 to 29.97 (or 24 to 30) conversion.
No pitch correction
-i - -ignore_length true -af "rubberband=tempo='5.0/4.0':pitch='5.0/4.0':channels=together" -c:a pcm_s24le %d
Pitch correction.
-i - -ignore_length true -af "rubberband=tempo='5.0/4.0':channels=together" -c:a pcm_s24le %d
If using ffmpeg tends to make you suicidal as it often does for me, you can do the same sort of thing with this Avisynth script. AudioSpeed (https://forum.videohelp.com/threads/384967-AudioSpeed-AudioMeter-AudioWave-scripts)
Then you can decode the video/audio, modify/edit either and check the result via the script output without having to re-encode.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.