Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Audio encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 19th August 2020, 16:52   #1  |  Link
d3crypti0n
Registered User
 
Join Date: Aug 2020
Posts: 17
Changing Audio FPS

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
d3crypti0n is offline   Reply With Quote
Old 19th August 2020, 16:59   #2  |  Link
Cary Knoop
Cary Knoop
 
Cary Knoop's Avatar
 
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 397
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.

Last edited by Cary Knoop; 19th August 2020 at 17:01.
Cary Knoop is offline   Reply With Quote
Old 19th August 2020, 21:09   #3  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,436
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.
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 19th August 2020 at 21:14.
tebasuna51 is offline   Reply With Quote
Old 19th August 2020, 22:55   #4  |  Link
d3crypti0n
Registered User
 
Join Date: Aug 2020
Posts: 17
So after all there is no way to do this losslessly (no re-encode and no changing the pitch) ?
d3crypti0n is offline   Reply With Quote
Old 20th August 2020, 07:42   #5  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,610
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.
hello_hello is offline   Reply With Quote
Old 20th August 2020, 08:41   #6  |  Link
d3crypti0n
Registered User
 
Join Date: Aug 2020
Posts: 17
I know that they will be sync as I've tested it with re-encoding. Thank you then for your help.
d3crypti0n is offline   Reply With Quote
Reply

Tags
ac-3, bitrate, container, eac3, eac3to

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:51.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.