View Full Version : delaycut - ac3/eac3/dts/mpa/wav delay+cut tool: v1.4.3.7
amtm
4th November 2011, 15:22
I have ported delaycut from MFC to Qt and am at a point to release it as a beta to get others to test it.
Source code is at: https://github.com/athomasm/delaycut
Any feedback, bug reports, requests are welcome.
Version 1.4.1.0
- Added back CLI support.
Version 1.4.2.0
-Fix crash for opening file names with Unicode characters.
Version 1.4.3.0
- Add option to select input type between milliseconds, seconds, frames. Can add both rational values (24000/1001) or decimal (23.976) values in FPS field.
- Removed debug info being displayed in message box that was accidently left in.
- Added CLI switches to support new input value types.
Version 1.4.3.1
- Fix so that delay fields properly accept negative values.
- Fix for math when using frames as input type.
Version 1.4.3.2
- Fix autodelay detection so that it converts ms value in fileName to the selected input type.
- Fixed bugs in converting values between different input types.
- Fixed math errors when specifying delay in frames.
- Fixed bug where output file path wasn't updated when using Save As dialog.
Version 1.4.3.4.
-Fix rounding when converting between input types to a round half up scheme. Also changed the calculations for start and end frame to use the same.
-Fixed check for enabling the CRC group edit so it enables properly.
-Fix bug that where a pathological file caused the processing to never finish and UI hang.
-Calculated end frame is capped to the total frames in cases where end split value specified exceeds length of file.
-Renamed "original length" field to "preserve length".
-End cut value of 0 is treated as end of file when calculating end frame.
-End cut and start cut values no longer cause the other field to be overwritten. All checks to make sure that end cut is not smaller than start cut, except for the case of 0, happens when process button is clicked.
Version 1.4.3.5
-Logging of progress and error messages when using the CLI have been added back.
- "-console" switch has been removed. Switches to specify cut points have been renamed to "-startcut" and "-endcut" respectively. Switches to specify delay values have been renmaed to "-startdelay" and "-enddelay" respectively. "-i" switch introduced to allow the specifying of the input file path anywhere in the CLI arguments. "-version" switches introduced to get the current version of the software.
Version 1.4.3.6
-Added support to specify delay/cut values in audio frames.
-Added "-help" switch to display the options available from CLI.
-Fixed so that delay field in GUI worked properly.
-Fixed CLI parser for to detect new switches.
Version 1.4.3.7 ( http://www.videohelp.com/download/delaycut1.4.3.7.7z)
-Fixed logic bug when checking valid input types.
-Fixed output of -help and the README to the proper names of the new switches.
Usage:
Command Line Instructions
Output and log files will be in the same path than the input file.
Options:
-help: List options.
-version: Get current version.
-info: Outputs info about input file in log file
-inputtype <string>: Input type of delay/cut values. (default millseconds
when not specified) [milliseconds, seconds, videoframes]
-fps <float|rational>: Specify frame rate.
Needed when inputtype is set to frames.
-fixcrc <string>: Specify action to take in the case of crc errors
[ignore, skip, fix, silence]
-startdelay <integer>: Specify the needed frames added at the beginning of the file
-enddelay<integer>: Specify the needed frames added at the end of the file
-same: file length will be the same after adding delay
-auto: detect start delay in filename (assuming DVD2AVI style)
-startcut <integer>: Specify cut start point
-endcut <integer>: Specify cut end point
-o <string>: specify output file
-i <string>: specify inputfile
Return values
0: Success
1: Something went wrong.
Examples:
Get info: Log file will be myfile_log.txt
delaycut -info -i myfile.ac3
Adds 100 msec of silence at the begining. File lenght will be the same
delaycut -startdelay 100 -same -i myfile.ac3
Adds 100 msec of silence at the begining. File lenght will be 100 msecs more
delaycut -startdelay 100 -i myfile.ac3
Cuts start at 10.32 sec and ends at 15.20 sec.
delaycut -inputtype seconds -startcut 10.32 -endcut 15.20 -i myfile.ac3
Cuts start at 10320 msec and ends at 15200 msec. Delay correction of 100 msec.
delaycut -startdelay 100 -startcut 10320 -endcut 15200 -i myfile.ac3
b66pak
4th November 2011, 18:09
thanks a lot...
_
amtm
4th November 2011, 20:20
You're welcome. I'm not sure how many people still use it, but it was a simple enough app that I've been working on to learn Qt and get back into C++. After I get the CLI part reimplemented and some refactoring done tonight (since the old delaycut code was just a quick and dirty import and get it compiling job) and no one mentions any major bugs I'll push it out as a real release.
As far as I can tell from my so far limited testing file output is identical to the last delaycut release (verified with sha-1 hashes).
Thunderbolt8
4th November 2011, 20:26
not sure whether I understand, but version 1.3.0.0 does already exist, madshi made that one.
so whats the difference here?
amtm
4th November 2011, 20:29
I didn't know he had I just diverged from the last version from jsoto's site. This is different in that it's written in Qt so it's cross-platform. And I'll change the version number. Can you link his version? I'd love to incorporate any changes he made
amtm
4th November 2011, 20:38
Never mind I found madshi's version. When I get home I'll incorporate his changes and change the version number.
Thunderbolt8
4th November 2011, 20:58
so what exactly are your changes? (in case you stated them above, I cant understand that, sorry :D )
amtm
4th November 2011, 21:01
Its rewritten in Qt to be cross-platform, for those who care, and when I'm done tonight a significantly cleaned up codebase. At that point more functionality, etc can be added per any requests, etc.
As I said above this is mostly for me learning Qt and getting back into c++ programming. I thought I'd share in case anyone else was interested.
amtm
4th November 2011, 21:09
Plus I know there are other tools that do the same thing but none are as simple to use as this, IMO, so I thought I'd try to revive it. It's just one of a number of older mfc-based tools I've been working on porting.
shh
4th November 2011, 23:28
Win7x64: I click "Browse" for an input file, then break (don't select anything) -> crash
amtm
4th November 2011, 23:53
Ok, I see the issue. Fixing now. Fix will be in the newest version with the eac3 support. Removing the download link till I get the new version up.
amtm
5th November 2011, 01:26
New version renamed to 1.4 beta is ready to grab here (https://github.com/downloads/athomasm/delaycut/delaycut.exe).
This has the file dialog fix, adds eac3 support from madshi's 1.3.0.0 and adds support to autofill delay values set in the file that Chumbo added in 1.3.1.0.
Working on getting LiveCDs for Debian and Ubuntu to get generate deb packages for Debian 6, and Ubuntu 11.04 and 11.10. Will update when they are created.
Sparktank
6th November 2011, 02:18
Neat!
Any chance of adding more file support?
Like the lossless streams: DTSHD-MA, Dolby TrueHD, FLAC, w64?
Would come in handy when editing isolated scores from Blu-Ray.
amtm
6th November 2011, 03:14
Sure, I'll add it into the TODO list.
Sparktank
6th November 2011, 11:43
Sure, I'll add it into the TODO list.
:thanks:
There's no rep or thanks buttons in doom9 :p
amtm
11th November 2011, 14:40
Version 1.4.0.0 available for download here: https://github.com/downloads/athomasm/delaycut/delaycut1.4.0.0.zip
Linux binaries later tonight.
amtm
16th November 2011, 00:17
For anyone who cares I have binaries here (https://build.opensuse.org/package/show?package=delaycut&project=home%3Aamtm) for Linux. Builds include Debian 5 & 6, Ubuntu 9.10 - 11.10, OpenSuSE 11.3-4, 12.1, Factory and Tumbleweed, and Fedora 15/16.
pandv2
16th November 2011, 18:32
It's the cli part implemented? I tried -info and the gui appears.
Thank's.
amtm
16th November 2011, 18:44
I've got it implemented locally just not pushed yet. I'll have it in tonight and new binaries.
amtm
17th November 2011, 16:16
Version with CLI support back in: https://github.com/downloads/athomasm/delaycut/delaycut1.4.1.0.7z
Additional items still on the TODO list will be worked on but I will be busy the next couple of days so it probably won't be a new version until next week.
amtm
17th November 2011, 17:27
A question for users. On videohelp forums someone wanted to have the delay and cut fields support input values in seconds. I was thinking of having the user type s at the end to let the program know that the value isn't milliseconds and without that it just defaults to the normal behavior. Does that sound okay?
TDiTP_
17th November 2011, 18:44
delaycut v1.4.1.0 is crash when i use Cyrillic letters in the file name. Version 1.3.1.0 works fine.
Does that sound okay?
Yes :)
amtm
17th November 2011, 18:56
Ok. I know what the issue is. I'll push a fix and a new build in a while.
Stereodude
17th November 2011, 22:06
How about allowing video frame numbers to be used instead of time? ie: Have a drop down or field to enter a video frame rate, and then allow entry of video frame numbers. I use DelayCut quite a bit lately, but I'm always dealing with frame numbers in my AVIsynth scripts and it's a pain to have to turn them into time values in Excel and then enter them into DelayCut.
amtm
17th November 2011, 22:23
Yeah I can do that since this should be easy and I'll try to get this and the filename crash fix in tonight. To support it for the CLI I can also add an -fps switch.
Sparktank
18th November 2011, 08:19
Neat. I like that variety of using ms/s/frame numbers.
i wish there was a calculator specifically for time. so many programs require just one format and never really know other formats.
i don't have excel so I do it all with a calculator and .txt pad open.
([frame rate](24000/1001)*60[seconds]*[number of minutes i want]+[left over Second.milliseconds] :( my head hurts)
Stereodude
18th November 2011, 13:49
Yeah I can do that since this should be easy and I'll try to get this and the filename crash fix in tonight. To support it for the CLI I can also add an -fps switch.Thanks! Looking forward to it.
amtm
18th November 2011, 15:32
So I didn't have any time to work on this last night but I had enough time this morning to push the bug fix that TDiTP_ reported. The new version can be had here (https://github.com/downloads/athomasm/delaycut/delaycut1.4.2.0.7z). I created a file with Cyrillic characters and it opened fine. Please report if you have any other issues.
amtm
21st November 2011, 15:58
New version here (https://github.com/downloads/athomasm/delaycut/delaycut1.4.3.0.7z). Has the selectable input type between milliseconds, seconds, frames. Apparently I forgot to disable a messagebox I was using for debugging so that has been disabled.
amtm
21st November 2011, 16:17
Also, there are Linux packages being rebuilt here (https://build.opensuse.org/package/show?package=delaycut&project=home%3Aamtm) for anyone interested.
amtm
21st November 2011, 17:17
The github download link appears to not be working. When I get home I'll post the binary to something like megaupload.
Also the deb packages from that opensuse build link is also broken. I'll fix that too tonight. Argh.
b66pak
21st November 2011, 20:06
please use m u l t i u p l o a d . c o m
_
amtm
21st November 2011, 20:07
Ok will do.
Sparktank
21st November 2011, 23:06
O_O I can't wait for a working link!
"input type between milliseconds, seconds, frames"
http://media.tumblr.com/tumblr_lcwyynageD1qzr2th.gif
amtm
21st November 2011, 23:41
I'm heading home soon. So check back in like an hour or so.
amtm
22nd November 2011, 02:45
File reuploaded to github here (https://github.com/downloads/athomasm/delaycut/delaycut1.4.3.0.7z). Mirror is also here (http://www.multiupload.com/E9W51IOUC2). Added explanation of new CLI switches in the README.txt file.
To clarify, in the FPS field you can also specify rational values like 24000/1001 or just the normal decimal value like 23.976.
Sparktank
22nd November 2011, 02:47
ty, tyvm!
Stereodude
22nd November 2011, 13:59
Thanks for the version with video frame based. However, I've already discovered a shortcoming in use. AC3 files when spit out of DGIndex has a ms delay in the file name like PID 014 3_2ch 384Kbps DELAY 596ms.ac3. That delay positive or negative is how much extra or short the audio is from being in sync with the video stream. It would be nice to be able to have a "File Offset" (or equivalent function) field that accepts positive and negative values in ms (perhaps even reading the file name to auto populate it) even if I'm working in frames so I can line up the audio and video with it and then work on a time or frame basis using video derived values. Otherwise I have to make 2 passes (first to remove or add audio to account for the offset and a 2nd to trim to match the video) or go back to doing math converting frames to time or convert time to frames.
Thanks. Sorry for being a hard to please whiner. :)
amtm
22nd November 2011, 14:03
If the delay fields aren't accepting a negative value then it's a bug. Because it should as the original did.
amtm
22nd November 2011, 14:08
I see the issue and pushing a fix. The QValidator for the delay field was given 0 as the minimum value when it was meant to be the lowest negative value. Recompiling a new version.
Stereodude
22nd November 2011, 14:21
If the delay fields aren't accepting a negative value then it's a bug. Because it should as the original did.FWIW, I can't put negative values in any of the fields when selecting milliseconds, however that wasn't my request in my last post. I want a way to account for the underlined delay while still staying in frames.
http://img823.imageshack.us/img823/6052/dcissue1.png
Also, the math seems incorrect. In my screenshot a start point of 708 frames at 30000/1001 (29.97...) should be a start of 23624ms or 738 AC3 frames and the end should be end of 197531ms or 6173 AC3 frames for a length of 173907ms or 5435 AC3 frames.
amtm
22nd November 2011, 14:26
Ok, looking into that too. Thanks for the feedback.
Stereodude
22nd November 2011, 16:09
Ok, looking into that too. Thanks for the feedback.FWIW, it looks like it is still treating the video frames as ms.
amtm
22nd November 2011, 16:15
Internally, yes it does convert to ms. That's because how the original code works. But the conversion values are correct now if you use frames in 1.4.3.1. I get the expected values when trying to reproduce your example above in it. It also fixes the negative delay not getting accepted bug.
Just to make it visible in case someone hasn't read the first post the new version is here (https://github.com/downloads/athomasm/delaycut/delaycut1.4.3.1.7z). Mirrored version can be found here (http://www.multiupload.com/DQ5W2XSFJX).
amtm
22nd November 2011, 16:30
Oh, I see your point about the frames issue when used for delay. I missed the part about you mentioning it in reference to the detected delay in the filename and having that converted into frames if that option is selected. I also noticed an issue where inputting delay values in frames causes wildly incorrect values to appear under the target info. I know the issue in both cases and can have fixes tonight when I get home. This should hopefully be the last update needed to get the alternate modes fully working.
Stereodude
22nd November 2011, 17:17
FWIW, my thought was to have a "Starting Offset" or "File Start Time Offset" field added under the input file where the positive or negative delay could be auto read / manually entered keeping it away from the other fields.
like this:
http://img14.imageshack.us/img14/4442/dcsuggestion01.png
PS: Thanks for considering user feedback and making improvements to DelayCut.
amtm
22nd November 2011, 17:22
But the delay from the file is already read and auto-populated into the start delay field. Why the need for a second field that does the same thing? If you need additional negative or positive value delay on top of what is read in, why not just modify the value in that start field? That's ultimately what would happen behind the scenes anyway if there was a second field.
Stereodude
22nd November 2011, 18:50
But the delay from the file is already read and auto-populated into the start delay field. Why the need for a second field that does the same thing?It is? I haven't noticed.
If you need additional negative or positive value delay on top of what is read in, why not just modify the value in that start field? That's ultimately what would happen behind the scenes anyway if there was a second field.I guess I'll have to try it again later when I'm home. If it already goes into the delay start field, then you're right it's not needed.
amtm
22nd November 2011, 19:13
It is? I haven't noticed.
Yeah, the code to do so was added in and working for the 1.4.0.0 version. I just tested again with the latest 1.4.3.1 with a file I have by adding "DELAY 182ms" to the end of the filename and it populates correctly.
I guess I'll have to try it again later when I'm home. If it already goes into the delay start field, then you're right it's not needed.
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.
Motenai Yoda
22nd November 2011, 22:54
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.
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.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.