PDA

View Full Version : Problem with Hybridgain when encoding MP2 with BeSweet


SILICON
2nd January 2004, 07:48
I found one bug in BESWEET v1.5b24 and v1.5b25

I converted one big AC3 (348MB) to MP2. Later, I multiplexed the MP2 using bbMPEG.

If use BESWEET v1.5b24 or v1.5b25 the bbMpeg tell:
Scanning audio stream for access units information
Found 3552 audio frame headers.
MPEG audio stream information
Stream length : 1704960
Syncwords : 3552
Frames : 3552 size 480 bytes

If use BeSweet v1.5b23, the same AC3 and using the same command-line the bbMpeg says:
Scanning audio stream for access units information
Found 315788 audio frame headers.
MPEG audio stream information
Stream length : 151578240
Syncwords : 315788
Frames : 315788 size 480 bytes

I see one diference in the screen (using the same command-line). The bug versions put:
[ 3/100 ] Asserting gain of -4.0dB..

The BeSweet v1.5b23 donīt print this. I think that te bug can be in the postgain module. Lost o write bad some headers?

The final size of the bad and the good file are the same and the two sound good (using mplayer).

The log of the bad process:
BeSweet v1.5b24 by DSPguru.
--------------------------
Using azid.dll v1.9 (b922) by Midas (midas@egon.gyaloglo.hu).
Using Shibatch.dll v0.24 by Naoki Shibata & DSPguru (shibatch.sourceforge.net).
Using tooLame.dll v0.2l (Apr 24 2003) by Mike Cheng <http://tooLame.sf.net>
Manual Dynamic-Compression algorithm by LigH (author of WaveBooster).

Logging start : 01/02/04 , 05:39:07.

C:\DVD2CVCD\BESWEET\BESWEET.EXE -core( -input D:\jungladecristal\PELICULA.ac3 -output D:\jungladecristal\PELICULA.MP2 -logfilea D:\jungladecristal\DVD2CVCD.LOG ) -split( -start 30 -end 7609 ) -azid( -s surround2 -f1 ) -toolame( -m s -b 160 ) -ssrc( --rate 48000 ) -boost( /b2=5 ) -ota( -hybridgain -d -96 )

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : D:\jungladecristal\PELICULA.ac3
[00:00:00:000] | Output: D:\jungladecristal\PELICULA.MP2
[00:00:00:000] | Floating-Point Process: No
[00:00:00:000] | PostGain normalize to : 0.97
[00:00:00:-96] +-------- AZID -------
[00:00:00:-96] | Input Channels Mode: 3/2, Bitrate: 384kbps
[00:00:00:-96] | Output Stereo mode: Dolby surround 2 compatible
[00:00:00:-96] | Total Gain: 7.000dB, Compression: None
[00:00:00:-96] | LFE levels: To LR -INF, To LFE 0.0dB
[00:00:00:-96] | Center mix level: BSI
[00:00:00:-96] | Surround mix level: BSI
[00:00:00:-96] | Dialog normalization: -4dB
[00:00:00:-96] | Rear channels filtering: Yes
[00:00:00:-96] | Source Sample-Rate: 48.0KHz
[00:00:00:-96] +-------- BOOST ------
[00:00:00:-96] | Algorithm by : Dg
[00:00:00:-96] | Boost Factor : 5.0
[00:00:00:-96] | Limit Factor : 0.73
[00:00:00:-96] +------ tooLame ------
[00:00:00:-96] | Bitrate method : CBR
[00:00:00:-96] | MP2 bitrate : 160
[00:00:00:-96] | Channels Mode : Stereo
[00:00:00:-96] | Error Protection: No
[00:00:00:-96] +---------------------
[02:06:18:912] Gain of -4.0dB had been asserted to file.
[02:06:18:912] Conversion Completed !
[02:06:18:912] Actual Avg. Bitrate : 160kbps
[00:13:56:000] <-- Transcoding Duration

Logging ends : 01/02/04 , 05:53:03.

The log of the good process:
BeSweet v1.5b23 by DSPguru.
--------------------------
Using azid.dll v1.8 (b825) by Midas (midas@egon.gyaloglo.hu).
Using Shibatch.dll v0.24 by Naoki Shibata & DSPguru (shibatch.sourceforge.net).
Using tooLame.dll v0.2l (Apr 24 2003) by Mike Cheng <http://tooLame.sf.net>
Manual Dynamic-Compression algorithm by LigH (author of WaveBooster).

Logging start : 01/02/04 , 05:02:26.

C:\DVD2CVCD\BESWEET\BESWEET.EXE -core( -input D:\jungladecristal\PELICULA.ac3 -output D:\jungladecristal\PELICULA.MP2 -logfilea D:\jungladecristal\DVD2CVCD.LOG ) -split( -start 30 -end 7609 ) -azid( -s surround2 -f1 ) -toolame( -m s -b 160 ) -ssrc( --rate 48000 ) -boost( /b2=5 ) -ota( -hybridgain -d -96 )

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : D:\jungladecristal\PELICULA.ac3
[00:00:00:000] | Output: D:\jungladecristal\PELICULA.MP2
[00:00:00:000] | Floating-Point Process: No
[00:00:00:000] | PostGain normalize to : 0.97
[00:00:00:-96] +-------- AZID -------
[00:00:00:-96] | Input Channels Mode: 3/2, Bitrate: 384kbps
[00:00:00:-96] | Output Stereo mode: Dolby Surround 2 compatible
[00:00:00:-96] | Total Gain: 10.000dB, Compression: None
[00:00:00:-96] | LFE levels: To LR -INF, To LFE 0.0dB
[00:00:00:-96] | Center mix level: BSI
[00:00:00:-96] | Surround mix level: BSI
[00:00:00:-96] | Dialog normalization: -4dB
[00:00:00:-96] | Rear channels filtering: Yes
[00:00:00:-96] | Source Sample-Rate: 48.0KHz
[00:00:00:-96] +-------- BOOST ------
[00:00:00:-96] | Algorithm by : Dg
[00:00:00:-96] | Boost Factor : 5.0
[00:00:00:-96] | Limit Factor : 0.73
[00:00:00:-96] +------ tooLame ------
[00:00:00:-96] | Bitrate method : CBR
[00:00:00:-96] | MP2 bitrate : 160
[00:00:00:-96] | Channels Mode : Stereo
[00:00:00:-96] | Error Protection: No
[00:00:00:-96] +---------------------
[02:06:18:912] Conversion Completed !
[02:06:18:912] Actual Avg. Bitrate : 160kbps
[00:13:08:000] <-- Transcoding Duration

Logging ends : 01/02/04 , 05:15:34.

If you need the programs o the AC3 file, tell me.

DSPguru
3rd January 2004, 10:28
try doing the same with "-s surround" instead of "-s surround2"..

post your logfile.

SILICON
3rd January 2004, 16:25
Originally posted by DSPguru
try doing the same with "-s surround" instead of "-s surround2"..

post your logfile.

I tried it. Failed :-(

The log:
BeSweet v1.5b25 by DSPguru.
--------------------------
Using azid.dll v1.9 (b922) by Midas (midas@egon.gyaloglo.hu).
Using Shibatch.dll v0.24 by Naoki Shibata & DSPguru (shibatch.sourceforge.net).
Using tooLame.dll v0.2l (Apr 24 2003) by Mike Cheng <http://tooLame.sf.net>
Manual Dynamic-Compression algorithm by LigH (author of WaveBooster).

Logging start : 01/03/04 , 14:26:27.

C:\DVD2CVCD\BESWEET\BESWEET.EXE -core( -input D:\jungladecristal\PELICULA.ac3 -output D:\jungladecristal\PELICULA.MP2 -logfilea D:\jungladecristal\DVD2CVCD.LOG ) -split( -start 30 -end 7609 ) -azid( -s surround -f1 ) -toolame( -m s -b 160 ) -ssrc( --rate 48000 ) -boost( /b2=5 ) -ota( -hybridgain -d -96 )

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : D:\jungladecristal\PELICULA.ac3
[00:00:00:000] | Output: D:\jungladecristal\PELICULA.MP2
[00:00:00:000] | Floating-Point Process: No
[00:00:00:000] | PostGain normalize to : 0.97
[00:00:00:-96] +-------- AZID -------
[00:00:00:-96] | Input Channels Mode: 3/2, Bitrate: 384kbps
[00:00:00:-96] | Output Stereo mode: Dolby surround compatible
[00:00:00:-96] | Total Gain: 7.000dB, Compression: None
[00:00:00:-96] | LFE levels: To LR -INF, To LFE 0.0dB
[00:00:00:-96] | Center mix level: BSI
[00:00:00:-96] | Surround mix level: BSI
[00:00:00:-96] | Dialog normalization: -4dB
[00:00:00:-96] | Rear channels filtering: Yes
[00:00:00:-96] | Source Sample-Rate: 48.0KHz
[00:00:00:-96] +-------- BOOST ------
[00:00:00:-96] | Algorithm by : Dg
[00:00:00:-96] | Boost Factor : 5.0
[00:00:00:-96] | Limit Factor : 0.73
[00:00:00:-96] +------ tooLame ------
[00:00:00:-96] | Bitrate method : CBR
[00:00:00:-96] | MP2 bitrate : 160
[00:00:00:-96] | Channels Mode : Stereo
[00:00:00:-96] | Error Protection: No
[00:00:00:-96] +---------------------
[02:06:18:912] Gain of 2.0dB had been asserted to file.
[02:06:18:912] Conversion Completed !
[02:06:18:912] Actual Avg. Bitrate : 160kbps
[00:14:23:000] <-- Transcoding Duration

Logging ends : 01/03/04 , 14:40:50.

The bbMPEG says:

Scanning audio stream for access units information
Found 5224 audio frame headers.
MPEG audio stream information
Stream length : 2507520
Syncwords : 5224
Frames : 5224 size 480 bytes

I think that the bug is on the postgain module. I will make more test and will pul the logs here.

DSPguru
3rd January 2004, 17:50
i would appreciate it if you could test again using mp2enc as an encoder and removing "-boost( )".

SILICON
3rd January 2004, 18:22
I made more test with less options. The bug are in the postgain.

This is ok:

BeSweet v1.5b25 by DSPguru.
--------------------------
Using azid.dll v1.9 (b922) by Midas (midas@egon.gyaloglo.hu).
Using tooLame.dll v0.2l (Apr 24 2003) by Mike Cheng <http://tooLame.sf.net>

Logging start : 01/03/04 , 15:42:44.

C:\DVD2CVCD\BESWEET\BESWEET.EXE -core( -input D:\jungladecristal\PELICULA.ac3 -output D:\jungladecristal\PELICULA.MP2 -logfilea BESWEET.LOG ) -azid( -s stereo ) -toolame( -m s -b 160 ) -ota( -g max )

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : D:\jungladecristal\PELICULA.ac3
[00:00:00:000] | Output: D:\jungladecristal\PELICULA.MP2
[00:00:00:000] | Floating-Point Process: No
[00:00:00:000] | Overall Track Gain: 4.423dB
[00:00:00:000] +-------- AZID -------
[00:00:00:000] | Input Channels Mode: 3/2, Bitrate: 384kbps
[00:00:00:000] | Output Stereo mode: Stereo
[00:00:00:000] | Total Gain: 0.000dB, Compression: None
[00:00:00:000] | LFE levels: To LR -INF, To LFE 0.0dB
[00:00:00:000] | Center mix level: BSI
[00:00:00:000] | Surround mix level: BSI
[00:00:00:000] | Dialog normalization: No
[00:00:00:000] | Rear channels filtering: No
[00:00:00:000] | Source Sample-Rate: 48.0KHz
[00:00:00:000] +------ tooLame ------
[00:00:00:000] | Bitrate method : CBR
[00:00:00:000] | MP2 bitrate : 160
[00:00:00:000] | Channels Mode : Stereo
[00:00:00:000] | Error Protection: No
[00:00:00:000] +---------------------
[02:06:49:792] Conversion Completed !
[02:06:49:792] Actual Avg. Bitrate : 159kbps
[00:14:03:000] <-- Transcoding Duration

Logging ends : 01/03/04 , 15:56:47.

The bbMPEG says:
Scanning audio stream for access units information
Found 317074 audio frame headers.
MPEG audio stream information
Stream length : 152195520
Syncwords : 317074
Frames : 317074 size 480 bytes

With the same AC3, this is bug:
BeSweet v1.5b25 by DSPguru.
--------------------------
Using azid.dll v1.9 (b922) by Midas (midas@egon.gyaloglo.hu).
Using tooLame.dll v0.2l (Apr 24 2003) by Mike Cheng <http://tooLame.sf.net>

Logging start : 01/03/04 , 15:28:36.

C:\DVD2CVCD\BESWEET\BESWEET.EXE -core( -input D:\jungladecristal\PELICULA.ac3 -output D:\jungladecristal\PELICULA.MP2 -logfilea BESWEET.LOG ) -azid( -s stereo ) -toolame( -m s -b 160 ) -ota( -G max )

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : D:\jungladecristal\PELICULA.ac3
[00:00:00:000] | Output: D:\jungladecristal\PELICULA.MP2
[00:00:00:000] | Floating-Point Process: No
[00:00:00:000] | PostGain normalize to : 0.97
[00:00:00:000] +-------- AZID -------
[00:00:00:000] | Input Channels Mode: 3/2, Bitrate: 384kbps
[00:00:00:000] | Output Stereo mode: Stereo
[00:00:00:000] | Total Gain: 7.000dB, Compression: None
[00:00:00:000] | LFE levels: To LR -INF, To LFE 0.0dB
[00:00:00:000] | Center mix level: BSI
[00:00:00:000] | Surround mix level: BSI
[00:00:00:000] | Dialog normalization: -4dB
[00:00:00:000] | Rear channels filtering: No
[00:00:00:000] | Source Sample-Rate: 48.0KHz
[00:00:00:000] +------ tooLame ------
[00:00:00:000] | Bitrate method : CBR
[00:00:00:000] | MP2 bitrate : 160
[00:00:00:000] | Channels Mode : Stereo
[00:00:00:000] | Error Protection: No
[00:00:00:000] +---------------------
[02:06:49:792] Gain of -4.0dB had been asserted to file.
[02:06:49:792] Conversion Completed !
[02:06:49:792] Actual Avg. Bitrate : 159kbps
[00:10:49:000] <-- Transcoding Duration

Logging ends : 01/03/04 , 15:39:25.

The bbMPEG print:
Scanning audio stream for access units information
Found 15872 audio frame headers.
MPEG audio stream information
Stream length : 7618560
Syncwords : 15872
Frames : 15872 size 480 bytes

Whith another AC3 make the same bug. I will make test whit old version. I think that the bug is old.

If you need any special test, I can make it.

DSPguru
3rd January 2004, 23:24
the bug is clearly in the mp2's postgain, but i would like to see a logfile when using mp2enc instead of toolame.

SILICON
4th January 2004, 00:27
Originally posted by DSPguru
the bug is clearly in the mp2's postgain, but i would like to see a logfile when using mp2enc instead of toolame.

With the mp2enc I have the same bug. The logfile:

BeSweet v1.5b25 by DSPguru.
--------------------------
Using azid.dll v1.9 (b922) by Midas (midas@egon.gyaloglo.hu).
Using MP2enc.dll v1.129 (23/5/2002), Engine 1.129 <http://www.cdex.n3.net>.

Logging start : 01/03/04 , 23:02:37.

C:\DVD2CVCD\BESWEET\BESWEET.EXE -core( -input D:\jungladecristal\PELICULA.ac3 -output D:\jungladecristal\PELICULA.MP2 -logfilea BESWEET.LOG ) -azid( -s stereo ) -mp2enc( -m s -b 160 ) -ota( -G max )

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : D:\jungladecristal\PELICULA.ac3
[00:00:00:000] | Output: D:\jungladecristal\PELICULA.MP2
[00:00:00:000] | Floating-Point Process: Yes
[00:00:00:000] | PostGain normalize to : 0.97
[00:00:00:000] +-------- AZID -------
[00:00:00:000] | Input Channels Mode: 3/2, Bitrate: 384kbps
[00:00:00:000] | Output Stereo mode: Stereo
[00:00:00:000] | Total Gain: 7.000dB, Compression: None
[00:00:00:000] | LFE levels: To LR -INF, To LFE 0.0dB
[00:00:00:000] | Center mix level: BSI
[00:00:00:000] | Surround mix level: BSI
[00:00:00:000] | Dialog normalization: -4dB
[00:00:00:000] | Rear channels filtering: No
[00:00:00:000] | Source Sample-Rate: 48.0KHz
[00:00:00:000] +------- MP2ENC ------
[00:00:00:000] | Bitrate method : CBR
[00:00:00:000] | MP2 bitrate : 160
[00:00:00:000] | Channels Mode : Stereo
[00:00:00:000] | Error Protection: No
[00:00:00:000] +---------------------
[02:06:49:792] Gain of -4.0dB had been asserted to file.
[02:06:49:792] Conversion Completed !
[02:06:49:792] Actual Avg. Bitrate : 160kbps
[00:11:14:000] <-- Transcoding Duration

Logging ends : 01/03/04 , 23:13:51.

The bbMPEG prints:
Scanning audio stream for access units information
Found 15559 audio frame headers.
MPEG audio stream information
Stream length : 7468320
Syncwords : 15559
Frames : 15559 size 480 bytes

Thanks by help me with this problem.

DSPguru
4th January 2004, 18:11
i overlooked!
the "-ota( -G max )" switch is obsolete. please try with "-ota( -hybridgain )".

SILICON
4th January 2004, 21:01
Originally posted by DSPguru
the "-ota( -G max )" switch is obsolete. please try with "-ota( -hybridgain )".

If you see the first bug report (at the top of this tread) you can see in the log that "-ota( -hybridgain )" have the bug.

With "-hybridgain" the file is invalid if make postgain. If don't make postgain the result file is ok.

I used "-G max" for force postgain and see the bug.

slolsby
24th January 2004, 14:53
I'm using Besweet to convert a 5.1 AC3 file at 23.976fps to an MP2 at 25.000fps using Hybridgain. The conversion runs through, but appears to produce an invalid MP2 file, as Tmpgenc author rejects it as an illegal audio substream. If I then run it through Besplit with the Fix option, it logs a lot of stream errors. If I do the same thing without Hybridgain, the resultant MP2 is fine with no errors.

Here is the Besweet log (I only encoded the first 5 mins of the file)

BeSweet v1.5b25 by DSPguru.
--------------------------
Using azid.dll v1.9 (b922) by Midas (midas@egon.gyaloglo.hu).
Using Shibatch.dll v0.24 by Naoki Shibata & DSPguru (shibatch.sourceforge.net).
Using tooLame.dll v0.2l (Apr 24 2003) by Mike Cheng <http://tooLame.sf.net>

Logging start : 01/24/04 , 13:39:43.

C:\Video\besweet\BeSweet.exe -core( -input g:\Movies\Alien Directors Cut\alien AC3 T01 3_2ch 448Kbps DELAY -16ms.ac3 -output g:\Movies\Alien Directors Cut\test2.mp2 -logfilea C:\Video\besweet\BeSweet.log ) -azid( -c normal -L -3db ) -ota( -r 23976 25000 -d -16 -hybridgain ) -split( -end 300 ) -toolame( -m j -b 224 -e )

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : g:\Movies\Alien Directors Cut\alien AC3 T01 3_2ch 448Kbps DELAY -16ms.ac3
[00:00:00:000] | Output: g:\Movies\Alien Directors Cut\test2.mp2
[00:00:00:000] | Floating-Point Process: No
[00:00:00:000] | PostGain normalize to : 0.97
[00:00:00:-16] +-------- AZID -------
[00:00:00:-16] | Input Channels Mode: 3/2, Bitrate: 448kbps
[00:00:00:-16] | Output Stereo mode: Dolby surround compatible
[00:00:00:-16] | Total Gain: 10.000dB, Compression: Normal
[00:00:00:-16] | LFE levels: To LR -3.0dB, To LFE 0.0dB
[00:00:00:-16] | Center mix level: BSI
[00:00:00:-16] | Surround mix level: BSI
[00:00:00:-16] | Dialog normalization: -4dB
[00:00:00:-16] | Rear channels filtering: No
[00:00:00:-16] | Source Sample-Rate: 48.0KHz
[00:00:00:-16] +-------- FRC --------
[00:00:00:-16] | Source Frame-Rate: 23976
[00:00:00:-16] | Dest. Frame-Rate: 25000
[00:00:00:-16] +------ tooLame ------
[00:00:00:-16] | Bitrate method : CBR
[00:00:00:-16] | MP2 bitrate : 224
[00:00:00:-16] | Channels Mode : Joint Stereo
[00:00:00:-16] | Error Protection: Yes
[00:00:00:-16] +---------------------
[00:05:00:016] Gain of 15.1dB had been asserted to file.
[00:05:00:016] Conversion Completed !
[00:05:00:016] Actual Avg. Bitrate : 214kbps
[00:01:50:000] <-- Transcoding Duration

Logging ends : 01/24/04 , 13:41:33.


and here is the Besplit log on the MP2 produced

BeSplit v0.9b6 by DSPguru.
--------------------------

Logging start : 01/24/04 , 13:49:27.

C:\Video\besplit\BeSplit.exe -core( -input G:\Movies\Alien Directors Cut\test2.mp2 -fix -logfile C:\DOCUME~1\LAURIE~1.LAU\LOCALS~1\Temp\BeSliced.txt -type mp2 -output G:\Movies\Alien Directors Cut\test2_Fixed.mp2 ) -profile( BeSliced v0.3 )

[00:00:00:000] +------- BeSplit -----
[00:00:00:000] | Input : G:\Movies\Alien Directors Cut\test2.mp2
[00:00:00:000] | Source Sample-Rate: 48.0KHz
[00:00:00:000] | Channels Count: 2, Bitrate: 224kbps
[00:00:00:000] | Output : G:\Movies\Alien Directors Cut\test2_Fixed.mp2
[00:00:00:000] +---------------------
[00:00:10:272] Stream error : Sync found after 671 bytes
[00:01:00:936] Stream error : Sync found after 672 bytes
[00:01:20:016] Stream error : Sync found after 671 bytes
[00:01:43:248] Stream error : Sync found after 671 bytes
[00:02:01:128] Stream error : Sync found after 671 bytes
[00:02:19:296] Stream error : Sync found after 672 bytes
[00:02:20:088] Stream error : Sync found after 672 bytes
[00:02:31:992] Stream error : Sync found after 509 bytes
[00:02:32:016] Stream error : Sync found after 833 bytes
[00:04:47:472] | Writing G:\Movies\Alien Directors Cut\test2_Fixed.mp2
[00:04:47:472] +---------------------
[00:04:47:472] Operation Completed !
[00:00:01:000] <-- Process Duration
Logging ends : 01/24/04 , 13:49:28.

As I said, run again without Hybridgain and all is ok. I have also tried this with MP2ENC rather than TOOLAME and get the same results.

At the moment, I'm getting round this by using a two-stage process: Convert the AC3 to WAV with Hybridgain, then the WAV to MP2 with FRC.

Am I doing something obviously wrong here?

DSPguru
24th January 2004, 22:24
thank you for this bugreport. i already got this report before, and this bug (from some strange reason) is not deterministic, eg, it appears only on some computers.
if you'd try processing the same commandline on another computer, you might get different result.
Originally posted by slolsby
At the moment, I'm getting round this by using a two-stage process: Convert the AC3 to WAV with Hybridgain, then the WAV to MP2 with FRC.a more elegant solution would be to use pregain on a direct ac3->mp2 process.
btw, it appears that mp2enc is more stable than toolame, so you might consider to use mp2enc.