Answers.Body: <p>You can use <a href="https://xiph.org/flac/documentation_tools_metaflac.html" rel="nofollow noreferrer">metaflac</a> to export both the cuesheet and cover image.</p>
  
  <pre><code>metaflac--export-cuesheet-to=out.cue --export-picture-to=out.png input.flac
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-30T06:51:21.350Z
Answers.Text: Good try but it says "ERROR: FLAC file has no CUESHEET block". I can export the image nevertheless, thank you.
Answers.UserDisplayName: Gillian
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-30T07:16:26.493Z
Answers.Text: Can you share the file?
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-30T09:54:18.747Z
Answers.Text: It's over 350MB. It starts with fLaC, then at 6786th byte cue starts with "CUETools 2.1.6A?ALBUM= [...]" yadayada typical cue, finally cue ends with "REPLAYGAIN_ALBUM_GAIN=-6.90 dBREPLAYGAIN_ALBUM_PEAK=0.997711
  TRACKTOTAL=17kà image/png k·PNG" after which (presumably) the album art picture is stored (the PNG signature correctly starts and ends with IEND). And then there is a second PNG picture. I don't know what that is as metaflac gave me only one picture.
Answers.UserDisplayName: Gillian
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-30T09:56:21.257Z
Answers.Text: I think I could probably export it with CUETools but I'm on unix.
Answers.UserDisplayName: Gillian
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-30T10:13:37.647Z
Answers.Text: Does `metaflac --list input.flac` show the cuesheet?
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-30T12:09:27.087Z
Answers.Text: Yes it does. 4 metadata blocks, 0th contains sampling etc, 1st contains seektable, 2nd contains the cue (it starts as "type: 4 (VORBIS_COMMENT)", idk what that means) and the last - 3rd metadata block contains picture ("type: 6 (PICTURE)")
Answers.UserDisplayName: Gillian
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-30T12:11:39.143Z
Answers.Text: wait, actually there's 2 more metadata blocks: 4th is an another PNG and the 5th is padding
Answers.UserDisplayName: Gillian
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-30T13:25:16.057Z
Answers.Text: So the cue is embedded as a comment rather than as the specified cuesheet tag. You can export just that tag to a cue file.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-30T14:09:50.797Z
Answers.Text: How do I do that? Also, I managed to extract both pictures from metadata and convert them to png. They're file size is different but otherwise they're identical - album art.
Answers.UserDisplayName: Gillian
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-30T14:11:33.540Z
Answers.Text: How do I export everything so that I can have a cue file correctly combined with both FLAC and the exported album art? So that VLC will show album art properly as well automatically recognizes cuts in the flac?
Answers.UserDisplayName: Gillian
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-30T14:18:59.140Z
Answers.Text: Hmm.. Apparently, VLC recognizes the album art (although it doesn't show it). And since I already exported the CUE from hex, it works properly.
Answers.UserDisplayName: Gillian
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-30T14:31:33.037Z
Answers.Text: Something like `metaflac.exe --list --block-type=VORBIS_COMMENT in.flac | grep CUESHEET -A 500 | sed s/.*=// > out.cue`
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-30T15:33:10.027Z
Answers.Text: Yea, that's basically what I did initially. But still, thank you, that metaflac -list was really interesting. There goes your green tick, for being the only person willing to be bothered by me :)
Answers.UserDisplayName: Gillian
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-30T06:29:29.667Z
Answers.LastActivityDate: 2018-06-30T06:29:29.667Z
Answers.UserDisplayName: Gyan
Body: <p>I have a music album in one FLAC file. There is no CUE file. When I try to play it with VLC or CMUS, it doesn't recognize individual tracks and plays it as one large file.</p>
  
  <p>BUT if I import it into Vox player, it automatically recognizes individual tracks and splits it (gives it proper names and all). How is it possible? What am I missing? How do I make VLC and CMUS recognize the splits without CUE?</p>
  
  <p>EDIT:
  When I opened the flac file in a hexeditor, after a couple hundreds of symbols I found a long string starting with "CUETools 2.1." and containing all the cue information. How is it possible? Can I extract it? Why does almost no program recognize this type of internal cue instead of external cue file? It even contains the album cover image which is otherwise nowhere to be found in the file folder!</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-06-29T20:50:21.183Z
Comments.Text: `.flac` files are derived from the Ogg container and can have metadata like cuesheets, cover images and seek tables. ffmpeg should recognize them as chapters.
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-06-29T21:41:59.197Z
Comments.Text: @Gyan Would you happen to know how to extract full cue with the album artwork? I am on unix and playing flac files with embedded cue is impossible.
Comments.UserDisplayName: Gillian
Tags: <codec>
Title: One flac file - many tracks - no cue - yet it's 'split' somehow
UserDisplayName: Gillian
ThreadText: # One flac file - many tracks - no cue - yet it's 'split' somehow
  
  (Asked by: username_0 on 2018-06-29)
  
  I have a music album in one FLAC file. There is no CUE file. When I try to play it with VLC or CMUS, it doesn't recognize individual tracks and plays it as one large file.
  
  BUT if I import it into Vox player, it automatically recognizes individual tracks and splits it (gives it proper names and all). How is it possible? What am I missing? How do I make VLC and CMUS recognize the splits without CUE?
  
  EDIT:
  When I opened the flac file in a hexeditor, after a couple hundreds of symbols I found a long string starting with "CUETools 2.1." and containing all the cue information. How is it possible? Can I extract it? Why does almost no program recognize this type of internal cue instead of external cue file? It even contains the album cover image which is otherwise nowhere to be found in the file folder!
  
  **Tags:** codec
  
  > **Comments:**
  > **username_1**: `.flac` files are derived from the Ogg container and can have metadata like cuesheets, cover images and seek tables. ffmpeg should recognize them as chapters.  
  > **username_0**: @username_1 Would you happen to know how to extract full cue with the album artwork? I am on unix and playing flac files with embedded cue is impossible.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-06-30. Score: 0 | Accepted answer
  
  You can use [metaflac](https://xiph.org/flac/documentation_tools_metaflac.html) to export both the cuesheet and cover image.
  
  ```
  metaflac--export-cuesheet-to=out.cue --export-picture-to=out.png input.flac
  
  ```
  
  > **Comments:**
  > **username_0**: Good try but it says "ERROR: FLAC file has no CUESHEET block". I can export the image nevertheless, thank you.  
  > **username_1**: Can you share the file?  
  > **username_0**: It's over 350MB. It starts with fLaC, then at 6786th byte cue starts with "CUETools 2.1.6A?ALBUM= [...]" yadayada typical cue, finally cue ends with "REPLAYGAIN_ALBUM_GAIN=-6.90 dBREPLAYGAIN_ALBUM_PEAK=0.997711 TRACKTOTAL=17kà image/png k·PNG" after which (presumably) the album art picture is stored (the PNG signature correctly starts and ends with IEND). And then there is a second PNG picture. I don't know what that is as metaflac gave me only one picture.  
  > **username_0**: I think I could probably export it with CUETools but I'm on unix.  
  > **username_1**: Does `metaflac --list input.flac` show the cuesheet?  
  > **username_0**: Yes it does. 4 metadata blocks, 0th contains sampling etc, 1st contains seektable, 2nd contains the cue (it starts as "type: 4 (VORBIS_COMMENT)", idk what that means) and the last - 3rd metadata block contains picture ("type: 6 (PICTURE)")  
  > **username_0**: wait, actually there's 2 more metadata blocks: 4th is an another PNG and the 5th is padding  
  > **username_1**: So the cue is embedded as a comment rather than as the specified cuesheet tag. You can export just that tag to a cue file.  
  > **username_0**: How do I do that? Also, I managed to extract both pictures from metadata and convert them to png. They're file size is different but otherwise they're identical - album art.  
  > **username_0**: How do I export everything so that I can have a cue file correctly combined with both FLAC and the exported album art? So that VLC will show album art properly as well automatically recognizes cuts in the flac?  
  > **username_0**: Hmm.. Apparently, VLC recognizes the album art (although it doesn't show it). And since I already exported the CUE from hex, it works properly.  
  > **username_1**: Something like `metaflac.exe --list --block-type=VORBIS_COMMENT in.flac | grep CUESHEET -A 500 | sed s/.*=// > out.cue`  
  > **username_0**: Yea, that's basically what I did initially. But still, thank you, that metaflac -list was really interesting. There goes your green tick, for being the only person willing to be bothered by me :)  
  
  ---
  
  