Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract embedded CUEsheet from FLAC file #934

Closed
Sami32 opened this issue Aug 9, 2018 · 18 comments
Closed

Extract embedded CUEsheet from FLAC file #934

Sami32 opened this issue Aug 9, 2018 · 18 comments

Comments

@Sami32
Copy link
Contributor

Sami32 commented Aug 9, 2018

I wasn't able to find a parameter related to CUE for extracting such data from FLAC files.
Is that possible by now? what is the name of the "general" parameter?

cuesheet : REM GENRE Kammermusik / REM DATE 2005 / PERFORMER "Maria Kliegel+Nina Tichman" / TITLE "Cellosonaten Nr. 1 & 2" / REM REPLAYGAIN_ALBUM_GAIN +2.51 dB / REM REPLAYGAIN_ALBUM_PEAK 0.999969 / FILE "Maria Kliegel und Nina Tichman - Faure - Cellosonaten Nr. 1&2.flac" WAVE / TRACK 01 AUDIO / TITLE "Elegie, Op. 24" / PERFORMER "Maria Kliegel+Nina Tichman" / REM REPLAYGAIN_TRACK_GAIN +3.56 dB / REM REPLAYGAIN_TRACK_PEAK 0.872437 / INDEX 01 00:00:00 / TRACK 02 AUDIO / TITLE "Papillon, Op. 77" / PERFORMER "Maria Kliegel+Nina Tichman" / REM REPLAYGAIN_TRACK_GAIN +6.27 dB / REM REPLAYGAIN_TRACK_PEAK 0.557831 / INDEX 00 06:43:61 / INDEX 01 06:48:23 / TRACK 03 AUDIO / TITLE "Sonate Nr. 1 fur Cello und Klavier, Op. 109, I. Allegro" / PERFORMER "Maria Kliegel+Nina Tichman" / REM REPLAYGAIN_TRACK_GAIN +0.22 dB / REM REPLAYGAIN_TRACK_PEAK 0.965851 / INDEX 00 09:58:43 / INDEX 01 10:05:24 / TRACK 04 AUDIO / TITLE "Sonate Nr. 1 fur Cello und Klavier, Op. 109, II. Andante" / PERFORMER "Maria Kliegel+Nina Tichman" / REM REPLAYGAIN_TRACK_GAIN +4.98 dB / REM REPLAYGAIN_TRACK_PEAK 0.577148 / INDEX 00 15:06:13 / INDEX 01 15:07:50 / TRACK 05 AUDIO / TITLE "Sonate Nr. 1 fur Cello und Klavier, Op. 109, III. Finale: Allegro commodo" / PERFORMER "Maria Kliegel+Nina Tichman" / REM REPLAYGAIN_TRACK_GAIN +2.31 dB / REM REPLAYGAIN_TRACK_PEAK 0.741760 / INDEX 00 21:52:48 / INDEX 01 21:53:35 / TRACK 06 AUDIO / TITLE "Berceuse, Op. 16" / PERFORMER "Maria Kliegel+Nina Tichman" / REM REPLAYGAIN_TRACK_GAIN +5.68 dB / REM REPLAYGAIN_TRACK_PEAK 0.497345 / INDEX 00 27:35:33 / INDEX 01 27:38:39 / TRACK 07 AUDIO / TITLE "Romance, Op. 69" / PERFORMER "Maria Kliegel+Nina Tichman" / REM REPLAYGAIN_TRACK_GAIN +3.82 dB / REM REPLAYGAIN_TRACK_PEAK 0.600098 / INDEX 00 31:13:38 / INDEX 01 31:17:39 / TRACK 08 AUDIO / TITLE "Sicilienne, Op. 78" / PERFORMER "Maria Kliegel+Nina Tichman" / REM REPLAYGAIN_TRACK_GAIN +7.69 dB / REM REPLAYGAIN_TRACK_PEAK 0.448090 / INDEX 00 35:27:40 / INDEX 01 35:31:11 / TRACK 09 AUDIO / TITLE "Sonate Nr. 2 fur Cello und Klavier, Op. 117, I. Allegro" / PERFORMER "Maria Kliegel+Nina Tichman" / REM REPLAYGAIN_TRACK_GAIN +0.70 dB / REM REPLAYGAIN_TRACK_PEAK 0.999969 / INDEX 00 39:19:30 / INDEX 01 39:23:74 / TRACK 10 AUDIO / TITLE "Sonate Nr. 2 fur Cello und Klavier, Op. 117, II. Andante" / PERFORMER "Maria Kliegel+Nina Tichman" / REM REPLAYGAIN_TRACK_GAIN +3.08 dB / REM REPLAYGAIN_TRACK_PEAK 0.747131 / INDEX 00 45:16:02 / INDEX 01 45:16:49 / TRACK 11 AUDIO / TITLE "Sonate Nr. 2 fur Cello und Klavier, Op. 117, III. Allegro vivo" / PERFORMER "Maria Kliegel+Nina Tichman" / REM REPLAYGAIN_TRACK_GAIN +0.09 dB / REM REPLAYGAIN_TRACK_PEAK 0.945648 / INDEX 00 52:19:42 / INDEX 01 52:20:63 / TRACK 12 AUDIO / TITLE "Apres un reve, Op. 7/1" / PERFORMER "Maria Kliegel+Nina Tichman" / REM REPLAYGAIN_TRACK_GAIN +6.01 dB / REM REPLAYGAIN_TRACK_PEAK 0.596161 / INDEX 00 56:44:06 / INDEX 01 56:47:38 / TRACK 13 AUDIO / TITLE "Serenade, Op. 98" / PERFORMER "Maria Kliegel+Nina Tichman" / REM REPLAYGAIN_TRACK_GAIN +1.56 dB / REM REPLAYGAIN_TRACK_PEAK 0.948059 / INDEX 00 60:03:13 / INDEX 01 60:05:28

https://pastebin.com/r7iMhefj

@JeromeMartinez
Copy link
Member

File please.
As first shot, I think that MediaInfo does not support "cuesheet" tag so it is displayed as is, so use MediaInfo::Get(Stream_audio, x, "cuesheet"). " / " are the separator used when there are several items in the file.

@Sami32
Copy link
Contributor Author

Sami32 commented Aug 9, 2018

Hehe, for now i've only found this poor sample:
http://www.chrisjj.com/temp/SampleofFLACembCUEforCDBXPtrial-twotracks.flac

@JeromeMartinez
Copy link
Member

weird file, I don't understand the meaning of "cuesheet" content (include PERFORMER, TITLE...), I just catch the tag in the file and provide it as is ("here " / " are replacing carriage returns)

@Sami32 Sami32 changed the title Question: How to extract embedded CUEsheet from FLAC file? Extract embedded CUEsheet from FLAC file Aug 9, 2018
@Nadahar
Copy link

Nadahar commented Aug 9, 2018

Cue sheet is a format in itself, so MediaInfo would either have to implement Cue sheet parsing or simply return it unparsed so it could be parsed by existing Cue sheet parsers. Replacing " / " back to line feeds can be problematic because it might be that the Cue sheet itself could contain this character sequence.

@JeromeMartinez
Copy link
Member

Thanks @Nadahar, so PERFORMER, TITLE... make sense here.

return it unparsed so it could be parsed by existing Cue sheet parsers.

Currently the case (beside issue with " / "): you retrieve the content from "cuesheet" field, then parse it (intermediate temporary action: replace " / " with carriage return).
No plan to parse it (not the MediaInfo goal).

Replacing " / " back to line feeds can be problematic because it might be that the Cue sheet itself could contain this character sequence.

Definitely a bad design choice some time ago when I had only the text output.
I think this would not be too complicated for adding an option for avoiding this change (text output would be weird, but as you use the API it would be fine)

@Sami32
Copy link
Contributor Author

Sami32 commented Aug 9, 2018

Ok, then for reference i leave a link here:

And that one in Java:
http://www.jthink.net/jaudiotagger/javadoc/org/jaudiotagger/audio/flac/metadatablock/package-summary.html

A better FLAC with embedded cuesheet sample should be found here:
http://www.rapidshare.space/6ob54nW

@Sami32
Copy link
Contributor Author

Sami32 commented Aug 9, 2018

@Sami32
Copy link
Contributor Author

Sami32 commented Aug 9, 2018

This is how look the structure of an external CUE file:
Max Greger - Max Greger plays The Best Of Glenn Miller.cue.txt

@Sami32
Copy link
Contributor Author

Sami32 commented Aug 9, 2018

@JeromeMartinez Great +1
Thank you for your tips, that worked fine. I was searching a listed parameter without success, so your help was very helpful. Thank you very much 👍

@Sami32
Copy link
Contributor Author

Sami32 commented Aug 9, 2018

@JeromeMartinez Shouldn't such parameters as "cuesheet" be added somewhere in the internal help documentation specifying that additional "general" string can be used?

EDIT:
In that case it is only for FLAC but i suspect that some other undocumented possibilities are available for other formats as well?

@JeromeMartinez
Copy link
Member

JeromeMartinez commented Aug 9, 2018

internal help documentation

Which one? ;-)
There is no document as nobody is interested in sponsoring it, so...
extra fields (not supported but "pass-through") are possible for any track kind, not only "general".

@Sami32
Copy link
Contributor Author

Sami32 commented Aug 9, 2018

--Help
Yeah, i know that documentation is a pain for most of us.
Ok.

@JeromeMartinez
Copy link
Member

Yeah, i know that documentation is a pain for most of us.

I'll be a bit spiteful: looks like documentation status is considered "enough" so not really a pain, at least it is not worth having more for most people.
Mediainfo Usage Documentation vote.

(Note: I know you use MediaInfo on your spare time and you send lot of patches and do lot of tests, not willing to be spiteful to you especially, just general remark)

@Sami32
Copy link
Contributor Author

Sami32 commented Aug 9, 2018

I'm very happy to have discovered that "pass-through" ability ;)
I was just wondering if you could avoid similar issue report by just adding a little something about that "pass-through" possibility in the --Help.

Well, i hope you didn't get that remark for you, i mean i didn't even managed to get the courage and will to document our project. It wasn't negative, just that most project around are badly documented for some reason and maybe you are right that people don't read it that much in that era.

@JeromeMartinez
Copy link
Member

I was just wondering if you could avoid similar issue report by just adding a little something about that "pass-through" possibility in the --Help

I think this is too much details for --Help, especially because --Help is for command line usage and not general documentation about MediaInfo fields. It should be in a documentation about MediaInfo fields (which does not exist, so lot to do for creating documentation introduction, general presentation... Before talking about such details).

@Sami32
Copy link
Contributor Author

Sami32 commented Aug 9, 2018

It was just to make the add painless, but forget about, my point was not to make you upset about the documentation :(

@Sami32 Sami32 closed this as completed Aug 9, 2018
@JeromeMartinez
Copy link
Member

Sami32 closed this

but I don't forget to add the option for having carriage returns correctly, ETA this week.

@Sami32
Copy link
Contributor Author

Sami32 commented Aug 9, 2018

Thank you very much 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants