gchudov / cuetools.net

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

CUERipper: Detect too large album art earlier #311

Closed c72578 closed 7 months ago

c72578 commented 7 months ago

The maximum size of embedded album art is 16 MB each. So far, in case of too large album art, an exception was shown after ripping the CD, when tagging the files: "Block size too large." When using libFLAC, an exception appeared at the beginning of ripping "Exception: unable to initialize the encoder:" FLAC__STREAM_ENCODER_INIT_STATUS_ENCODER_ERROR

c72578 commented 7 months ago

Here is a build for testing: CUETools_2.2.5_2024-01-20_git_e71bbfd_CUERipper_Detect_too_large_album_art_earlier.zip SHA256: 8380b15c33440cd87f8a2272d99cadc60c23ebc33a0377d7d5ff72308fdc1f85

If the selected album art is larger than 16 MB and the option "Embed album art" is set, then the following warning is shown:

Album_art_too_large

ha-korth commented 7 months ago

Art size dropped from 39.9 MB to 19.6 KB so works. I'd still like to see MaxAlbumArtSize= active (maybe ignored if blank or 0) but that might just be me.

c72578 commented 7 months ago

Art size dropped from 39.9 MB to 19.6 KB so works. I'd still like to see MaxAlbumArtSize= active (maybe ignored if blank or 0) but that might just be me.

@ha-korth Thanks for testing. The goal of this PR is to detect too large album art earlier and inform the user. Considering MaxAlbumArtSizealso in CUERipper would be a separate modification.

c72578 commented 7 months ago

A new test build has been prepared: CUETools_2.2.5_2024-01-21_git_8df5575_CUERipper_Detect_too_large_album_art_earlier.zip SHA256: e562b589ad36a07255fd04bc874f577c1a23daaf7aaf8e2c476c3e4563d53cb6

In addition to showing a message in case of too large album art, "Downloading album art..." is shown in the status of CUERipper while downloading, to show what is going on, as downloading of large album art may take some time. See green arrow:

CUERipper_Status_Downloading_album_art_(green_arrow)

ha-korth commented 7 months ago

Mine shows as CUERipper 2.2.5 (Not Responding) while art is downloaded but at least the Downloading album art... explains why the program is waiting.

c72578 commented 7 months ago

Mine shows as CUERipper 2.2.5 (Not Responding) while art is downloaded but at least the Downloading album art... explains why the program is waiting.

Yes, this is the reason, why the status message "Downloading album art..." has been added now. In the past the behavior while the large album art is fetched was described e.g. as:

hangs for about 5minutes, then starts ripping the disc

https://hydrogenaud.io/index.php/topic,121449.0.html

ha-korth commented 6 months ago

Found another issue with larger album art in CUERipper. Just wanted to make a note of it somewhere. https://ia800504.us.archive.org/32/items/mbid-d24b2001-ce3c-4fec-b308-9d7d113b0f2d/mbid-d24b2001-ce3c-4fec-b308-9d7d113b0f2d-36648174305.jpg 6.52 MB Tested both cuetools flac encoder and libFLAC encoder. No flac tag information shown in Windows 11 file explorer. Media Player in Windows 11 throws error. cover flac -t shows files ok files play in other players e.g. foobar2000 and tags/cover are ok cover2