# Working with CUESHEET blocks in FLAC files - detect and remove

**URL:** https://community.mp3tag.de/t/working-with-cuesheet-blocks-in-flac-files-detect-and-remove/64368
**Category:** General Discussion
**Created:** [April 11, 2024, 1:57pm UTC](https://community.mp3tag.de/t/working-with-cuesheet-blocks-in-flac-files-detect-and-remove/64368 "2024-04-11T13:57:50Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Daksol](https://community.mp3tag.de/user_avatar/community.mp3tag.de/daksol/32/17515_2.png) [@Daksol](https://community.mp3tag.de/u/Daksol)
#### Post date: [April 11, 2024, 1:57pm UTC](https://community.mp3tag.de/t/working-with-cuesheet-blocks-in-flac-files-detect-and-remove/64368/1 "2024-04-11T13:57:50Z")

</div>

CUESHEET blocks in FLAC files. Maybe something for future MP3Tag

When checking the scanner logfile for my Lyrion Music Server (formerly Logitech Media Server) I found a large number of error messages associated with corrupt CUESHEET blocks on encoded FLAC files.  
Not entirely sure where they came from - possibly I used another CD ripper software at some point.

The CUESHEET tags were not in use - all the necessary tags were provided for via regular FLAC tags. However there were not helping the progress of the library scan - in many cases there were multiple error log lines for each file with a CUESHEET block.

It turns out CUESHEET tags are not easy to work with.

MP3Tag does not seem to recognise them via the "Extended Tags" option - possibly another option I missed.

Best GUI to work with CUESHEET tags turned out to be foobar2000, nominally a music player, but you can view and remove CUESHEET tags. But not good for bulk, best you can do is one directory at a time.

Then I found metaflac command line utility which does allow you to both see (LIST) and delete (REMOVE) CUESHEET blocks.

see the CUESHEET block in a file - no output if file has no such block

> metaflac --list --block-type="CUESHEET"

and also to remove the CUESHEET blocks

> metaflac --remove --block-type="CUESHEET"

So I assembled a file of URLs to the affected files, and from that created a series of metaflac command lines to run as a Script to remove the CUESHEET tags.

It would be useful to be able to work with these in MP3Tag.

Software used

- Metaflac syntax [https://xiph.org/flac/documentation\_tools\_metaflac.html](https://xiph.org/flac/documentation_tools_metaflac.html)
- Foobar2000 [https://www.foobar2000.org/](https://www.foobar2000.org/)

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [April 11, 2024, 2:07pm UTC](https://community.mp3tag.de/t/working-with-cuesheet-blocks-in-flac-files-detect-and-remove/64368/2 "2024-04-11T14:07:52Z")

</div>

Yes — `metaflac` or foobar2000 is the way to go here. The cuesheet is not part of the actual FLAC tag (which is Vorbis Comments or `METADATA_BLOCK_VORBIS_COMMENT`), but resides in a different block type called [`METADATA_BLOCK_CUESHEET`](https://xiph.org/flac/format.html#metadata_block_cuesheet). That's also the reason why it's not visible in extended tags.

I've added it to my list of future ideas for improvement.

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [April 11, 2024, 2:08pm UTC](https://community.mp3tag.de/t/working-with-cuesheet-blocks-in-flac-files-detect-and-remove/64368/3 "2024-04-11T14:08:59Z")

</div>

> [@Daksol](#):
>
> It would be useful to be able to work with these in MP3Tag.

Until such a possibility will be implemented, you can create a so called "Tool".

> **[Tools – Mp3tag Documentation](https://docs.mp3tag.de/customization/options/tools/)**
>
> Documentation of Tools configuration options. Mp3tag is the universal Tag Editor.

You can use nearly the same command  
`metaflac --remove --block-type="CUESHEET"`  
but you need to call it for the selected FLAC files with a parameter like `%_path%`

For detailed instructions, you could have a look here:

> [@Why does certain artwork break Windows Explorer Metadata?](https://community.mp3tag.de/t/why-does-certain-artwork-break-windows-explorer-metadata/59995/4):
>
> The example file has a really large embedded picture, it's 3MB which breaks Windows Explorer. If you remove it or resize it from within Mp3tag (e.g., via Adjust Cover), the preoccupied space is still left as padding (which is reserved space for future changes). Unfortunately, it might be still too large for Explorer to handle. Before you ask: removal of padding (or at least resizing it to something that makes sense) is on my internal list of things to improve for Mp3tag. Until then, you can cr…

This are the necessary steps to create a new Tool:

1. Open Mp3tag and go to File -\> Options -\> "Tools"
2. Click on the "New" ![image](https://community.mp3tag.de/uploads/default/original/3X/d/2/d24ee4b79c1680a4bcdfb4e514c20402204cc453.png) button to create a new tool.
3. In the "Name" field, enter a name for the tool (e.g., "Remove CUESHEET in FLAC").
4. In the "Path" field, enter the full path to the metaflac executable file on your computer.
5. In the "Parameter" field, enter the command line parameters for metaflac that you want to use, like  
`--remove --block-type="CUESHEET" "%_path%"`
6. Activate the "for all selected files" checkbox.
7. Click "OK" to save the new tool.
8. Close the Options dialog and go back to the main Mp3tag window.

Right-click on a FLAC file and go to "Tools" \> "Remove CUESHEET in FLAC" (or whatever name you entered for the new tool) to use the tool on the selected file(s).

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [May 11, 2024, 2:09pm UTC](https://community.mp3tag.de/t/working-with-cuesheet-blocks-in-flac-files-detect-and-remove/64368/4 "2024-05-11T14:09:09Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
