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 > Capturing and Editing Video > VirtualDub, VDubMod & AviDemux

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th February 2006, 00:08   #1  |  Link
Burning Fury
Don't you love me?
 
Burning Fury's Avatar
 
Join Date: Mar 2005
Location: I live here.
Posts: 81
25fps to 23.97fps with synced audio.

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
__________________
Real men encode with script.
Burning Fury is offline   Reply With Quote
Old 16th February 2006, 17:05   #2  |  Link
Skelsgard
foobaring my ass off
 
Skelsgard's Avatar
 
Join Date: Nov 2005
Location: Argentina
Posts: 618
Basically:
Quote:
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.

Quote:
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:

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).
__________________
"Damn, respect my authoritay!!" - E. Cartman
Skelsgard is offline   Reply With Quote
Old 16th February 2006, 19:03   #3  |  Link
Episodio1
Registered User
 
Join Date: Feb 2002
Location: Spain
Posts: 198
Wonderbra, can i use BeSweet and its preset: "from PAL to 23,976" when Im transcoding from AC3 to MP3 ?
Episodio1 is offline   Reply With Quote
Old 16th February 2006, 19:31   #4  |  Link
Skelsgard
foobaring my ass off
 
Skelsgard's Avatar
 
Join Date: Nov 2005
Location: Argentina
Posts: 618
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.
__________________
"Damn, respect my authoritay!!" - E. Cartman
Skelsgard is offline   Reply With Quote
Old 17th February 2006, 00:33   #5  |  Link
Burning Fury
Don't you love me?
 
Burning Fury's Avatar
 
Join Date: Mar 2005
Location: I live here.
Posts: 81
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?

Quote:
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
__________________
Real men encode with script.

Last edited by Burning Fury; 17th February 2006 at 00:35. Reason: Forgot to quote :(
Burning Fury is offline   Reply With Quote
Old 19th February 2006, 14:30   #6  |  Link
Skelsgard
foobaring my ass off
 
Skelsgard's Avatar
 
Join Date: Nov 2005
Location: Argentina
Posts: 618
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.
__________________
"Damn, respect my authoritay!!" - E. Cartman

Last edited by Skelsgard; 19th February 2006 at 14:33.
Skelsgard is offline   Reply With Quote
Old 9th September 2007, 12:31   #7  |  Link
Mudalanera
Registered User
 
Join Date: Jul 2007
Posts: 7
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??
Mudalanera is offline   Reply With Quote
Old 9th September 2007, 15:32   #8  |  Link
foxyshadis
Angel of Night
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
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.
foxyshadis is offline   Reply With Quote
Old 10th September 2007, 19:23   #9  |  Link
Mudalanera
Registered User
 
Join Date: Jul 2007
Posts: 7
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?

Last edited by Mudalanera; 10th September 2007 at 20:50.
Mudalanera is offline   Reply With Quote
Old 10th September 2007, 21:39   #10  |  Link
CWR03
Custom User Title
 
CWR03's Avatar
 
Join Date: Mar 2005
Posts: 3,733
Quote:
Originally Posted by Burning Fury
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.
CWR03 is offline   Reply With Quote
Old 11th September 2007, 07:14   #11  |  Link
foxyshadis
Angel of Night
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
Quote:
Originally Posted by Mudalanera View Post
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.
foxyshadis is offline   Reply With Quote
Old 11th September 2007, 11:28   #12  |  Link
Skelsgard
foobaring my ass off
 
Skelsgard's Avatar
 
Join Date: Nov 2005
Location: Argentina
Posts: 618
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
__________________
"Damn, respect my authoritay!!" - E. Cartman
Skelsgard is offline   Reply With Quote
Old 11th September 2007, 15:54   #13  |  Link
Mudalanera
Registered User
 
Join Date: Jul 2007
Posts: 7
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

Last edited by Mudalanera; 11th September 2007 at 16:16.
Mudalanera is offline   Reply With Quote
Old 11th September 2007, 16:41   #14  |  Link
Skelsgard
foobaring my ass off
 
Skelsgard's Avatar
 
Join Date: Nov 2005
Location: Argentina
Posts: 618
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
__________________
"Damn, respect my authoritay!!" - E. Cartman

Last edited by Skelsgard; 11th September 2007 at 19:54.
Skelsgard is offline   Reply With Quote
Old 11th September 2007, 18:08   #15  |  Link
Mudalanera
Registered User
 
Join Date: Jul 2007
Posts: 7
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???

Last edited by Mudalanera; 11th September 2007 at 18:12.
Mudalanera is offline   Reply With Quote
Old 11th September 2007, 19:58   #16  |  Link
Skelsgard
foobaring my ass off
 
Skelsgard's Avatar
 
Join Date: Nov 2005
Location: Argentina
Posts: 618
In MKVMerge use Stretch by: 23.976/25
__________________
"Damn, respect my authoritay!!" - E. Cartman
Skelsgard is offline   Reply With Quote
Old 20th September 2007, 00:03   #17  |  Link
sumpm1
Registered User
 
Join Date: Nov 2001
Posts: 125
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


Last edited by sumpm1; 20th September 2007 at 00:07.
sumpm1 is offline   Reply With Quote
Old 20th September 2007, 06:25   #18  |  Link
foxyshadis
Angel of Night
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
sumpm, that would just get you the 25fps you started out with again.
foxyshadis is offline   Reply With Quote
Old 6th November 2023, 15:39   #19  |  Link
madey83
Guest
 
Posts: n/a
works like charm

https://www.youtube.com/watch?v=H1DDHtC5Y8c&t=67s
  Reply With Quote
Old 7th November 2023, 01:05   #20  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,512
16 years...
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Reply

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 22:24.


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