View Full Version : Changing Audio FPS
d3crypti0n
19th August 2020, 16:52
Hello Everybody,
I have two .mkv containers from an english tv show - one which is recorded in 23.976 FPS with original english E-AC-3 Audio and one dubbed german version in 25 FPS with AC-3 Audio. Now I want to put the german audio into the english video stream in order to have synched bilingual container without any re-encoding.
But while doing so I’ve encountered some problems. I first tried to change the overall FPS using MKVToolNix but this only resulted in a changed Video Speed. The Audio was not affected. I also tried eac3to but it totally changed the sample rate from 448 to 640 kb/s.
Is there a way to speedup the English audio OR slowdown the german audio without re-encoding ?
Greetings
Cary Knoop
19th August 2020, 16:59
I would demux the video from the audio stream and resample the German sound to match the English speed (or the other way around).
There are two options with pros and cons, you can resample and have the pitch be slightly lower or resample maintaining pitch with a slight quality degradation.
A good and open-source tool to resample the audio is sox.
http://sox.sourceforge.net/
After the resampling you mux the audio and the video and that's all she wrote.
tebasuna51
19th August 2020, 21:09
Audio don't have FramesPerSecond then you can't change the FPS to the audio.
Maybe you need change the duration of the audio. What is the duration of both mkv's?
If is the same maybe you don't need recode the audio.
If is different seems you need recode the audio.
With eac3to you can slowdown the german audio and encode it to the desired bitrate (not sample rate)
eac3to german.ac3 output.ac3 -slowdown -448
Or you can use ffmpeg, equivalent to eac3to changing the pitch (and supossing the samplerate is 48000):
ffmpeg -drc_scale 0 -i "german.ac3" -af "aresample=50050, asetrate=48000" -acodec ac3 -center_mixlev 0.707 -ab 448k "output.ac3"
Or, if you want preserve the pitch:
ffmpeg -drc_scale 0 -i "german.ac3" -af "atempo=0.959041" -acodec ac3 -center_mixlev 0.707 -ab 448k "output.ac3"
@Cary Knoop
With sox you need decode to wav and after recode to ac3, ffmpeg can do all at same time, and I think use the same 'tempo' routines than sox.
d3crypti0n
19th August 2020, 22:55
So after all there is no way to do this losslessly (no re-encode and no changing the pitch) ?
hello_hello
20th August 2020, 07:42
There's no way to do it losslessly. You have to re-encode. There's also no guarantee the two versions of the video are the same. Aside from the different frame rates, it's possible they're edited differently, so all you can do is slow the audio down to see if it'll match the other video.
One way to check might be to add the German audio to the English video, and change the frame rate of the English video to 25fps while remuxing. That should indicate whether they'll sync when you do it the other way around.... keeping the English video at 23.976 fps while re-encoding the German audio to slow it down.
d3crypti0n
20th August 2020, 08:41
I know that they will be sync as I've tested it with re-encoding. Thank you then for your help.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.