gchudov / cuetools.net

CD image processing suite with optimized lossless encoders in C#
http://cue.tools/
Other
480 stars 51 forks source link

Avoid short HTOA files #314

Closed c72578 closed 6 months ago

c72578 commented 7 months ago

If track one pregap is longer than 5 seconds, use Gaps Appended + HTOA. In case of shorter pregaps, switch to Gaps Appended. The user does no longer have to deal with all those 32, 33, 37, etc. silent (or inaudible) frames saved as an HTOA file just to be able to catch a real hidden track before track one.

c72578 commented 7 months ago

@ha-korth, could you please have a look at the following test build, if it works as described under [1]? The PR is still draft, an additional setting has not been added yet. However, a threshold of 5 seconds has been hard coded so far. If track one pregap is longer than 5 seconds, use Gaps Appended + HTOA. In case of shorter pregaps, switch to Gaps Appended.

CUETools_2.2.5_2024-02-07_git_dd38863_Avoid_short_HTOA_files.zip SHA256: 33b6afa8aa1b8a4abaa8f01ea6be4834bae028233f2634b36289ea762ffe3aee

[1] https://hydrogenaud.io/index.php?topic=118915.0#post_General

ha-korth commented 7 months ago

Looks good so far. Tested on CUETools only with real rips such as http://db.cuetools.net/cd/613002 and several with small disc pregaps. I'll try a few dummies later around the 375 sector pregap range

Edit: tested 374, 375, & 376 sector pregaps. Still looks good.

ha-korth commented 7 months ago

Note: I suggested 5 seconds because if I recall correctly that's what Easy Audio Copy uses for the hidden track threshold.

The shortest hidden track I know of is 402 sectors http://db.cuetools.net/cd/10427693 "What's Up?" I'm not sure if there is a shorter one.

ha-korth commented 7 months ago

Working on CUERipper

c72578 commented 7 months ago

Concerning CUERipper, the PR needs to be updated:

Exception: Index was outside the bounds of the array Exception_Index_was_outside_the_bounds_of_the_array

Tested with a disc containing PREGAP 00:00:07

ha-korth commented 7 months ago

I got that too using the 'cuetools' flac encoder. I was testing using the libFLAC encoder (which didn't throw an error).

c72578 commented 7 months ago

CUETools.Processor/CUESheetLogWriter.cs has also been updated now. A new build for testing is currently in preparation.

c72578 commented 7 months ago

Here is an updated build for testing: CUETools_2.2.5_2024-02-14_git_2132122_Avoid_short_HTOA_files.zip SHA256: bc1e3f02da77d618a59787a52889cb3b62a78a1d6f376f5c766058ccce43c325

The following setting has been added in the meantime: UseHTOALengthThreshold Default: true So far, it can be modified by editing settings.txt. Changing the bool value from 1 to 0 restores the previous behavior, where short HTOA files appear again (≤ 5 s).

ha-korth commented 6 months ago

Initial test CUERipper 'cuetools' FLAC and libFLAC encoders tested Appears to be ok

c72578 commented 6 months ago

Here is an updated build, which includes a GUI setting for UseHTOALengthThreshold in CUETools: CUETools_2.2.5_2024-02-18_git_57573c0_Avoid_short_HTOA_files.zip e5c7ea8a05bb62bfd7c2dcd7899209ec1796e8b72b0bbe02718d476e8c5aadd9

New GUI setting under Gaps handling: GUI_setting_UseHTOALengthThreshold_circle

ha-korth commented 6 months ago

trojan

likely a false positive

Barough commented 6 months ago

I didn't get a virus warning, Running NOD32

VirusTotal Report https://www.virustotal.com/gui/file/e5c7ea8a05bb62bfd7c2dcd7899209ec1796e8b72b0bbe02718d476e8c5aadd9

ha-korth commented 6 months ago

I no longer get the virus warning. Will test version later.

c72578 commented 6 months ago

Thanks for testing and the thumbs up concerning the build.

Barough commented 6 months ago

Looking forward to a new release in a 'near' future or so. ;)