Log in

View Full Version : Converting AC3 frame rate


marknyc5
27th October 2006, 12:59
I have a 25fps ac3 that I want to convert to 29.97, maintining the 5.1 format.

What's the best tool? I have tried AC3 machine and other BeSweet GUIs, but whenever I hit encode, it just creates a 0kb file - what am I doing wrong? I have installed BeSweet and point the various GUIs to it, I think....

Thanks for any help,

Mark

Awatef
28th October 2006, 00:34
Eh, excuse me, what's the point in speeding it up that much?
If you're converting a PAL source to NTSC, you have 2 choices:
1) If the source is progressive (or deinterlaced), slow down the video to the film framerate (23.976fps) and slow down the audio part to match the new video duration (95,904% of the original duration).
2) If the source is interlaced, you do a framerate conversion to 29.97fps interlaced, keeping the original duration untouched. That way you don't have to mess up with the audio part at all.

Matthew
28th October 2006, 00:50
3) If the source is progressive (or deinterlaced), use DGPulldown on the video for 25->29.97 (after re-encoding to 720x480), and leave the audio untouched.

marknyc5
28th October 2006, 00:52
I'm asking because I had to demux due to a need to delay the audio significantly - by 1180 ms (don't ask why). So I have my m2v file converted to NTSC 29.97, but when I convert the ac3 file to wav so I can change its framerate to match, I lose the 5.1 surround sound.

I just want to convert the ac3 file to 29.97 and then delay it by 1180 ms. Maybe I have to go to wav first? I did that and it worked, but I get only 2-channel sound.

Awatef
28th October 2006, 23:35
mark, there is no way anybody would speed up 25fps to 29.97fps, the difference is huge!
If you express the need of speeding up your audio that much, you processed your video the wrong way!
Either use the methods I told you about, or the method Matthew posted (even though I strongly disapprove it)

marknyc5
29th October 2006, 18:57
I converted the video in TMP and then used DGPulldown to change the framerate - it looks great. But when I demux the ac3 file in VideoDub, it is no longer in sync. That's why I thought I had to change the frame rate.

How do I get the ac3 file to stay in sync?

setarip_old
29th October 2006, 19:45
Hi!

Try using "AC3 Delay Corrector"...

marknyc5
29th October 2006, 23:56
Yeah, did that - but it's not just delayed, it's out of sync. If I get one section in snyc, later sections are out of sync. So I thought I needed to also change the frame rate of the ac3 file, but people tell me that's wrong.

So why is the ac3 file a different length than the m2v file created from the avi?

Awatef
30th October 2006, 15:14
Could you please give us the durations of your final video file and your AC3 file?
That way we should be able to know what kind of framerate conversion you did in TMPG, and we may be able to help you avoid it.

marknyc5
30th October 2006, 18:47
Okay - the original avi is 1:13:26. (mminfo says the avi is 110162 frames long, and is 25fps.)

The converted m2v (29.97fps using DGPulldown) is 1:13:30;12, according to TMPGEnc DVD Author.

How do I find out the length of the ac3 file?

Mark

Awatef
30th October 2006, 22:53
Okay, here you have a 4 seconds difference... where did it come from? I don't know exactly, but I guess DGpulldown is the culprit. From my calculations, it's like your source has been converted from 25fps to 24.975fps(25 frames every 1001ms, similiar to NTSC where 29.97fps means 30 frames every 1001ms). I told you I don't like Matthew's method :sly:
Anyway, you see that your audio doesn't have to be matched to 29.97fps, it's all about the duration (audio does not have a framerate).

The only way for you to get video in synch with your audio without messing up with the audio, is to use a framerate conversion in AviSynth to 29.97i, like this:

avisource("filename.avi")
ConvertToYUY2()
LanczosResize(x,y)
ConvertFPS(60000, 1001)
SeparateFields()
SelectEvery(4,0,3)
Weave()
AddBorders(a,b,c,d)

The LanczosResize and AddBorders lines are optional, and have to be adapted to your source. The final format should be 720x480 though.
This method should produce good results on TV.

marknyc5
31st October 2006, 00:40
Thanks for this. Here's the script that FitCD gives me:

AVISource("marknyc.avi")
BicubicResize(672,320,0,0.6,2,0,652,256)
AddBorders(24,80,24,80)
AssumeFPS(23.976, true)
#Trim(0,110161).FadeOut(150)


Should I change it to this or do I need more info?

AVISource("marknyc.avi")
ConvertToYUY2()
BicubicResize(672,320,0,0.6,2,0,652,256)
ConvertFPS(60000, 1001)
SeparateFields()
SelectEvery(4,0,3)
Weave()
AddBorders(24,80,24,80)

Awatef
31st October 2006, 12:55
The script you posted is about slowing down the video to the original framerate. It is good if you want the best video quality, maintaining the progressive aspect. But it implies the audio conversion. I never used BeSweet, so I can't tell you how to do it. I actually never encoded 5.1, so if someone is kind enough to tell you how to do this in BeSweet...
Meanwhile, I would suggest you consult Doom9 AC3 guide (http://www.doom9.org/belight-ac3toac3.htm) and experiment a little bit with smaller files.

The script I posted is not optimal for video quality (you get interlaced video with blending), but it spares you the audio conversion.

tebasuna51
31st October 2006, 16:29
Okay - the original avi is 1:13:26. (mminfo says the avi is 110162 frames long, and is 25fps.)

The converted m2v (29.97fps using DGPulldown) is 1:13:30;12, according to TMPGEnc DVD Author.
If you need reencode ac3 5.1 changing the duration you can't use BeSweet to do the job without intermediate wav files, because soundtouch don't work with multichannel 5.1, only with mono or stereo files.

1) To do the job you can use BeHappy, see this post (http://forum.doom9.org/showthread.php?p=893785#post893785) for installation and an example of use, with this steps:

- Open the ac3 5.1 source with NicAc3Source and configure for use DRC (Dynamic Range Compression)

- Select the DSP function TimeStretch and configure using Custom transform: 99.917470
100 * (actual_duration / desired_duration) =
100 * (4406.48 / 4410.12) = 99.917470

- Select Normalize, configure to 100% (or 95%) and Move Down of TimeStretch (if needed)

- In [4] Destination select the Aften encoder and configure with defaults and:
Constant BitRate: 448 Kb/s
Dialog Normalization: 31

- Enqueue and Start job

2) A alternate method, with intermediate wav file, to preserve the Dynamic Range and the possibility of use the DRC is:

- Open the ac3 5.1 source with NicAc3Source and configure for not use DRC (Dynamic Range Compression)

- Select the DSP function TimeStretch and configure using Custom transform: 99.917470 (same as before but now not use Normalize)

- In [4] Destination select Wav Writer

- The resultant wav must be encoded with any commercial ac3 encoder with same Dialog Normalization and DRC than the original (at least with Sonic Foundry SoftEncode with the apropriate channel remapping). The new free Aften encoder have the DRC in test phase, but you can try aften-0.05_rev212 or 214 in command line (the DRC option not supported yet in GUI's).