View Full Version : ac3/dts/mpa/wav delay+cut tool: v1.2.0.4
jsoto
24th February 2004, 22:14
Hi all,
I've written a tool able to manage dts and ac3 for:
- cutting
- delay correction
- fix crc errors (only in ac3)
May be someone finds it useful...
: Deleted the links, not updated
Web sites
http://www.videohelp.com/~jsoto
http://jsoto.posunplugged.com/
Any bug report will be welcome
jsoto
patja
25th February 2004, 03:04
Cool. I record HDTV programming and there are often errors in the AC3 audio that I've had to run through ac3fix. But then the audio would get out of synch with the video. Would I be correct in hoping that using this tool, with the option to replace CRC errors with Silience, would keep the audio in synch with the video?
I am trying it now.
What does the message "some basic parameters changed between frame #1 and this frame" mean? I get row after row of this message.
imel6
25th February 2004, 03:40
Nice. Lookign forward to more development -
multiple cuts at once
cut by frame
Thanks for the tool
daphy
25th February 2004, 09:56
new developments are always welcome on this board :D
so letīs check it out ;)
CYA Daphy
irulat
25th February 2004, 10:17
Excellent work. Excuse the naievity, but would it be a big jump in capabilities for a tool to allow a volume change?
UNICO
25th February 2004, 12:05
Great tool!
What about "delaycut.dll"? I'm afraid I wouldn't be the only one that would merge it into his own DVD->DivX app... or am I??? :eek:
Thanks
Joan
SeeMoreDigital
25th February 2004, 13:47
Fab tool!
Just used it to create a 000ms AC3 clip from a -300ms AC3 clip.
I then converted the AC3 stream to AAC stream prior to muxing with an XviD Mpeg4 video stream into an MP4 container!
Everything was very nicely in sync!
Over the past few weeks I've been experimenting with converting Mpeg2/AC3 .TS HiDef TV captures to anamorphic Mpeg4/AAC .MP4 and this tool looks like it can do the business!
However, you may not be aware that a lot of HiDef TV broadcasts in Japan use AAC audio (not AC3). And, when the AAC audio stream is demuxed from the Mpeg2 video stream the AAC stream becomes delayed....
So it would really be great if your tool could fix the delay in AAC audio streams too!
Cheers and many thanks
depressya
25th February 2004, 17:25
cool tool :) and what about normalizing tool for ac3 files? :) it could be useful tool like this for videoclip compilations from different dvd's
gizmau
25th February 2004, 20:13
@SeeMoreDigital
are you sure that your cutted track came out at 0ms?
afaik ac3 has fixed frame duration of 32ms, which would result in an offset of 12ms, which is virtually a zero-delay due to the frame duration of 40ms (pal).
i am if i remember right, but didnt besplit allready cut dts and aac, too? maybe its worth a try (again...).
jsoto
25th February 2004, 20:56
Too much interest for this little prog (I found the reason, it was mentioned in doom9 news...)
Well, some clarifications:
- I've written this tool just to be able to cut dts tracks. The rest of features are already supported by freeware (ac3 delay corrector, BeSweet). I didn't know besplit was able to cut dts...
- This is a simple tool, which only manages frames.
@patja
"some basic parameters changed between frame #1 and this frame.."
This message advices about a major change (bitrate, framesize, etc) between first frame and the current one. I know I have to modify this, only one message per change..
Target file calculations are done using framelength (taken from the first frame) so if there is a major change on this, probably the output file will be unuseful.
with the option to replace CRC errors with Silence
This is the "normal" behavior of a tool like this (IIRC BeSweet does the same). But in the case of an uncompleted frame, you really do not know how many frames have been lost, and there is no way to recover the synch.
@imel6
multiple cuts at once: You can use CLI support. Seeking is fast.
cut by frame: I'll look into it, but I'm now busy in other stuff..
@irulat
to allow a volume change?
delaycut is a very SIMPLE tool. Only cuts/adds frames, it is unable to decode, sorry. The maximum it could do is to change some BSI parameters (but IMHO it has no sense)
jsoto
xixi2000
26th February 2004, 03:53
Cool,2DISK DVD black frame ok?
try
irulat
26th February 2004, 10:03
@jsoto
delaycut is a very SIMPLE tool. Only cuts/adds frames, it is unable to decode, sorry. The maximum it could do is to change some BSI parameters (but IMHO it has no sense)
Thank's for the reply, all the same!
SeeMoreDigital
26th February 2004, 21:08
Originally posted by gizmau
@SeeMoreDigital
are you sure that your cutted track came out at 0ms?
afaik ac3 has fixed frame duration of 32ms, which would result in an offset of 12ms, which is virtually a zero-delay due to the frame duration of 40ms (pal)... You're right. It was just a fluke that I managed to get the audio in sync with the video!
Anyway, speaking as a total beginner to this sort of application. Do you have any tips on how I can convert an AC3 file with -504ms delay to 000ms?
Cheers
jsoto
27th February 2004, 18:24
@xixi2000
2DISK DVD black frame ok? What does it mean? :confused:
@SeeMoreDigital
Do you have any tips on how I can convert an AC3 file with -504ms delay to 000ms?
Using this tool (or any other loseless one) you will be able to correct delay in frame steps (32 msec). This method gives a maximum of 1/2 frame (+-16 msec) of delay error. (Delaycut shows this error in the parameter NotFixedDelay of target file info).
For an exact delay correction you will need to reencode, which, IMHO, is a worse solution in terms of quality.
BTW, delay can also be corrected in a loseless way during DVD authoring (if this is final destination of the ac3 file).
jsoto
Trahald
2nd March 2004, 05:48
Your app has a hard time with files fixed with the old ac3 delay corrector. It isnt able to detect the ac3/dts settings and therefor wont process the file. It does fine with files that ac3 corrector makes no correction on (ie you create a 'fix' file but without setting a delay) but with a delay , delaycut doesnt read it. the format might be slightly off after the delay, but everything else (scenarist, ac3 correcter itself, dvd lab etc) has no problem with the file. Just wondering if you can take a look at adding something so it can handle these files.
Thanx for the great app, btw.
jsoto
2nd March 2004, 23:51
@Trahald
the old ac3 delay corrector.
Which one?. I've tested v2.0 and v2.1b1 without any problems.
Could you give me more detailed info?
jsoto
Trahald
3rd March 2004, 20:20
2.1.b.1
so far.. if i take an ac3.. and with 2.1.b.1 i set -212ms delay (made up a number for the example).. then i load that file into delaycut. delay cut will not pull any info about the ac3/dts and there for will fail to process the file
now if i take the new ac3 that 2.1.b.1 delay corrected, and run it through 2.1.b.1 again but with 0 delay (so essentially it just rewrites the file with a new name) .. the new file loads into delaycut fine.. shows all ac3 info and will perform any requested operations
it does it on every file ive tried it on that 2.1.b.1 has delay fixed. shows this message
====== INPUT FILE INFO ========================
File is unknown
=============================================
====== TARGET FILE INFO ======================
=============================================
if i load the same file through 2.1.b.1, it it shows all the details and if i make a new file from that file but with delay 0 - then rerun the new file with delay cut, delaycut shows the full ac3 details
example
====== INPUT FILE INFO ========================
File is ac3
Bitrate (kbit/s) 192
Act rate (kbit/s) 192.000
File size (bytes) 139385088
Channels mode 1/0: C
Low Frec Effects LFE: Not present
Duration 01:36:47.712
Frame length (ms) 32.000000
Frames/second 31.250000
Num of frames 181491
Bytes per Frame 768
Size % Framesize 0
CRC present: YES
=============================================
====== TARGET FILE INFO ======================
Start Frame 0
End Frame 181490
Num of Frames 181491
Duration 01:36:47.712
NotFixedDelay 0.0000
=============================================
jsoto
3rd March 2004, 20:46
Humm, it's a mono track...
I never tested one, and not sure if I have access to one, could you cut one second and send it to me?
jsoto
Trahald
4th March 2004, 01:32
that just happened to be one i picked.. same thing happens with DTS or 5.1 ac3 ;)
also the version i use is the one that is included with doitfast4u.. i dont know if its been altered at all.. i dont thing so.. but if you may want to use that version if your not already .. thanx
jsoto
4th March 2004, 01:58
May be it's a little bit stupid, but delaycut needs file extensions .ac3 or .dts, are you changing it with ac3 delay corrector?.
I've tested several dts, 5.1 ac3 and 2/0 ac3 without any problems...
jsoto
Trahald
4th March 2004, 02:05
thanx for the quick reply.. well doitfast4u names them with the proper extensions. like i said.. everything i load them into takes them fine.. just not delay cut :/
Trahald
4th March 2004, 15:37
Ahh.. I figured it out... it has to do with the extension.. but not the way you think.. doitfast4u uses all capitals in the extension AC3 and DTS... i guess your app only checks for lowercase. once i rename it from .AC3 to .ac3 .. voila! delaycut takes it without a problem
nicolati
4th March 2004, 15:44
Even to me it gives the same error. It doesn't like the ac3 file (unknown) and any operations done on this file gives "Finished with errors". This file is an Ac3 doing with the VOBID process of DoItFast4U.
Bye.
nicolati
jsoto
4th March 2004, 23:55
Thanks Trahald,
Stupid bug.. fixed. Please download again same links.
jsoto
Trahald
5th March 2004, 00:44
thanks for the fast fix.. will test when i get home
gatormac
12th March 2004, 05:00
Thank you! I've been looking for something like this.
nicolati
16th March 2004, 12:37
Hi. Why doesn't delaycut correct the lenght correctly. I do an example: I have an Ac3 of 19.328 seconds, if I set an end lenght of -200 (msec), it will be 19.712; instead it should be 19.528. Why does delaycut does this thing???
Bye.
nicolati
jsoto
16th March 2004, 19:35
I cannot reproduce the problem. Please, could you post the complete info window?
jsoto
wasp
23rd March 2004, 10:13
Simple question.
I have got an ac3 audio stream, which has got a -280ms delay.
I'm trying to set it to 0ms.
Which settings I must put into delaycut to do this?
Because I still have: NotFixedDelay= 8.0000
?
jsoto
23rd March 2004, 20:29
@wasp
280 msec is not an exact multiple of 32 msec. The closest multiple is 288 msec (=9x32), which is the value selected by delaycut. This will give you a "delay error" of 8 msec which is virtually zero.
To get a real zero delay it is required to recode the ac3, but IMHO it will give a worse quality than 8 msec of "delay error".
jsoto
D3s7
24th March 2004, 07:47
jsoto :
thanks again for such a great tool and the source...
I was having a problem finding correct duration lengths for DTS for ScenAid and low and behold the slight corrections you have to bitrate were the key
You run across those somewhere?
jsoto
24th March 2004, 12:53
@D3s7
thanks again...
You are welcome.
correct duration lengths for DTS
Me too, but finally I understood the difference between actual and targeted in dts specs (http://webapp.etsi.org/action%5CPU/20021224/ts_102114v010201p.pdf) , page 14, table 5-8.
jsoto
numlock
13th August 2004, 18:05
The download links don't work. Is htere a mirror somewhere ?
jsoto
22nd August 2004, 00:40
A performance improvement...
v1.1.0.3 Changelog
Improvement: Using fread and fwrite functions, delaycut is much
faster than before.
Changed: Log window automaticaly scrolls to the end
www.posunplugged.com/jsoto
www.iespana.es/jsoto
@numlock
Sometimes iespana.es is down...
jsoto
Emp3r0r
15th November 2004, 18:50
jsoto: thanks for your progam
I have a small request: can you make delaycut automatically detect a delay in an AC3 filename use that for the -start value.
For example, DGIndex usually spits out files that look like:
file 2ch DELAY -133ms.ac3
Running delaycut from command line would look like
delaycut "file 2ch DELAY -133ms.ac3"
instead of
delaycut -start -133 "file 2ch DELAY -133ms.ac3"
Also, can you add an output parameter so we can specify the output filename.
Thanks
SeeMoreDigital
15th November 2004, 18:59
Nice idea :)
Cheers
jsoto
15th November 2004, 20:07
Originally posted by Emp3r0r
I have a small request: can you make delaycut automatically detect a delay in an AC3 filename use that for the -start value.
I'll look into it.
Also, can you add an output parameter so we can specify the output filename.
Sure.
jsoto
planet1
16th November 2004, 01:06
Hi jsoto,
first "gracias por este gran pedazo de software", ;)
could you implement some drag and drop mode into the tool - should speed up things...
last but not least - since your tool has a pretty good dts support - could you write a programme which extracts a DTS stream from a WAV container ?
Basically this covers only dts from Audio CDs (5.1 Music Discs)
[if we ignore some exotic dts-wavs recorded from LaserDiscs]:
http://dtspassion.free.fr/Cd%20Audio.htm
http://www.dtsentertainment.com/music-featured.php
BeSplit from dspguru and DTS-Parser from hypercube used to do the job, but they are far from beeing perfect - they often create weird dts outputs, which play horrible or even make your delaycut freeze ;).
adios
btw are there any other ways to find out the delay of an ac3 or dts file than using vobedit ?
jsoto
16th November 2004, 18:41
Originally posted by planet1
could you implement some drag and drop mode into the tool - should speed up things...
I'll look into it.
could you write a programme which extracts a DTS stream from a WAV container ? No in this tool.
are there any other ways to find out the delay of an ac3 or dts file than using vobedit ? VobBlanker and DVD2AVI also give you the delay. I prefer to use VobBlanker to get the delay ;)
jsoto
jsoto
22nd November 2004, 22:48
v1.2.0.1
Added: mpa (fsample=48k) support.
Added: drag/drop files in main dialog (thanks to jeanl for the example) and also in icon ("open with")
Added: -auto option in CLI mode: autodetect the delay in input filename (assuming DVD2AVI naming style)
Added: -out option in CLI mode to specify the output filename.
jsoto
jorel
23rd November 2004, 00:49
great news.
thanks!
:)
GZZ
29th November 2004, 01:46
What about delaycut in LPCM file (wave files). if its possible to correct these, will it then be in the next version ??
GZZ
GZZ
29th November 2004, 12:52
I can't get delaycut working with my MPA files. I get nothing but noise in my output file are applying delay and yes my MPA file are 48khz
It still works fine with DTS and AC3 sound, but not with MPA files..:/
GZZ
jsoto
29th November 2004, 14:07
It still works fine with DTS and AC3 sound, but not with MPA files True. Seems I've broken something in the last build. I'll fix it this night.
What about delaycut in LPCM file (wave files). if its possible to correct these, will it then be in the next version ?? Mmm. May be in a future. Wave files are not based on frames, but I can work with one sample as "one frame".
jsoto
jsoto
30th November 2004, 14:16
v1.2.0.2
BugFix: mpa was broken in 1.2.0.1
BugFix: Info dlg refresh.
jsoto
buzzqw
30th November 2004, 15:49
could be possible to implement an auto-detect delay value based on filename ? Es. "Movie AC3 T02 2_0ch 256Kbps DELAY 80ms.ac3" has a delay of 80...
Would be very usefull for command line application :)
Thanks
BHH
jsoto
30th November 2004, 19:43
@buzzqw
could be possible to implement an auto-detect delay value based on filename ? Es. "Movie AC3 T02 2_0ch 256Kbps DELAY 80ms.ac3" has a delay of 80...
:confused: :confused: do you mean it doesn't work?.
Already requested by Emp3r0r and included in 1.2.0.1.
Added: -auto option in CLI mode: autodetect the delay in input filename (assuming DVD2AVI naming style)
jsoto
buzzqw
1st December 2004, 08:25
my mistake, this fuction is already present
but for me is broken
here the command line
---> delaycut.exe -auto -out aaa.ac3 "qqq AC3 T02 2_0ch 192Kbps DELAY -144ms.ac3"
---> log
[Input info]
Bitrate=0
Actual rate=0.000000
TotalFrames=0
Bytesperframe=0
Filesize=0
FrameDuration= 0.0000
Framespersecond= 0.0000
Duration=
Channels mode=
LFE=
[Target info]
StartFrame=0
EndFrame=0
NotFixedDelay=-144.0000
Duration=00:00:00.000
EDIT : this command produce a 0-byte aaa.ac3 file
---> only info
[Input info]
Bitrate=192
Actual rate=192.000000
TotalFrames=1839
Bytesperframe=768
Filesize=1412925
FrameDuration= 32.0000
Framespersecond= 31.2500
Duration=00:00:58.871
Channels mode=2/0: L+R
LFE=LFE: Not present
i will try with longer audio file
Thanks again
BHH
jsoto
1st December 2004, 18:42
You're right. It's broken :( . I don't understand how can I do it so bad ...
Anyway, try again with 1.2.0.3, already uploaded
v1.2.0.3
BugFix: -auto option in CLI mode was broken
jsoto
buzzqw
2nd December 2004, 08:08
It's OK !
Thanks Jsoto !
delaycut.exe -auto -out fix.ac3 "qqq AC3 T02 2_0ch 192Kbps DELAY 144
ms.ac3"
--->log
[Input info]
Bitrate=192
Actual rate=192.000000
TotalFrames=1839
Bytesperframe=768
Filesize=1412925
FrameDuration= 32.0000
Framespersecond= 31.2500
Duration=00:00:58.871
Channels mode=2/0: L+R
LFE=LFE: Not present
[Target info]
StartFrame=-5
EndFrame=1838
NotFixedDelay=-16.0000
Duration=00:00:59.008
====== PROCESSING LOG ======================
Number of written frames = 1844
Number of Errors= 0
A final question: is this way of fix audio delay the same (or produce the same result) as BeSweet when transoding from ac3 to xxx ?
Thanks
BHH
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.