IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Stretching audio track
Azevedo
post Nov 28 2010, 14:39
Post #1





Group: Members
Posts: 83
Joined: 3-November 08
Member No.: 61632



Hey everyone!

I got a movie which has an English audio track. I want to add to it another track.
The problem is the additional track I want to add is a few seconds shorter. (source FPS issue)

I tried audacity but I had no success on stretching those few seconds.

What program you would recommend do stretch the track length?

Thanks!
Go to the top of the page
+Quote Post
Azevedo
post Nov 28 2010, 17:29
Post #2





Group: Members
Posts: 83
Joined: 3-November 08
Member No.: 61632



In fact the audio track I want to add is in AAC format.
I tried mkvtoolnix stretch option but I never can get the exact stretcth factor (float number).
Go to the top of the page
+Quote Post
Kohlrabi
post Nov 28 2010, 17:39
Post #3





Group: Super Moderator
Posts: 1004
Joined: 12-March 05
From: Kiel, Germany
Member No.: 20561



SoX should be able to do that, check the speed and tempo options.
The speed factor is the ratio of your target video FPS to the FPS of the source from where you got the audio. As far as I gathered "speed" option changes both pitch and tempo (i.e. "no" (dep. on quality of the resampler) shifting of tones after speedup), while "tempo" alters just the tempo and keeps the pitch.

For example the frame rate of NTSC is 23.976 FPS, while PAL has 25 FPS, so the ratio in that case would be 23.976/25 = 0.9something.


--------------------
Audiophiles live in constant fear of jitter.
Go to the top of the page
+Quote Post
JapanAudio
post Nov 28 2010, 18:51
Post #4





Group: Members
Posts: 86
Joined: 3-November 10
Member No.: 85187



If its off sync you could simply adjust the audio delay for that track. But if its synced at the beginning and off sync at the end, then its probably because the audio has variable bit rate.
Go to the top of the page
+Quote Post
Ouroboros
post Nov 28 2010, 19:45
Post #5





Group: Members
Posts: 290
Joined: 30-May 08
From: UK
Member No.: 53927



QUOTE (JapanAudio @ Nov 28 2010, 17:51) *
If its off sync you could simply adjust the audio delay for that track. But if its synced at the beginning and off sync at the end, then its probably because the audio has variable bit rate.

Are you suggesting that VBR tracks play at a variable speed?
Go to the top of the page
+Quote Post
JapanAudio
post Nov 28 2010, 20:18
Post #6





Group: Members
Posts: 86
Joined: 3-November 10
Member No.: 85187



QUOTE (Ouroboros @ Nov 28 2010, 13:45) *
QUOTE (JapanAudio @ Nov 28 2010, 17:51) *
If its off sync you could simply adjust the audio delay for that track. But if its synced at the beginning and off sync at the end, then its probably because the audio has variable bit rate.

Are you suggesting that VBR tracks play at a variable speed?

No but its common to have sync issues with vbr audio in avi container. Actually i had two things in mind when i said that, out of sync audio at the end of a video could be when fps is incorrectly specified.
Go to the top of the page
+Quote Post
Azevedo
post Nov 28 2010, 20:26
Post #7





Group: Members
Posts: 83
Joined: 3-November 08
Member No.: 61632



Thanks everyone.

Just downloaded SOX.
As it have no gui and I'm a newbie, I will need some help on the -delay usage.
Will it work on AAC?

Actually is 4 minutes correction!!! (if it were just a few seconds i sure could use the delay option on mkv, but it isn't. It is a different source fps/framerate issue)

What command line options should i use to stretch this audio (2.0) in 4 minutes?

Thanks again!
Go to the top of the page
+Quote Post
JapanAudio
post Nov 28 2010, 20:48
Post #8





Group: Members
Posts: 86
Joined: 3-November 10
Member No.: 85187



What is the result when you simply add the audio without modification? If the 4 minutes missing are only the ending credits, for example, i don't see a problem with different length audio and video.

What part of the audio is missing, beginning or end?

EDIT: If you stretch the audio it will most likely cause sync problems. The video FPS doesn't affect the audio (unless it is incorrect), so for example you can convert a video from NTSC to PAL and still use the exact same audio file, because the frame rate doesn't affect the total length.

This post has been edited by JapanAudio: Nov 28 2010, 20:59
Go to the top of the page
+Quote Post
Azevedo
post Nov 28 2010, 21:35
Post #9





Group: Members
Posts: 83
Joined: 3-November 08
Member No.: 61632



At the beggining the audio goes synced (first few minutes). As the movie plays it loses sync: the audio is left behind.
Go to the top of the page
+Quote Post
JapanAudio
post Nov 28 2010, 21:40
Post #10





Group: Members
Posts: 86
Joined: 3-November 10
Member No.: 85187



QUOTE (Azevedo @ Nov 28 2010, 15:35) *
At the beggining the audio goes synced (first few minutes). As the movie plays it loses sync: the audio is left behind.

Is it actually 4 minutes off sync at the end or just a few seconds?
Go to the top of the page
+Quote Post
Azevedo
post Nov 28 2010, 23:01
Post #11





Group: Members
Posts: 83
Joined: 3-November 08
Member No.: 61632



4min advanced

need to stretch it +4min
Go to the top of the page
+Quote Post
JapanAudio
post Nov 28 2010, 23:12
Post #12





Group: Members
Posts: 86
Joined: 3-November 10
Member No.: 85187



QUOTE (Azevedo @ Nov 28 2010, 17:01) *
4min advanced

need to stretch it +4min

If the audio is ok at the beginning but 4 min in advance at the end, it means that somehow your muxer is stretching the audio to fit the video length.

Try adding 4 min silence at the end of your track to make it the same length as the original audio, then remux it. What mkv muxer are you using btw?
Go to the top of the page
+Quote Post
andy o
post Nov 29 2010, 10:34
Post #13





Group: Members
Posts: 1292
Joined: 14-April 09
Member No.: 68950



QUOTE (JapanAudio @ Nov 28 2010, 14:12) *
If the audio is ok at the beginning but 4 min in advance at the end, it means that somehow your muxer is stretching the audio to fit the video length.

?? If the audio is in advance at the end, how could it be getting stretched?

I think it's just a PAL/NTSC thing. He probably has the 23.976 fps movie, and wants to add a track that was demuxed/recorded from a PAL source.

To the OP, if the above is true, you need to watch out for the "PAL speedup" pitch. Most of the time 24 fps movies are just sped up to 25, and the audio gets a higher pitch. You might or might not have to correct that as well, that is, if it's an issue for you.
Go to the top of the page
+Quote Post
Brand
post Nov 29 2010, 10:47
Post #14





Group: Members
Posts: 316
Joined: 27-November 09
Member No.: 75355



+1 for the pitch thing. It's very common for pal movies to simply have higher pitch and be shorter. So try that instead of stretching, because stretching can audibly affect the sound quality if its used too much.
Go to the top of the page
+Quote Post
odyssey
post Nov 29 2010, 12:34
Post #15





Group: Members
Posts: 2296
Joined: 18-May 03
From: Denmark
Member No.: 6695



QUOTE (Brand @ Nov 29 2010, 10:47) *
because stretching can audibly affect the sound quality if its used too much.

So "can" pitching wink.gif

(So much that it REALLY bothers me to watch PAL DVD's - Thank god Blu-ray fixed this)


--------------------
Can't wait for a HD-AAC encoder :P
Go to the top of the page
+Quote Post
Brand
post Nov 29 2010, 15:34
Post #16





Group: Members
Posts: 316
Joined: 27-November 09
Member No.: 75355



Indeed. It's about choosing the lesser evil, which is eventually also subjective.
Go to the top of the page
+Quote Post
Kohlrabi
post Nov 29 2010, 15:45
Post #17





Group: Super Moderator
Posts: 1004
Joined: 12-March 05
From: Kiel, Germany
Member No.: 20561



QUOTE (andy o @ Nov 29 2010, 10:34) *
I think it's just a PAL/NTSC thing. He probably has the 23.976 fps movie, and wants to add a track that was demuxed/recorded from a PAL source.

To the OP, if the above is true, you need to watch out for the "PAL speedup" pitch. Most of the time 24 fps movies are just sped up to 25, and the audio gets a higher pitch. You might or might not have to correct that as well, that is, if it's an issue for you.

It's not like I said that 10 posts ago including the solution and was ignored all the time.

This post has been edited by Kohlrabi: Nov 29 2010, 15:52


--------------------
Audiophiles live in constant fear of jitter.
Go to the top of the page
+Quote Post
odyssey
post Nov 29 2010, 16:05
Post #18





Group: Members
Posts: 2296
Joined: 18-May 03
From: Denmark
Member No.: 6695



Well IMHO the easiest way to fix PAL speedup (or speeddown whatever is the issue) is using eac3to


--------------------
Can't wait for a HD-AAC encoder :P
Go to the top of the page
+Quote Post
andy o
post Nov 29 2010, 16:17
Post #19





Group: Members
Posts: 1292
Joined: 14-April 09
Member No.: 68950



Can it resample to fix the pitch though? I imagine most audio editors have this option, though I've never tried it.

btw, odyssey, have you tried ReClock? It does this on-the-fly for PAL DVDs, changes both pitch and framerate to the original 24 fps.

This post has been edited by andy o: Nov 29 2010, 16:17
Go to the top of the page
+Quote Post
ramicio
post Nov 29 2010, 16:44
Post #20





Group: Banned
Posts: 147
Joined: 12-October 10
Member No.: 84568



I would use eac3to for this. It can take basically any audio format known to man. The command would be "eac3to "input.file" "output.file" -25.000 -changeto23.976" That is for a movie that came as PAL (25 fps) and you are making the video into NTSC (24000/1001). When they speed up audio for PAL, the pitch is higher, too. They never bother to correct that, so when you slow it back down, it will be the original pitch. If the source is originally PAL then the pitch will be lower than what it should be.
Go to the top of the page
+Quote Post
JapanAudio
post Nov 29 2010, 17:19
Post #21





Group: Members
Posts: 86
Joined: 3-November 10
Member No.: 85187



QUOTE (andy o @ Nov 29 2010, 04:34) *
QUOTE (JapanAudio @ Nov 28 2010, 14:12) *
If the audio is ok at the beginning but 4 min in advance at the end, it means that somehow your muxer is stretching the audio to fit the video length.

?? If the audio is in advance at the end, how could it be getting stretched?

Because if audio is shorter than video, and audio plays till the end of video... it must be stretched, and the last samples will be in advance...

Guys, i get what you are all saying. That's exactly what I referred to when I wrote "fps is incorrectly specified". But, i don't think this should be an issue when properly muxing a proper rip.

FPS values should only affect the video, not the audio. Regardless of the video rate any audio track can be muxed with it, as a matter of fact audio rate is usually 48000 for dvd.

Try mkvtoolnix. Set the right fps value for video, and join any audio tracks worry-free, no stretching involved.

This post has been edited by JapanAudio: Nov 29 2010, 17:26
Go to the top of the page
+Quote Post
JapanAudio
post Nov 29 2010, 18:24
Post #22





Group: Members
Posts: 86
Joined: 3-November 10
Member No.: 85187



Btw one instance of PAL speedup is when you try playing 24 fps video on a device that only supports 25 fps, 4% speedup. On a pc or any modern digital device this is not a problem.
Go to the top of the page
+Quote Post
ramicio
post Nov 29 2010, 18:33
Post #23





Group: Banned
Posts: 147
Joined: 12-October 10
Member No.: 84568



A sample rate of 46,034 will put the audio at NTSC from PAL, but that's not a standard rate. Basically anything that can perform the conversion is going to change the sample rate to that, then upsample back to 48,000.
Go to the top of the page
+Quote Post
JapanAudio
post Nov 29 2010, 19:56
Post #24





Group: Members
Posts: 86
Joined: 3-November 10
Member No.: 85187



Please give me some feedback on mkvtoolnix, there is no use in altering the audio if using the matroska container.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 29th July 2014 - 13:53