View Full Version : delaycut - ac3/eac3/dts/mpa/wav delay+cut tool: v1.4.3.7
tebasuna51
22nd November 2011, 23:52
If possible, can zero refers to "the end of file" in the cutting end field? (like in avisynth's trim)
I'm boring to calculate it every-times.
Use 'Delay' box instead 'Cutting'
Stereodude
23rd November 2011, 00:34
Yeah, if it's not doing so something is wrong. Like I said, it seems to work fine for me with the latest 1.4.3.1. So if you can test with that version and you get something different, I'd love to know.Okay, this part seems to work fine. I guess I didn't realize that's what it was doing before.
I will await a bugfix for loopy math that spits out really large negative numbers.
amtm
23rd November 2011, 01:30
edit:-
also save with other name is impossible, even changing path in the field, even with the "save as" windows too.
edit2:-
it saves where it decides.
I found the issue with it not changing the path when you use the save as screen. But when I edit the filepath in the edit field directory it saves just fine to the alternate directory. Does it popup an error for you?
Okay, this part seems to work fine. I guess I didn't realize that's what it was doing before.
I will await a bugfix for loopy math that spits out really large negative numbers.
I've fixed all the bugs. Just doing a bunch more regression testing to make sure nothing new pops up. Sorry for the wait. :o
amtm
23rd November 2011, 01:43
Okay. Everything is tested and all bugs I can find appear to be fixed. Please give it more testing the feedback has been great. :)
Download here (http://www.videohelp.com/tools?d=delaycut1.4.3.2.zip ) or here (http://www.multiupload.com/WZF4NTJWJQ).
Stereodude
23rd November 2011, 02:11
Okay. Everything is tested and all bugs I can find appear to be fixed. Please give it more testing the feedback has been great. :)
Download here (https://github.com/downloads/athomasm/delaycut/delaycut1.4.3.2.7z) or here (http://www.multiupload.com/WZF4NTJWJQ).It seems to be working for me as expected.
I have one more complaint about the way it works (the old version did it too). In the Cut file area when you enter a value in the start field and then select the end field and type in the end value it deletes the value you just entered in the start and changes it to the first number of the start value. I believe it's because it updates / recalculates after every key stroke and since you can't have the start value after the end value so it sets the start value to the end value which is just 1 number long as you're typing it.
I made a picture to help describe the issue.
http://img843.imageshack.us/img843/1752/dcissue2.th.png (http://img843.imageshack.us/img843/1752/dcissue2.png)
phate89
23rd November 2011, 03:08
hi.. i always use the old 1.2.1.2 version.. yesterday i see this new version and tried it... but my usual script doesn't work...
i use to insert silence or cut parts in an ac3 file.. so i cut in 2 parts the file and i add the delay to the 2nd part to join them after...
i usually use this script:
delaycut -endsplit 800.611 audio.ac3
delaycut -start 3120 -startsplit 800.611 audio.ac3
usually this script create the first file with audio from the start to 800.611 and create the second file with the silence at start and the audio from 800.611 to the end...
with this new version the first line runs... but it creates a copy of the original file without cuts... the second it don't work at all.. if i don't insert a -endsplit it doesn't run... can you fix it?
tebasuna51
23rd November 2011, 11:57
I have one more complaint about the way it works (the old version did it too). In the Cut file area when you enter a value in the start field and then select the end field and type in the end value it deletes the value you just entered in the start and changes it to the first number of the start value. I believe it's because it updates / recalculates after every key stroke and since you can't have the start value after the end value so it sets the start value to the end value which is just 1 number long as you're typing it.
Simple, fill the 'end' value before the 'start' value.
Experienced DelayCut users always do this.
Stereodude
23rd November 2011, 13:12
Simple, fill the 'end' value before the 'start' value.
Experienced DelayCut users always do this.Yes, I realize this is a workaround however, IMHO, it shouldn't be necessary.
amtm
23rd November 2011, 15:26
hi.. i always use the old 1.2.1.2 version.. yesterday i see this new version and tried it... but my usual script doesn't work...
i use to insert silence or cut parts in an ac3 file.. so i cut in 2 parts the file and i add the delay to the 2nd part to join them after...
i usually use this script:
delaycut -endsplit 800.611 audio.ac3
delaycut -start 3120 -startsplit 800.611 audio.ac3
usually this script create the first file with audio from the start to 800.611 and create the second file with the silence at start and the audio from 800.611 to the end...
with this new version the first line runs... but it creates a copy of the original file without cuts... the second it don't work at all.. if i don't insert a -endsplit it doesn't run... can you fix it?
I'll look into it.
To stereodude, yeah I can change it so it just does the check for end cut < start cut when you hit process and will popup an error message. I didn't really like that it did that either I was just mimicking the old behavior so I'm fine with changing it.
Stereodude
23rd November 2011, 19:40
To stereodude, yeah I can change it so it just does the check for end cut < start cut when you hit process and will popup an error message. I didn't really like that it did that either I was just mimicking the old behavior so I'm fine with changing it.Glad to know I wasn't the only person not thrilled with that aspect. Is it possible to have it check after you click out of that field (having typed the full number)? If not checking when you hit process would be cool also.
amtm
23rd November 2011, 19:51
Yeah I'll see which one appears less annoying. Also if you have any other feedback please feel free to keep the ideas coming. I'm more than happy to make tweaks to make the tool better.
phate89
25th November 2011, 01:20
amtm did you ever think to improve the tool allowing insert silence or cut audio inside the file?
you add the points in the audio and the operations (add silence, remove audio, loop the audio) and he make all the changes in one pass...complete basic editing without recompression...
there's nothing like this... eac3to allows to insert silence or remove audio in track but only one for pass (so with 5 editing i have to recreate 5 times the full file), your tool allows cuts and delay but no insert or cut in the middle, besplit only split the file in parts...
I already create my own program to do that based on this tool but everytime i have to split & then join increasing the time and i can't compensate the not fixed delay...
naturally it's not so easy to do but it could be a very useful tool... perfect for me... if you have time think about it...i try to look into the code but it's too much for my skills :(
TDiTP_
25th November 2011, 12:47
One thought about delaycut vs eac3to.
eac3to can not "create" new silent DTS frames which are needed for delay. Instead eac3to simply repeats the very first frame of the audio track as often as necessary to achieve the wanted delay. Normally a DVD audio track begins silent, so this usually works. If your DVD audio track begins non-silent, then eac3to's way of delaying isn't silent, but results in ugly noise, sadly. If there was a free DTS encoder available, I could solve this, but there isn't. For AC3 I'm using Aften to do the audio delay properly and guaranteed-noise-free.
delaycut can do this better, but since it doesn't have a DTS encoder, either, it simply uses a default silent DTS frame - which doesn't have the DTS-ES flag set, of course.
I can add. Delaycut can add "standart" DTS frames only (they are use on DVD; 1006 against 1024 "bytes per frame" for 768) and if we add such frame to DTS from Blu-ray, then eac3to with ArcSoft/Sonic/Nero will not be able to decode it (but libav can). => we can't use it to work with DTS from Blu-ray.
For example. Look at this (http://www.mediafire.com/?ees21hdwd9nzw1b) stream from BD. Try to decode it (by ArcSoft/Sonic/Nero) and then using delaycut add delay and retry decode. Then cut delay and retry again :)
Can you add Blu-ray's dts frames to "default silent DTS frame" of delaycut?
Midzuki
25th November 2011, 16:21
^ @ TDiTP_
«Normal» :) "Blu-Ray DTS" can be anywhere between 1.0@192kbps and 5.1@1509kbps. So, delaycut would have to be shipped together with a "small truckload" :) of "silent DTS sample files" :confused: :confused: :confused:
TDiTP_
25th November 2011, 17:39
«Normal» "Blu-Ray DTS" can be anywhere between 1.0@192kbps and 5.1@1509kbps
Yes :) (and 5.1@1510kbps can be too).
Addition to my previous post. If we talking about "Targeted BitRate"=1536:
1). Most of "Blu-ray DTS" (all that i saw, but can be exceptions) have 2012 bytes per frame.
2). All "core DTS" have 2012 bytes per frame. This is most important. At least for this we must have support for such frames in delaycut, which can add only 2013.
3). In DTS-HD M.A.S. when we select "Destination Format = DVD (.cpt)" we always get 2013 bytes per frame. If "Destination Format = Blu-ray disc (.dtshd)" we always get 2012 bytes per frame (in dts or "core dts").
Stereodude
26th November 2011, 22:59
I found another couple of bugs.
1) Changes to the video FPS field don't cause the program to recalculate unless you change another field or change an checkbox.
2) The starting offset delay doesn't re-autopopulate / recalculate if re-opening the same file or changing the FPS.
3) Changing from frames to ms causes the starting offset delay to decrease each time you switch
4) The starting offset delay isn't subtracted from the cut file End setting so the output audio is too long
sl1pkn07
28th November 2011, 12:15
i have problems build in my archlinux
sl1pkn07@sL1pKn07 delaycut $ qmake -makefile delaycut.pro
sl1pkn07@sL1pKn07 delaycut $ make
g++ -m64 -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -Wl,-O1 -o delaycut -L/usr/lib -lQtGui -lQtCore -lpthread
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../lib/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: ld devolvió el estado de salida 1
make: *** [delaycut] Error 1
sl1pkn07@sL1pKn07 delaycut $
amtm
2nd December 2011, 19:00
Sorry, I've been away for a bit. Will address the bugs this weekend. sl1pkn07 your build problems are due to their being two different configs in the pro file. You need to add a CONFIG+=Linux on your qmake line. I'll update the readme with information about building from source so that's more obvious.
sl1pkn07
2nd December 2011, 23:52
oh! thanks
Stereodude
3rd December 2011, 05:19
Sorry, I've been away for a bit.We were about to send out search parties. :scared:
phate89
4th December 2011, 13:00
Sorry, I've been away for a bit. Will address the bugs this weekend. sl1pkn07 your build problems are due to their being two different configs in the pro file. You need to add a CONFIG+=Linux on your qmake line. I'll update the readme with information about building from source so that's more obvious.
don't worry take your time...
you think it's possible to make a program like the one i described before? i'm trying to look at the C++ code to understand how it works and try to do it myself but is far too adanced for me... the first problem is that i have no clue how are composed the files...
You think it's theorically possible?
amtm
5th December 2011, 20:02
Yeah it can be done. I'm just trying to work out the best way to implement it.
phate89
5th December 2011, 20:26
Yeah it can be done. I'm just trying to work out the best way to implement it.
UUh great! :D
Unother idea that could be useful in that program is a loop flag.... if there's the loop flag in that edit instead of inserting some silence it repeat the previous frames...
tebasuna51
6th December 2011, 13:18
Another suggestion to DelayCut improvment.
If we have a ac3 file with mixed content (for instance a TV capture with 5.1 frames from a movie and 2.0 frames from commercials), DelayCut show a message like:
Time 00:00:20.032; Frame#= 627. Some basic parameters changed between Frame #1 and this frame
But the output file remains invalid (a valid ac3 stream must contain only the same frametypes).
Also the 'Num of frames' and 'Duration' are incorrect because the 'FrameSize' change.
I suggest a flag with 3 options:
1) Ignore FrameType changes (like now)
2) Extract only frames like first FrameType.
3) Extract only 5.1 frames.
phate89
9th December 2011, 16:50
Another suggestion to DelayCut improvment.
If we have a ac3 file with mixed content (for instance a TV capture with 5.1 frames from a movie and 2.0 frames from commercials), DelayCut show a message like:
Time 00:00:20.032; Frame#= 627. Some basic parameters changed between Frame #1 and this frame
But the output file remains invalid (a valid ac3 stream must contain only the same frametypes).
Also the 'Num of frames' and 'Duration' are incorrect because the 'FrameSize' change.
I suggest a flag with 3 options:
1) Ignore FrameType changes (like now)
2) Extract only frames like first FrameType.
3) Extract only 5.1 frames.
very good idea...could be a easy way to remove ads too!
usually ads are 2.0 so will be removed automatically
amtm
12th December 2011, 17:49
Sorry guys I've been really bad about getting back to this. I've have written down all the suggestions on my TODO list. I really hope to get a new version out this weekend that at least addresses the last couple of bug reports before I get into implementing those new features. Just want to let you know that I am still monitoring this. The time leading up to this holiday has just been rather crazy.
pandv2
13th December 2011, 10:05
I searched long time for a tool to add silence and cut as described by phate89. Now I am using besplit to break the ac3 in parts, ac3to to add delay to each part o cut the beginning and ac3to to rejoin the fragments. It's automated (so, no extra work), but it's ugly.
And let me add another option to tebasuna51 flag to deal with mixed ac3 frames:
4) Force the track to be 5.1 or 2.0 (dropping channels or adding silence channels). It this is not possible without reencode, forget it.
And, please, rememeber to add the new options to command line.
Thanks for your work, and don't worry about time.
tebasuna51
13th December 2011, 10:17
...
4) Force the track to be 5.1 or 2.0 (dropping channels or adding silence channels). It this is not possible without reencode, forget it.
Yes, is not possible without reencode.
phate89
13th December 2011, 20:04
Yes, is not possible without reencode.
it's not possible to do it reencoding only the necessary frames? i don't know very well ac3 structure. in theory should be possible?
tebasuna51
14th December 2011, 04:39
it's not possible to do it reencoding only the necessary frames? i don't know very well ac3 structure. in theory should be possible?
You need split, decode, edit, recode and join.
To much job for a useless, for me, output.
phate89
14th December 2011, 05:38
You need split, decode, edit, recode and join.
To much job for a useless, for me, output.
yes but if he adds it in the program it's not so much job.. the program copies the 5.1 frames, when it found a different frame it converts it..
in my case could be useful.. usually a frends pass me it's 5.1 recorded audio that i edit to sync with eac3to... but where it cuts for the commercial he leave some 2.0 silence frame.. and that frames create a lot of problems with lossless editing because there are frame of different sizes.. i could remove the 2.0 frames but then i will loose the silence between the 2 parts and the timing will be different (... naturally it's a rare case but could be useful..
tebasuna51
14th December 2011, 13:51
yes but if he adds it in the program it's not so much job.. the program copies the 5.1 frames, when it found a different frame it converts it...
Not so much job?
Must add a decoder and a encoder to delaycut to create 2.0 to 5.1 frames than must be cut after.
I think is better remove the 2.0 frames and cut the video with these cut points (maybe with some delay). The sync, and the silence between the 2 parts, must be preserved.
amtm
14th December 2011, 16:41
Yeah adding such a feature would really make the tool more complex than I want it to stay at. I think the tool should really stay as a one for losslessly cutting and delaying audio streams. When things start getting into needing to decode, reencode, etc the streams that really starts getting outside of the core focus of the tool. I know it's sometimes a pain to use multiple tools, but there are already good, mature tools to do things like converting from 5.1 to 2.0 and those should be leveraged instead of reinventing the wheel so that this tool does that as well.
BTW, just so any new bug reports don't get lost in the thread, if you could open up issues here (https://github.com/athomasm/delaycut/issues) so that they can be more easily tracked that would be quite helpful. Thanks! I'll take care of creating issues for those things already reported.
amtm
14th December 2011, 16:50
Also in regards to the issue with adding silence frames to DTS I've found an open source DTS encoder here (http://patrakov.blogspot.com/2011/09/i-wrote-dts-encoder.html) that is supposed to make compliant streams that could possibly be used to create silence frames that will be decodable by more than just libavcodec. The only issue will be with the patent issues with bundling that with my app since I do live in the US and there would be issues. I'm going to investigate it maybe next week or so to see if it can be useful and how it can be distributed with the application so I don't face any legal issues from DTS, Inc. coming down on my head.
phate89
14th December 2011, 18:59
Yeah adding such a feature would really make the tool more complex than I want it to stay at. I think the tool should really stay as a one for losslessly cutting and delaying audio streams. When things start getting into needing to decode, reencode, etc the streams that really starts getting outside of the core focus of the tool. I know it's sometimes a pain to use multiple tools, but there are already good, mature tools to do things like converting from 5.1 to 2.0 and those should be leveraged instead of reinventing the wheel so that this tool does that as well.
Not so much job?
Must add a decoder and a encoder to delaycut to create 2.0 to 5.1 frames than must be cut after.
I think is better remove the 2.0 frames and cut the video with these cut points (maybe with some delay). The sync, and the silence between the 2 parts, must be preserved.
an equal good solution is instead of reencoding an option to simply replace 2.0 audio with empty frames solving the problem..
btw it's for sure something less important and there are a lot of things to address before...
one of the most important is for sure dts delays...
Selur
19th December 2011, 15:36
Is there somewhere some kind of overview over the CLI switches and their usage?
phate89
20th December 2011, 22:35
Is there somewhere some kind of overview over the CLI switches and their usage?
in the txt shipped with the exe there is a txt that explain every switch with some example... but for now -start trim and -endtrim works only if there are both (bug)
amtm
22nd December 2011, 02:48
3) Changing from frames to ms causes the starting offset delay to decrease each time you switch
4) The starting offset delay isn't subtracted from the cut file End setting so the output audio is too long
So having started looking at these bugs I need clarification on #3 and #4. When I switch between frames and ms I get the same value every time I flip back and forth other than rounding errors introduced due to the conversion from ms to frames and back but after that the value stays the same after subsequent switching. For example 155 ms converted to frames at 29.97 yields 5 frames, because all frame values are rounded to the next whole frame, and then converted back to ms gives 166ms. I can store the previous value milliseconds or seconds before conversion to restore it back to the original value if that was the issue you meant. But I don't see an ever decreasing value.
#4 I'm not quite understanding. The behavior of my version acts just the same as say 1.2.1.2 when it comes to specifying an offset delay and an end cut value. Can you clarify what you mean with number 4? Like specific values you are inputting and what you are expecting the duration to be because all values I'm trying gives equivalent durations to the last version before mine.
Thanks.
amtm
22nd December 2011, 04:14
I've created a new version that addresses all the bugs I can reproduced. Can be downloaded here (https://github.com/downloads/athomasm/delaycut/delaycut.exe) with mirror here (http://www.multiupload.com/CWYAT4NG9Y).
- Fixes CLI issues reported by phate.
- Fixes issue with offset delay not being repopulated when file is dragged/dropped again.
- Fixes issue where changing FPS value did not recalculate target info.
- Fixes issue where unchecking cut box did not recalculate target info.
- Fixed behavior where start cut value would be overriden while inputting into the end cut field. This no longer happens and validation that end cut is not less than start cut happens when execute button is pressed.
Let me know if you find any other issues, especially clarification with the issues listed above that I can't reproduce, and I'll finalize this version before working on the new feature requests.
Selur
22nd December 2011, 06:26
in the txt shipped with the exe there is a txt that explain every switch with some example...
Thanks! I totally overlooked that,... never scrolled down ;)
Stereodude
22nd December 2011, 23:37
So having started looking at these bugs I need clarification on #3 and #4. When I switch between frames and ms I get the same value every time I flip back and forth other than rounding errors introduced due to the conversion from ms to frames and back but after that the value stays the same after subsequent switching. For example 155 ms converted to frames at 29.97 yields 5 frames, because all frame values are rounded to the next whole frame, and then converted back to ms gives 166ms. I can store the previous value milliseconds or seconds before conversion to restore it back to the original value if that was the issue you meant. But I don't see an ever decreasing value.
#4 I'm not quite understanding. The behavior of my version acts just the same as say 1.2.1.2 when it comes to specifying an offset delay and an end cut value. Can you clarify what you mean with number 4? Like specific values you are inputting and what you are expecting the duration to be because all values I'm trying gives equivalent durations to the last version before mine.
Thanks.3) When I load a file with a "DELAY -407ms". I have it set to frames when I load it. It shows up with a -12 frame delay. I change to ms and it turns into 400ms. Change it back to frames and it turns to -11. Back to ms and it's -367. Back to frames it's -10, etc, etc, etc...
4) It's been a while, but my complaint is that for example if you have a 250ms start delay and you are cutting at 50000ms (end) you get a file that's 50272ms long. IMHO it should be 50016ms long. This is because you're dealing with synchronizing the audio to the video. In this example 250ms of audio is missing. The video is 50000ms long so you don't want a total 50250ms of audio, you want 50000ms.
amtm
23rd December 2011, 00:19
3) When I load a file with a "DELAY -407ms". I have it set to frames when I load it. It shows up with a -12 frame delay. I change to ms and it turns into 400ms. Change it back to frames and it turns to -11. Back to ms and it's -367. Back to frames it's -10, etc, etc, etc...
Okay, with that I can see it happening. Thanks. With positive values it wasn't showing it.
4) It's been a while, but my complaint is that for example if you have a 250ms start delay and you are cutting at 50000ms (end) you get a file that's 50272ms long. IMHO it should be 50016ms long. This is because you're dealing with synchronizing the audio to the video. In this example 250ms of audio is missing. The video is 50000ms long so you don't want a total 50250ms of audio, you want 50000ms.
Okay, testing this it seems to be the way the code has always worked since 1.2.1.2 gives the same duration for those input values. It's a simple enough change so if no one has any issues about changing the longstanding behavior I'll do it. I just don't want to break existing behavior that people might rely on.
amtm
23rd December 2011, 18:21
Oh, so after more research to get the behavior you want with regards to the cut/delay values you simply need to check the "original length" checkbox. No code changes are needed so I'm going to close that issue and I've already corrected the other issue and I'll swap out the previous testing version with a new one to make sure no new regressions have popped before doing a final release. Also, I didn't do this previously but I will start doing version tagging on checkins so that it's easier to rollback to a previous version in git starting with this version before I begin doing new feature requests.
amtm
23rd December 2011, 18:50
New testing version [links removed. replaced below]. Right now just need to know if any new bugs pop up or any regressions. Thanks!
Stereodude
24th December 2011, 23:34
Thanks for the new version. I found two bugs (well, one is leftover that's still not fixed):
1) Reopening the same file still doesn't auto populate the delay start field.
2) If the Original Length box is checked in the Delay area the end field is not also auto populated when a file is opened. You have to uncheck and recheck the box.
There also seems to be a mistake in the math somewhere when working in frames instead of msec. In 3 of my 4 tests the start and end AC3 frame were off by one (length was correct) when compared to working in msec from my excel spreadsheet. I will investigate further and give you a specific example later.
amtm
25th December 2011, 00:49
Redownload from the links just to double check you have the latest version. I just retested and the reopening does repopulate as I just checked by clearing the start delay and reopening the same file. Unchecking the box does recalculate. The reason unchecking the "original length" check box appears to not recalculate is that it populates the end delay field as well. You have to clear the fields after you uncheck.
Stereodude
25th December 2011, 01:44
Redownload from the links just to double check you have the latest version. I just retested and the reopening does repopulate as I just checked by clearing the start delay and reopening the same file. Unchecking the box does recalculate. The reason unchecking the "original length" check box appears to not recalculate is that it populates the end delay field as well. You have to clear the fields after you uncheck.I had the latest, but I downloaded it again just to be sure.
I'm not imagining these things...
1) http://img855.imageshack.us/img855/4612/bugno1.th.png (http://img855.imageshack.us/img855/4612/bugno1.png)
2) http://img337.imageshack.us/img337/7400/bugno2.th.png (http://img337.imageshack.us/img337/7400/bugno2.png)
amtm
25th December 2011, 05:51
It's working just fine here both with drag/drop and reopening through the open file dialog. I'm doing the exact same steps. I open a file, clear delay, reopen and the start delay repopulates. *shrug* Now the end delay not being updated if original length is checked I do see that not updating right.
amtm
25th December 2011, 06:21
New version here (https://github.com/downloads/athomasm/delaycut/delaycut.exe), mirror here (http://www.multiupload.com/Y912DMYSK9), which fixes populating the end delay correctly when "original length" is checked.
hlmasterchief93
25th December 2011, 14:50
so how to build the lastest one for ubuntu from Source code ?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.