View Full Version : 25fps to 23.97fps with synced audio.
Burning Fury
16th February 2006, 00:08
Hello all, i have a 25fps PAL AVI and i converted it to 23.97fps NTSC.
The process went smooth, however; i noticed the audio being out of sync,
hence i thought that the frame rate had something to do with it, since the AVI
was originally processed as 25fps.
Does PAL and NTSC audio handle different bitrates?
Now, is there a way to put the audio in sync with the video after the conversion?,
meaning to have a 23.97fps NTSC with synced audio?
I did my share in researching and couldn't find a suitable answer.
Hope you can solve my problem...
Cheers ;)
Skelsgard
16th February 2006, 17:05
Basically:
Does PAL and NTSC audio handle different bitrates?
The problem doesnŽt lies within the bitrate of the audio but the frame rate of the video, wich u altered when changing from 25.000 fps to 23.976 fps.
Now, is there a way to put the audio in sync with the video after the conversion?,
meaning to have a 23.97fps NTSC with synced audio?
Think about it like this: the audio handles sample rate and video, frame rate. If u decrease the videoŽs frame rate in a % then extending is playing time, the audio length should be increased too in that percentage.
U have changed (NOT converted) the frame rate from 25 to 23.976. This means that u have set the video to be played at 23.976 fps when it was 25.000. This means that for 10 seconds of 25.000 fps, u have 250 frames. If the FR is changed to 23.976, those 250 frames will play in 250 / 23.976 = 10,42 seconds. Not a big difference. But when u have 7200 seconds (a 2hs movie), the difference will be 7200 / 23.976 = 2hs 5 min 7sec (a 5min desync). But if u instead CONVERT the frame rate from 25 to 23.976, the converter will have to dispose of those frames that consider necessary to get only 23.976 fps.
U might already know this, but IŽm trying to get somewhere: your options.
They are 2: u either change the FR and therefore uŽll have to adjust the duration of the audio, or u convert the FR and u wonŽt need to touch the audio since it will still be synched to the video.
But if u want to change FPS (adjusting the audio):
load the audio into a audio app like Audacity, Sound Forge or Audition, select the entire track and apply a Time Stretch: it will do just that, stretch or shorten the audioŽs length to a value u set. Considering that your movie was 25 and now is 23.976, that means that less frames are played in each second, wich means that to play the entire amount of frames it will take more time. Therefore, u need to stretch the audio in a 25/23.976 = 104,271 %. This means the new audio should be 104,271% in length compared to the 100% of the source.
For example in Audition, where the value for ratio sets what % of the destination audio is the source audio:
http://img405.imageshack.us/img405/7941/stretch5mx.jpg
in this case 95,904 % is the ratio destination/source (this is due to the options selected in the example, this reasoning doesnŽt apply to all the ways of performing stretching). Or u can set the desired duration and the ratio will adjust automatically. Pay attention that the "Preserve pitch" option is selected to guarantee that the pitch wonŽt be changed with the length (due to sample rate changes).
Episodio1
16th February 2006, 19:03
Wonderbra, can i use BeSweet and its preset: "from PAL to 23,976" when Im transcoding from AC3 to MP3 ?
Skelsgard
16th February 2006, 19:31
IŽm not familiarized with those options since I use Besweet only for AC3 to Wav transcoding, all my audio editing goes thrugh Audition.
Sorry.
But u should ask in the "Audio encoding" forum. There uŽll get a usefull answer fo sure.
Burning Fury
17th February 2006, 00:33
Thanks for all that info Wonderbra, it helps a lot ;)
Now, you explained to me 1 of the 2 possible ways i can have this problem resolved.
How do you go by the second option which is to "convert" the FR and keep the audio synced?
or u convert the FR and u wonŽt need to touch the audio since it will still be synched to the video.
Please provide as much details as possible, since this can help other users in the future, :)
Thanks :)
Skelsgard
19th February 2006, 14:30
OK, this is the thing. U need to go to the Frame Rate Tab in VirtualDub and select the "Convert to" option: this will calculate the necessary frames to get the 25 fps movie going (instead of the "Change to" option).
But there is one issue: 23.976 to 25 fps is not generally a smooth transition. Most encoders just add an repeated frame to get the 25fps wich means basically 21 frame being played twice, wich results in a "jump" effect in the video wich appears on every second.
If video quality is your goal, I would recomend to change the vido FR and stretch the audio. The settings in the image above are exactly the ones u need to get your audio synched to the video (i already made the calculations, use the radio values: 95.904% for 25 to 23.976fps).
I`m assuming you need to fps change to create a NTSC compliant DVD. If encoding with CCE, u can feed CCE with a .vdr from VD with the changed fps and set the "23.976 fps" option.
Mudalanera
9th September 2007, 13:31
Hi
I changed the fps from a h.264 MKV video from 23,976 to 25 fps. Now how can I stretch the audio to play synchroned with the 25 fps episode??
foxyshadis
9th September 2007, 16:32
Re-encode the audio or use reclock. It's quite clearly explained in post 2. Since the only reason to change fps is to use it standalone, I assume reclock isn't an option.
Mudalanera
10th September 2007, 20:23
I don't need to reencode it, because I have speed the video up, not converted it, right? How can I now stretch the audio that it matches to the 25 fps video?
Other question: With how many percentages do I have to stretch the audio for 23,976 -> 25?
CWR03
10th September 2007, 22:39
How do you go by the second option which is to "convert" the FR and keep the audio synced?
When using VirtualDubMod, after you've imported your time-corrected audio click Video > Frame rate, then select Change so video and audio durations match. The video won't be reencoded, so no repeat frames will be added. The new file will only have the frame rate adjusted.
foxyshadis
11th September 2007, 08:14
I don't need to reencode it, because I have speed the video up, not converted it, right? How can I now stretch the audio that it matches to the 25 fps video?
Other question: With how many percentages do I have to stretch the audio for 23,976 -> 25?
Since there's no way to set the audio rate, you have to re-encode. If it was possible to set in the same way you can set frame rates, you could make a quick edit and be done. Of course in wav files this is easy, but compressed audio has a very limited range, for example, aac has 12 possible sample rates and mp3 has 9. Vorbis is the only useful codec that allows you to use non-standard sample rates.
Audition, Audacity, BeSweet, and quite a few others allow you do do the stretch and re-encode (besweet even has that nice 23.976->25 preset, see advanced settings in belight). It's 4% btw, just divide 25/23.976 to get the multiplier.
Skelsgard
11th September 2007, 12:28
Unless you need to port it to use in a SAP, you don't need to touch the audio.
Just load the MKV into MKVMerge, select the audio stream, go to Format Specific options. There you have a "Strecht by" option. Use the proper value to make the audio faster or slower as needed WHEN PLAYED.
IRCC, it works with MP3, AAC, and AC3 audio. I don't remember if it does with DTS or Vorbis.
Later, dude
Mudalanera
11th September 2007, 16:54
Oh that's a nice trick with MKVMerge.
Can you say me what a value I have to use to speed up the audio from 23,976 fps to 25 fps, please?
EDIT ok I have encoded the audio with belight, but how comes that the 25 fps speed up video is 18:41 long and the new reencoded audio (23,976 -> 25) is 19:29 long??? The video and audio don't match each other :(
Skelsgard
11th September 2007, 17:41
I've always had problems stretching with Besweet if recompressing. Like MP3 to MP3, for example.
But it seems to work when "Compressed" to WAV.
I use Audition to stretch.
About the wrong length, you calculated it wrong.
18:41 seconds is 1121 seconds.
If your source was 23.976 and you speeded it up to 25, the math should be 1121/25 x 23.976, that will give you 17:55 seconds length.
You must have done 1121/23.976 x 25, which is why you get 19:29
Cheers
Mudalanera
11th September 2007, 19:08
Well the 23,976 fps video was 19:29 long. After I have speeded it up to 25 fps it was 18:41
But how can I now speed the audio (19:29) up that it matches to the 18:41???
Skelsgard
11th September 2007, 20:58
In MKVMerge use Stretch by: 23.976/25
sumpm1
20th September 2007, 01:03
I haven't seen anyone suggest this:
1. Once you have your ntsc video, the audio will be too long, or too short.
2. Set Video-->Direct Stream Copy
3. Select "change so video and audio durations match"
4. F7 Save Avi
http://img205.imageshack.us/img205/6743/vdub005zl3.png (http://img205.imageshack.us/my.php?image=vdub005zl3.png)
foxyshadis
20th September 2007, 07:25
sumpm, that would just get you the 25fps you started out with again.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.