Log in

View Full Version : Besweet encode has different running time than source


outsiders71
19th May 2007, 06:13
Hello,

I wanted to edit out some cursing in a movie, so I used VobBlanker to extract the cell I wanted to edit. I then de-muxed the vob into .m2v and .ac3 files.

I used Adobe Audition 2.0 to edit the .ac3 file. The original .ac3 file is 4:11 secs. The edited file I made is 4:11 secs. I saved it as a 48hz 16bit wave file and then loaded it with the latest besweet beta/gui. The stable version won't work on Vista.

If I encode the wave to ac3, the encoded ac3 file will have one less second then the edited wave file. If I encode the wave to .mp2 it adds .016 seconds to the edited wave file. This is frustrating, why is Besweet changing the timings?

Thanks.

tebasuna51
19th May 2007, 09:22
An ac3 is composed by frames of 32 ms (for 48 KHz) then never can have exactly 4m 11sec, can be 4:10.976 or 4:11.008.
You can wait this order differences but never 1 sec, something is wrong in your process. Please put the log file.

The difference using mp2 is normal and BeSweet isn't the culprit, the encoder fill with silence the last incomplete frame. The mp2 framesize is 24 ms and never can have exactly 4:11, may be 4:10.992 or 4:11.016

outsiders71
20th May 2007, 01:15
Thanks for the reply. What do you suggest I use to demux the VOB?

tebasuna51
20th May 2007, 01:35
What do you suggest I use to demux the VOB?
?. But the problem isn't the encode wav to ac3 with BeSweet?

"If I encode the wave to ac3, the encoded ac3 file will have one less second then the edited wave file."

outsiders71
20th May 2007, 03:18
You were saying that it is impossible for an ac3 to have the time of: 4min 11secs. I used VobEdit to demux the streams, and when I open the file up in Adobe Audition 2.0, it says the file is exactly 4mins and 11 seconds long. So what is going wrong?

tebasuna51
20th May 2007, 08:26
I don't know ac3 decoders accept incomplete frames because there are crc's at beginning and at the end of frame, maybe the Adobe Audition decoder can.

Also I don't know ac3 encoders can output incomplete frames, at least the encoders used with BeSweet (ac3enc.dll and Aften.exe) can't.

The recommended free encoder Aften fill the incomplete last frame with silence.

outsiders71
20th May 2007, 18:38
Well I'll try to work on it some more and see if I can find away around this problem. My major problem with this is obviously AV syncing issues.

outsiders71
22nd May 2007, 16:45
OK I figured out what to do but I have one more problem.

I demuxed with pgcdemux, and open the ac3 file in adobe audition. I then save the edited AC3 file to a WAV (PCM). I used ac3machine along with besweet to encode the WAV to AC3, and told ac3machine to include a -136msec delay (as reported by pgcdemux). Then I used muxman to multiplex the two ES together.

After watching the VOB file it seems to be good, no stuttering, and audio is in sync with video. HOWEVER now I'm having a problem with the audio volume. It is really really LOW for some reason. I tried just playing the edited AC3 file and the volume seems to be normal. But when muxed it is very very low. Any ideas? Thanks.

tebasuna51
22nd May 2007, 18:19
I used ac3machine along with besweet to encode the WAV to AC3, ...
Ac3Machine is obsolete. The ac3enc.dll can't output more than -6 dB and without control over important parameters like Dialog Normalization and Dynamic Range Compression. Use the last BeLight package with support for Aften ac3 encoder and read the Sticky: GUIDE: How To Properly Encode Dolby Digital Audio (AC3) (http://forum.doom9.org/showthread.php?t=56020)

After watching the VOB file it seems to be good, no stuttering, and audio is in sync with video. HOWEVER now I'm having a problem with the audio volume. It is really really LOW for some reason. I tried just playing the edited AC3 file and the volume seems to be normal. But when muxed it is very very low. Any ideas?
When you experiment these differences between play the ac3 alone and muxed in any container (avi, vob, ...) there are only one reason: you use different adjusts or differents softs, filters or players. Never is an ac3 problem, if you use the same players, filters, adjusts, ... the ac3 alone must sound equal to the muxed.

outsiders71
22nd May 2007, 20:52
Ac3Machine is obsolete. The ac3enc.dll can't output more than -6 dB and without control over important parameters like Dialog Normalization and Dynamic Range Compression. Use the last BeLight package with support for Aften ac3 encoder and read the Sticky: GUIDE: How To Properly Encode Dolby Digital Audio (AC3) (http://forum.doom9.org/showthread.php?t=56020)


When you experiment these differences between play the ac3 alone and muxed in any container (avi, vob, ...) there are only one reason: you use different adjusts or differents softs, filters or players. Never is an ac3 problem, if you use the same players, filters, adjusts, ... the ac3 alone must sound equal to the muxed.

Thanks for all your help but I keep running into dead end roads.

I started from scratch and downloaded the latest besweet, followed by the latest belight. I get an error when I try to do the wav->ac3 convert. Says check log. I check the log in belight and it says the same thing, error check log...

I tried using the latest BeHappy with the latest Aften, with AviSynth 2.5.6a. I get this error when I try to run the job:

Starting job test.wav->test.ac3
Error: BeHappy.AviSynthException: $ must be followed by a hexadecimal number
(E:\PLANES_TRAINS_AND_AUTOMOBILES\test\test.wav, line 1, column 5)
at BeHappy.AviSynthClip..ctor(String func, String arg, AviSynthColorspace forceColorspace, AviSynthScriptEnvironment env)
at BeHappy.Encoder.encode()


UGGG.

tebasuna51
23rd May 2007, 00:34
Last BeLight-0.22_RC1.exe (http://kurtnoise.free.fr/index.php?dir=BeLight/&file=BeLight-0.22_RC1.exe)
And the new bsn.dll (http://kurtnoise.free.fr/index.php?dir=BeLight/&file=bsn_20070513.zip)

Last Shon3i BeHappy package (http://www.box.net/shared/nkihizx1dh)
BeHappy need also .NET Framework 2.0

Last Aften 0.07 (http://forum.doom9.org/showthread.php?p=996683#post996683) or Aften rev511 (http://kurtnoise.free.fr/index.php?dir=Aften/&file=aften_rev511.zip)

If you have this soft must work. Please confirm this soft and/or put more detailed log of errors.

outsiders71
24th May 2007, 01:22
Thanks for your help, I got belight working correctly now but behappy still gives me problems. It crashes when I try to run the job. Here's what it says:

Problem signature:
Problem Event Name: BEX
Application Name: BeHappy.exe
Application Version: 0.1.9.35190
Application Timestamp: 4601dccd
Fault Module Name: AvisynthWrapper.dll
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 45f4c9c9
Exception Offset: 00001d62
Exception Code: c000000d
Exception Data: 00000000
OS Version: 6.0.6000.2.0.0.256.1
Locale ID: 1033
Additional Information 1: f5a8
Additional Information 2: 26e2a974e105888ffa55cf6ab26d94e6
Additional Information 3: e052
Additional Information 4: c349466e7c52437c92b09f29bff1e833

tebasuna51
24th May 2007, 02:04
At least you have BeLight working.

I don't know what is the problem with BeHappy, maybe ...
- Try with AviSynth v2.5.7
- BeHappy work with others encoders or uncompressed wav output?
- AviSynth work for you with VirtualDub or others apps.?

outsiders71
24th May 2007, 03:18
Ok this is totally ODD! I'm watching the edited and muxed VOB with Nero Showtime and the audio is fine. If I watch the same VOB with Cyberlink PowerDVD the sound is like -10db. Now here's the kicker, after I replace the VOB file with VobBlanker and process the DVD, I watch it in Cyberlink PowerDVD and the audio is normal throughout the whole movie until that one VOB. Then the audio gets quiet!

I'm going to try burning the disc and see how it plays on a standalone. *pulling hair out*

EDIT: Just watched the processed movie with WMP 11 and the sound does not change. This must be some kind of bug with Cyberlink PowerDVD.