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 > General > Audio encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 23rd November 2006, 04:26   #101  |  Link
ganeshpetkar
Registered User
 
Join Date: Sep 2006
Posts: 8
AC3 Decoder

Hi all,
I m doing AC3 Decoder code development.
In that i got doubt, that how to transform LFE samples into time domain. since we are using 256 and 512 blocklength transform.
Here we will get 7 LFE samples after mantissa decoding.
and i am in confusion that whether we should mixup with FullBandwidth channel. please
Let me know the solution......
ganeshpetkar is offline   Reply With Quote
Old 23rd November 2006, 21:55   #102  |  Link
jsoto
Just a Member
 
Join Date: Nov 2002
Location: Spain
Posts: 2,067
Sorry I have no idea, but DGindex is open source and is able to decode ac3. You can take a look to the sources.

http://neuron2.net/dgmpgdec/

Good luck!.

jsoto
__________________
Web sites with my tools
http://download.videohelp.com/jsoto
http://jsoto.posunplugged.com/
jsoto is offline   Reply With Quote
Old 27th November 2006, 11:18   #103  |  Link
ganeshpetkar
Registered User
 
Join Date: Sep 2006
Posts: 8
standard test vectors for AC-3 Decoder

Hi all,
I m doing AC-3 Decoder, so i need some Standard Test vectors to test it. So can any body send me standard test vetcor or Link..


Regards
Ganesh
ganeshpetkar is offline   Reply With Quote
Old 5th January 2007, 15:00   #104  |  Link
MattO
Registered User
 
Join Date: Jun 2002
Location: Broome, AUS.
Posts: 140
Stupid question time

I have a .AC3 file with -128ms delay, created in DGIndex, but the delay is not recognised in delaycut.

In which box do I put the -128, and what boxes do I need to check? I am assuming I enter '-128' in the 'Start' box under 'Delay', and that I have to check 'Original Length', but is this correct?

Thank you for any answers
MattO is offline   Reply With Quote
Old 5th January 2007, 15:48   #105  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
A negative delay means cut the stream, then you need check 'Cut file' and put
Start: 128
End: you need calculate Num of Frames x Frame length (ms)

You can't obtain always the exact cut without reencode because DelayCut can only cut a exact number of frames i. e. a Frame length multiple.

With 48 KHz the Frame length is 32 ms then cutting 4 frames the cut is exact.
tebasuna51 is offline   Reply With Quote
Old 5th January 2007, 15:50   #106  |  Link
jsoto
Just a Member
 
Join Date: Nov 2002
Location: Spain
Posts: 2,067
delaycut recognizes the delay in the file name only in CLI mode

You have to write -128 in start (msec) box.
You can check or not "original length".

Because your're fixing a negative delay, some frames from the beginning of the file will be dropped (you can see it in "target file info". Checking "original length", the same number of frames (silences) will be added at the end of the file.

EDIT: Didn't see tebasuna51 answer (I was replying).
Yes, using cut is other way in negative delays, but I prefer to use the delay area, (it is more clear to me, and can be also used with positive delays)

jsoto
__________________
Web sites with my tools
http://download.videohelp.com/jsoto
http://jsoto.posunplugged.com/

Last edited by jsoto; 5th January 2007 at 16:07.
jsoto is offline   Reply With Quote
Old 6th January 2007, 16:38   #107  |  Link
MattO
Registered User
 
Join Date: Jun 2002
Location: Broome, AUS.
Posts: 140
Thanks for the help guys
MattO is offline   Reply With Quote
Old 10th May 2007, 06:35   #108  |  Link
Revgen
Registered User
 
Join Date: Sep 2004
Location: Near LA, California, USA
Posts: 1,545
@jsoto

Do you have any plans to include Dolby Digital Plus (EC3, DD+) cutting support?
__________________
Pirate: Now how would you like to die? Would you like to have your head chopped off or be burned at the stake?

Curly: Burned at the stake!

Moe: Why?

Curly: A hot steak is always better than a cold chop.
Revgen is offline   Reply With Quote
Old 11th September 2007, 20:59   #109  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
I've just updated delaycut to v1.3.0.0 with full E-AC3 support. Here's the download with "delaycut.exe" and the full source code:

http://madshi.net/delaycut.rar

Of course jsoto is greatly welcome to take the changes over into his code base. And many thanks to him for his extremely useful tool.
madshi is offline   Reply With Quote
Old 12th September 2007, 22:04   #110  |  Link
menlvd
Registered User
 
Join Date: May 2006
Location: Moscow
Posts: 97
Quote:
Originally Posted by madshi View Post
I've just updated delaycut to v1.3.0.0 with full E-AC3 support. Here's the download with "delaycut.exe" and the full source code:

http://madshi.net/delaycut.rar

Of course jsoto is greatly welcome to take the changes over into his code base. And many thanks to him for his extremely useful tool.
menlvd is offline   Reply With Quote
Old 12th September 2007, 22:19   #111  |  Link
jsoto
Just a Member
 
Join Date: Nov 2002
Location: Spain
Posts: 2,067
Quote:
Originally Posted by madshi View Post
I've just updated delaycut to v1.3.0.0 with full E-AC3 support. Here's the download with "delaycut.exe" and the full source code:
This is one of the great things of the open source code. Everybody can contribute.
jsoto
__________________
Web sites with my tools
http://download.videohelp.com/jsoto
http://jsoto.posunplugged.com/
jsoto is offline   Reply With Quote
Old 17th October 2007, 00:07   #112  |  Link
janger
Registered User
 
Join Date: Oct 2004
Posts: 7
Quote:
Originally Posted by MattO View Post
Stupid question time

I have a .AC3 file with -128ms delay, created in DGIndex...
In which box do I put the -128.....?
Quote:
Originally Posted by jsoto View Post
You have to write -128 in start (msec) box.
You can check or not "original length".
Is this right? I thought negative delay values as reported by DGIndex, Vobedit etc meant the audio comes before the video. But I just did a test with a demuxed vob that has no delay. I set the "start" value to -1000 and the audio definitely plays 1 second too early. So wouldn't that mean if I have a vob that Vobedit reports has a -80ms delay, entering that value in the "start" box would now make it (-80 + -80) = -160ms delay? Where is my thinking wrong?
janger is offline   Reply With Quote
Old 17th October 2007, 00:29   #113  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Quote:
Originally Posted by janger View Post
So wouldn't that mean if I have a vob that Vobedit reports has a -80ms delay, entering that value in the "start" box would now make it (-80 + -80) = -160ms delay? Where is my thinking wrong?
When you put -80 in "start" box, the ac3 fixed don't have the first 96 ms (always a 32 ms multiple) than original ac3, then can be muxed with the original video with +16 ms delay.

Ok?
tebasuna51 is offline   Reply With Quote
Old 17th October 2007, 00:44   #114  |  Link
janger
Registered User
 
Join Date: Oct 2004
Posts: 7
Yes but that sort of means it's removing the first frames and "pulling the rest of the audio to the beginning" doesn't it? So if the audio already has a negative delay, which I'm assuming means it comes before the video, then putting a negative value in the start box would make it come even more before the video, doing twice the damage. Won't it?
janger is offline   Reply With Quote
Old 17th October 2007, 02:28   #115  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
@janger
A sample.
A gunshot image occurs at frame 5 and the gunshot sound at frame 7, 80 ms later (if 25 fps).
You need start to play the sound 80 ms before than video to synchronize audio and video. DGIndex inform a delay needed of -80 ms.

To obtain the sync you can also cut the first 80 ms and play audio and video at same time.
tebasuna51 is offline   Reply With Quote
Old 17th October 2007, 04:34   #116  |  Link
janger
Registered User
 
Join Date: Oct 2004
Posts: 7
tebasuna, are you saying that the values as reported by vobedit, DGindex etc, are the correction values, and not the actual delay?

What I mean is, in your example the audio has a delay (delay means "occur after") of 80ms, but you say DGIndex gives the negative of that, -80ms. This is where I'm getting confused. I always thought the values these programs reported was how much the audio was delayed compared to the video, not the amount needed for correcting it.
janger is offline   Reply With Quote
Old 17th October 2007, 11:53   #117  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Quote:
Originally Posted by janger View Post
tebasuna, are you saying that the values as reported by vobedit, DGindex etc, are the correction values, and not the actual delay?
Yep

If you load in BeLight-BeSweet a file from DGIndex:
VTS_01_6 T01 2_0ch 192Kbps DELAY -112ms.ac3

automatically the Delay box is filled with -112 ms, and the first 112 ms are cut.
tebasuna51 is offline   Reply With Quote
Old 13th April 2008, 20:09   #118  |  Link
digifruitella
Registered User
 
Join Date: Feb 2008
Posts: 66
i've got a track that plays about 4 seconds before people say anything, 4 seconds is 4000ms... how do I fix this?
digifruitella is offline   Reply With Quote
Old 20th November 2008, 11:41   #119  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Quote:
Originally Posted by Thunderbolt8 View Post
got a problem with converting a 2.0 ac3 track to .wavs: both outcoming wav files are slowed massively down, meaning all sounds and voices are played like ultra slowmotion.
can't say though if this is a specific problem of this single file or a general problem of 2.0 ac3 tracks. only had a 5.1 ac3 track to compare and that one played normaly after wave conversion.

edit: just noticed the track is from a mpeg2 cap and according to mpegrepair 5.1, while eac3to only recognizes it as 2.0

20mb sample of the ac3 track: http://www.sendspace.com/file/nbry8n

50mb sample of the .ts: http://www.sendspace.com/file/03nqcj
The ac3 track is a mix of 2.0 and 5.1 content (typical from a capture) and can't be managed correctly by many soft.

You need fix the track with DelayCut:

1) Open your sample se7ensplit.ac3 and PROCESS the file.

2) You have a log like this:
"Time 00:00:01.120; Frame#= 36. Some basic parameters changed between Frame #1 and this frame"
That means: the first 35 frames are 2.0 but at frame 36 you have other parameters.

3) Put -1120 at 'Delay -> Start' and PROCESS one more time. The first 35 frames are deleted.

4) Open se7ensplit_fixed.ac3 in DelayCut, now you have the first frame 5.1.

Now you can add a 'Delay -> Start' 1120 to compensate the deleted frames in order to maintain the sync.

In your sample the rest of frames are 5.1 but in the full track maybe there are more 2.0 frames (commercials adv.). You need fix the full track.

@To developers.
This is a very common issue, maybe we can add to Delaycut the option to manage the "Some basic parameters changed.." frames like CRC errors:
Ignore, Silence or Skip (we can't Fix, then if Fix is selected the frames must be Silenced).
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 20th November 2008 at 11:52.
tebasuna51 is offline   Reply With Quote
Old 20th November 2008, 16:34   #120  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
@jsoto, madshi
I think we need manage the frames with 'basic parameters changed' like wrong frames or with bad CRC.
Now these frames are 'Ignored' with the result of invalid streams.
With the changes we can obtain valid streams with 'Silence' or 'Skip' options (preserving or not the sync):
Code:
--- delayac3.cpp	Thu Nov 20 14:53:02 2008
+++ delayac3_mod.cpp	Thu Nov 20 14:49:02 2008
@@ -1519,17 +1519,14 @@
        fscodn != fileinfo->fscod ||
        bsmodn != fileinfo->bsmod || acmodn != fileinfo->acmod)
    {
-       fileinfo->fscod=fscodn;
-       fileinfo->frmsizecod= iFrmsizecodn;
-       fileinfo->bsmod=bsmodn;
-       fileinfo->acmod= acmodn;
-
        nuerrors++;
        csAux.Format (_T("Time %s; Frame#= %I64d. Some basic parameters changed between Frame #%I64d and this frame"),
                csTime, i64+1, fileinfo->i64frameinfo);
        printlog(csAux);
-       fileinfo->i64frameinfo=i64+1;
-   }
+       bCRCError=true;
+       if (m_iCrc==CRC_SKIP) f_writeframe=WF_SKIP;
+       else if ((m_iCrc==CRC_SILENCE) || (m_iCrc==CRC_FIX)) f_writeframe=WF_SILENCE;
+   } else {

    // CRC calculation and fixing.

@@ -1582,6 +1579,7 @@
        }
        else if (m_iCrc==CRC_SKIP) f_writeframe=WF_SKIP;
        else if (m_iCrc==CRC_SILENCE) f_writeframe=WF_SILENCE;
+   }
   }

  }
Soft comments:
- Preserve the initial parameters from first frame (fileinfo->).
- Like framelength can vary we make bCRCError=true to force search new header inside the wrong frame.
- Ignore, Skip or Silence like CRC error (f_writeframe).
- We don't need CRC calculation in wrong frame (else).
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 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 18:54.


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