Hydrogenaudio Forums

CD-R and Audio Hardware => CD Hardware/Software => Topic started by: nyaochi on 2006-10-14 11:02:07

Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2006-10-14 11:02:07
This is the announcement of Cuesheet Processor (CueProc), the successor of my Audio CD Image Reader (ACDIR) though I'm not sure how many users at hydrogenaudio.org are still using ACDIR.    Not having updated ACDIR for over a year, I felt sorry for some users who reported some problems in ACDIR. I was planning to rewrite the tool in Python to simplify the usage (I didn't like the variable syntax in ACDIR), to enhance some features, and to reduce the effort necessary for maintaining the source code. I hope you like this new tool. 

Homepage: http://nyaochi.sakura.ne.jp/xoops/modules/...write/tc_6.html (http://nyaochi.sakura.ne.jp/xoops/modules/mysoftwares/rewrite/tc_6.html)
Download URL: http://nyaochi.sakura.ne.jp/xoops/modules/...id=1&lid=14 (http://nyaochi.sakura.ne.jp/xoops/modules/mydownloads/singlefile.php?cid=1&lid=14)

Cuesheet Processor (CueProc) is a command-line tool for converting audio CD images into another format such as WAV, MP3, Ogg Vorbis, MP4, MPC, WMA, etc. The functions of this tool can be summarized:Example of CueProc usage:
Code: [Select]
> cueenc.bat -c oggenc -p "-q4" CDImage.cue
> cueenc.bat -c lame -p "-V5 --vbr-new" CDImage.wv
> cueenc.bat -c neromp4 -p "-br 128000" --target list.txt


Pros of CueProc over ACDIRCons of CueProc over ACDIRIf you have any suggestions to this program, write it in this thread or send an email to me.
Title: Cuesheet Processor (CueProc)
Post by: Synthetic Soul on 2006-10-14 13:11:50
nyaochi,

Thank you for progressing ACDIR.

REACT uses ACDIR to split images to tracks, so I would say that it has proved very useful to many people, including me.

I actually spotted this on your website a couple of days ago, so it is already included in the wiki cuesheet (http://wiki.hydrogenaudio.org/index.php?title=Cuesheet#Splitting)page.  I was contemplating PM'ing you about it but you beat me to the punch thankfully.

Personally I am very happy with the way ACDIR works, and I was wondering what benefit there would be to switching, so, many thanks for the list above.  I'll have to take a look to see what additional variables there are.

Thanks again.
Title: Cuesheet Processor (CueProc)
Post by: drbeachboy on 2006-10-14 18:30:14
I've tried using CueProc to encode Nero MP4 files and I get this error: "WARNING: No suitable output class found".
cueenc -c neroaacenc_sse2 -p "-q 0.53" "soss.cue"

Yet, it worked perfectly with LAME using this cuesheet. 
cueenc -c lame -p "-V5 --vbr-new" "soss.cue"

I have all necessary files in my path: Neroaacenc_sse2.exe, Neroaactag.exe. To keep it simple for testing, I placed all files in my E:\DOS directory.

Thanks in advance for the help.
Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2006-10-14 18:57:11
CueProc -c option specifies a codec name, which is like a preset name for an encoder. Codec name and binary name are different for some encoders. If you want to use Nero MP4 encoder, specify:
Code: [Select]
cueenc -c neromp4 -p "-q 0.53" "soss.cue"


To see the list of codec names and the information about a codec:
Code: [Select]
cueenc -l
cueenc --help-codec neromp4
Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2006-10-14 19:15:05
I actually spotted this on your website a couple of days ago, so it is already included in the wiki cuesheet (http://wiki.hydrogenaudio.org/index.php?title=Cuesheet#Splitting)page.  I was contemplating PM'ing you about it but you beat me to the punch thankfully.

Hi Synthetic Soul,

Thanks for the Wiki page and your effort at this forum (I like your lossless compression page though this is an off-topic    ). I was going to write an announcement here when the documentation reaches at some level. I didn't expect that you would find the release at my home page.
Title: Cuesheet Processor (CueProc)
Post by: rohangc on 2006-10-14 20:16:33
Thanks for your great work nyaochi! I am in the process of backing up my entire CD collection to FLAC. I will definitely use your new program.
Title: Cuesheet Processor (CueProc)
Post by: drbeachboy on 2006-10-14 21:29:00
Thank you, nyaochi!

Also, is there a way to make the extenstion "m4a" instead of "mp4"? I use an iPod, so I must have the "m4a" to play the file.
Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2006-10-15 07:38:18
Also, is there a way to make the extenstion "m4a" instead of "mp4"? I use an iPod, so I must have the "m4a" to play the file.

I released CueProc 1.3 for this enhancement. CueProc 1.3 now has -e (--codecext) option to change the extension of output files from the default one set by the codec.
Code: [Select]
cueenc -c neromp4 -e ".m4a" -p "-q 0.53" "soss.cue"
Title: Cuesheet Processor (CueProc)
Post by: drbeachboy on 2006-10-15 16:19:58
Thank you again, nyaochi. The -e option is terrific! I was tearing my hair out trying to get the .m4a result through "extpipe", but was unsuccesful.

Two last questions for you, though.
1. If I use "neromp4", am I restricted to the path and filename structure? i.e. "...\neromp4\tracknumber_title.ext"
I tried -o "$tracknumber $TITLE", but CueProc quit before encoding started, so I am assuming that I misunderstood the meaning of the -o option.

2. What option(s) do I use so that I can use a vorbis comment tag cuesheet in my FLAC image?

Thanks a lot for answering my questions so promptly and for working on CueProc.
Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2006-10-16 08:04:00
1. If I use "neromp4", am I restricted to the path and filename structure? i.e. "...\neromp4\tracknumber_title.ext"

No. The output directory can be specified by -d option. Please refer to the example (which is default) in cueenc.bat: -d ..\${codec}\${cuesheet_path}. You can modify cueenc.bat for your convenience or overwrite it in a command-line for cueenc.bat.

I tried -o "$tracknumber $TITLE", but CueProc quit before encoding started, so I am assuming that I misunderstood the meaning of the -o option.

I can't reproduce this problem although this does not address the above issue.

2. What option(s) do I use so that I can use a vorbis comment tag cuesheet in my FLAC image?

This was found to be a bug, and CueProc 1.4 was released.
Title: Cuesheet Processor (CueProc)
Post by: drbeachboy on 2006-10-16 16:51:25
Hi Nyaochi,

I think I may of found a bug in version 1.4. Using the same code as above (3 posts up), the program seems not to be able to run "neroAacTag" correctly. After each encoding I get this message "ERROR: Could not create temporary file.", then "Updating MP4 file... Could not update MP4 file." The file encodes and plays fine, but there are no tags. This happens with a regular cuesheet or the embedded cuesheet in the FLAC image.

Thanks again for your help.
Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2006-10-16 18:07:32
Please spot the cause of your problem exactly. I have no idea about your problem. CueProc will not create a temporary file with 'neromp4' codec.

The task of CueProc is just to generate command-lines for encoding and tagging tracks. For example, CueProc generates the following two command-lines to encode the first track of an album with Nero Digital MP4 encoder:
Code: [Select]
getaudio --begin 00:00:00 --end 04:48:27 Z:\cdimage\ScissorSisters\TaDah\CDImage.flac | neroaacenc_sse2 -if - -of "..\neromp4\ScissorSisters\TaDah\01_I DON'T FEEL LIKE DACNCIN'.mp4"
neroaactag "..\neromp4\ScissorSisters\TaDah\01_I DON'T FEEL LIKE DACNCIN'.mp4" -meta:title="I DON'T FEEL LIKE DACNCIN'" -meta:artist="SCISSOR SISTERS" -meta:album="TA-DAH" -meta:track="1" -meta:genre="Pop" -meta:year="2006"

'getaudio.exe' is a small program, which comes with CueProc, to extract audio stream in an audio file and to send the stream to STDOUT. 'neroaacenc_sse2.exe' will receive the audio stream from STDIN and output an MP4 file. Then CueProc runs 'neroaactag.exe" to set tag values to the output file. CueProc generates these command-lines from a target cuesheet based on a template built in 'neromp4' codec. You can see these command-lines by CueProc -n, (--rehearsal) option. You can test these command-lines manually via the command prompt.

If you found a problem in command-lines generated by CueProc, please let me know which part was wrong and to be fixed. If no problem is found in the command-lines (i.e., CueProc worked correctly at least), I have no idea how to fix it.
Title: Cuesheet Processor (CueProc)
Post by: drbeachboy on 2006-10-16 19:10:16
Ok nyaochi,

Here's the deal. To test, I used neroaactag to tag one mp4 file created through CueProc and one created from foobar2000, with both programs using the nero standalone encoder. Then I manually tagged each file just -meta:ARTIST. The foobar created file tagged properly, but the one created through CueProc gave the same error as stated in my previous post. So, can I assume that since the files play ok, that something is wrong with the mp4 container during creation?

When I used the -n option, everything in the commandline looked perfect. All tag fields were correct, the path & filename were correct. Both encoder & tagger were listed. Neroaactag does not like the file that is being passed to it.

I am not trying to be a pain in the ass. I'm just letting you know that there is something not right. Everything in this area worked as expected in 1.3, but not in 1.4. I will try again on a different machine and see if I get the same results.
Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2006-10-16 20:24:53
So, can I assume that since the files play ok, that something is wrong with the mp4 container during creation?
As I wrote before, CueProc does not touch the output MP4 files at all but just lets neroaacenc_sse2.exe encode with some parameters (encoder options, input filename, output filename, etc). I suspect the neroaactag.exe does not like the path/file name of M4A files, but just speculation.

When I used the -n option, everything in the commandline looked perfect. All tag fields were correct, the path & filename were correct. Both encoder & tagger were listed. Neroaactag does not like the file that is being passed to it.
Did you enter the command-lines (encoding and tagging) directly to the command prompt to check the correctness of the command-lines, i.e., to see whether if the command-lines surely write tag information?

I am not trying to be a pain in the ass. I'm just letting you know that there is something not right.
Yeah, I know.  I just need more information to find out this problem. I can't reproduce your problem in my environment. I have no idea what causes this problem and how to fix this problem with this information.

Everything in this area worked as expected in 1.3, but not in 1.4.
Are you sure? I think the changes between 1.3 and 1.4 are too small to make the difference. You can download 1.3 for testing:
http://nyaochi.sakura.ne.jp/dist/cueproc-1.3_win32.zip (http://nyaochi.sakura.ne.jp/dist/cueproc-1.3_win32.zip)
Title: Cuesheet Processor (CueProc)
Post by: drbeachboy on 2006-10-16 23:49:38
Hi nyaochi,

Well, I got home from work today and all is well, running on my home computer. My computer at work must have quirks. It was not allowing neroaactag to create it's temporary file for tagging. Thank you for your time and patience. My apologies for driving you crazy!
Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2006-10-17 00:23:59
Hi drbeachboy,

No problem at all. Good to hear that you sorted out the issue. 
Title: Cuesheet Processor (CueProc)
Post by: drbeachboy on 2006-10-18 02:44:37
Hi nyaochi,

I have a question regarding tagging. Currently, I use REACT to encode to a FLAC image, which in turn calls ACDIR to encode and tag tracks with Nero. ACDIR calls neroAacTag, and gives me the option to choose which meta that I want to carry over to my m4a files. Especially BAND, TOTALTRACKS and sometimes COMMENT tags. So the question arises; is there a way to add additional tags in CueProc? Can "extpipe" serve that purpose or is that something that you would have to add to CueProc?

I have CueProc working with REACT, but as expected, my m4a files only get tagged with the 6 standard tags in "neromp4".

Thanks again for all your help and fielding all my questions. 
Title: Cuesheet Processor (CueProc)
Post by: Sebastian Mares on 2006-10-18 22:41:07
How does CueProc handle pre-gaps? Does it append them to the previous track, does it pre-pend them to the next track or does it ignore them?
Title: Cuesheet Processor (CueProc)
Post by: Synthetic Soul on 2006-10-19 07:52:58
I would suggest that it appends them to the previous, as it only deals with 01 indexes.  This was certainly true for ACDIR.
Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2006-10-19 10:38:25
I have a question regarding tagging. Currently, I use REACT to encode to a FLAC image, which in turn calls ACDIR to encode and tag tracks with Nero. ACDIR calls neroAacTag, and gives me the option to choose which meta that I want to carry over to my m4a files. Especially BAND, TOTALTRACKS and sometimes COMMENT tags. So the question arises; is there a way to add additional tags in CueProc? Can "extpipe" serve that purpose or is that something that you would have to add to CueProc?

I think there are four options to deal with this topic:I will address options 1, 2, and 3 in the next release.

How does CueProc handle pre-gaps? Does it append them to the previous track, does it pre-pend them to the next track or does it ignore them?

I would suggest that it appends them to the previous, as it only deals with 01 indexes.  This was certainly true for ACDIR.

Yes, CueProc assumes INDEX 01 as track boundaries, similarly to ACDIR. Audio stream between INDEX 00 and INDEX 01 of a track belongs to the previous track.
Title: Cuesheet Processor (CueProc)
Post by: drbeachboy on 2006-10-19 16:29:57
Hi nyaochi,

The tags stated above are not from REM's in the cuesheet, but rather from "PERFORMER" (top one in cuesheet) for BAND (Album Artist) and EAC's options %x for "TOTALTRACKS" and %e for "COMMENT".

In neroAacTag, "TOTALTRACKS" and "COMMENT" are standard meta field names, while "BAND" or "ALBUM ARTIST" would come from the "-meta-user:" command.

As for these tags being "Rare" as you stated above, maybe once upon a time they were, but these days ALBUM ARTIST & TOTALTRACKS are much more commonplace. My album playlists in foobar2000 won't display correctly unless it sees the TOTALTRACKS tag. I use it as the trigger to display "Album" view or "Single" view.

In the end, flexibility and ease of use are the keys to people using programs. I am sure that striking that balance between the two is a tough thing to acheive for you programmers. So, thank you for listening to us, for sharing your programs with us, and for continually trying to make them better. It is very much appreciated!
Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2006-10-21 11:17:32
CueProc 1.5 was released. Changes from 1.4 are:
The tags stated above are not from REM's in the cuesheet, but rather from "PERFORMER" (top one in cuesheet) for BAND (Album Artist) and EAC's options %x for "TOTALTRACKS" and %e for "COMMENT".
CueProc 'neromp4' plugin now sets totaltracks, disc, totaldiscs, url, copyright, comment, composer, isrc fields.

In neroAacTag, "TOTALTRACKS" and "COMMENT" are standard meta field names, while "BAND" or "ALBUM ARTIST" would come from the "-meta-user:" command.
As for album artist, I didn't employ any of these as the standard because four different approach to set album artist for MP4 seem to exist at this moment: Tunes' "aART" atom; comment atom with "BAND"; comment atom with "ALBUMARTIST"; and comment atom with "ALBUM ARTIST". I can't force any of these as the standard, not being an MP4 user.

If you want to add "-meta-user:album artist=XXX" only when the target cuesheet is a compilation release, use -s (--setvar) option to set "output_option_tag" variable, which is referred to by any output plugins:
Code: [Select]
Z:\cdimage>cueenc -c "neromp4" -s "output_option_tag=#if{bool(track.get('COMPILATION'))}${quot}-meta-user:album artist=${ALBUMARTIST}${quot} ${quot}-meta-user:compilation=1${quot}#endif" VariousArtists\Now64\NOW64_disc1.cue
Note: The following is an example of 'extpipe' usage for neroaacencoder:
Code: [Select]
Z:\cdimage>cueenc -c extpipe -m "neroaacenc -if - -of $quot${output}.mp4$quot" -m "neroaactag $quot${output}.mp4$quot $quot-meta:title=${TITLE}$quot $quot-meta:artist=${ARTIST}$quot $quot-meta:album=${ALBUM}$quot" "BonniePink\EverySingleDay\disc1.cue"
You can define your command-line patterns to be invoked by CueProc.
Title: Cuesheet Processor (CueProc)
Post by: coffeebucket on 2006-12-13 05:53:31
Thanks for your work on this tool nyaochi.  For the most part it's helped me get around  some of the [a href='index.php?showtopic=48977']limitations I found with ACDIR[/a].  But in running it through its paces, I've come across some new issues.  I'm hoping you can shed some light on the situation.

My directory layout is pretty much the same as what you use in the CueProc example.  I.e. all images under one directory and all transcoded files under another.  So to transcode all FLAC images into MP3s I find all the FLACs
Code: [Select]
cueproc --find *.cue > cues.txt

and let CueProc do its thing
Code: [Select]
cueproc -c lame -p "-V2 --vbr-new" -d "..\Compressed\$cuesheet_path" -o "$TRACKNUMBER $ARTIST - $TITLE" --target=cues.txt

With the exception of a few minor tag issues (temporarily resolved with --ignore-tag-errors) the first pass ran through the 1000+ images without a hitch.  As CueProc's behaviour (like its predecessor) is to ignore existing files, I intended to run through the process again after adding one or more new images to the images directory.  This is, however, where the problem occurred.

Running through the process a second time, CueProc tripped up and stopped relatively early on giving me this error message:
Code: [Select]
CueProc: Albums01\Beastie Boys\Hello Nasty - Bonus Disc\Beastie Boys - Hello Nas
ty - Bonus Disc.cue [02/04]
WARNING: Traceback (most recent call last):
  File "cueproc.py", line 556, in <module>
  File "cueproc.py", line 352, in process
  File "cueproc.py", line 159, in warn
  File "encodings\cp437.pyc", line 12, in encode
UnicodeEncodeError: 'charmap' codec can't encode character u'\xb4' in position 1
13: character maps to <undefined>


I removed the offending image and all images processed up to that point from cues.txt, and started the process again.  A little later, it happened again.
Code: [Select]
CueProc: Albums01\Morcheeba\Charango\Morcheeba - Charango.cue [04/12]
WARNING: Traceback (most recent call last):
  File "cueproc.py", line 556, in <module>
  File "cueproc.py", line 352, in process
  File "cueproc.py", line 159, in warn
  File "encodings\cp437.pyc", line 12, in encode
UnicodeEncodeError: 'charmap' codec can't encode character u'\xe3' in position 8
2: character maps to <undefined>


Similar errors occurred a dozen or so times throughout the second pass.  Interestingly, all errors were for existing images which had already been transcoded in the first pass.  Examining the problem further, track 4 from "Morcheeba - Charango.cue" is
Code: [Select]
  TRACK 04 AUDIO
    TITLE "São Paulo"
    PERFORMER "Morcheeba"
    ISRC GBAHS0200047
    FLAGS DCP
    INDEX 01 11:16:30

The name of the file produced in the first pass is
Code: [Select]
M:\Music\Compressed\Albums01\Morcheeba\Charango>dir /b
[...]
04 Morcheeba - São Paulo.mp3


But Tag reports the track's details as
Code: [Select]
M:\Music\Compressed\Albums01\Morcheeba\Charango>tag "04 Morcheeba - São Paulo.mp3"
Tag - Automatic Tag from filename
Copyright (c) 2002-2003 Case.  Minor additions by Neil Popham, 2004-2005
Version 2.0.43, Compiled 2005-04-21

M:\Music\Compressed\Albums01\Morcheeba\Charango\04 Morcheeba - Sao Paulo.mp3
Format:  MPEG 1 Layer 3, Joint Stereo
Details: 44100 Hz Stereo, 204 kbps, playtime 04:29
Tags:    ID3v1, ID3v2
Title:   Sao Paulo
Artist:  Morcheeba
Album:   Charango
Year:    2002
Track:   4
Genre:   Trip-Hop
Comment:
Encoder=LAME v3.97


The "ã" in the track title has been replaced with an "a". Similar characters substitutions have occurred in the other cases.  E.g.

Interestingly most other characters with diacritic marks seemed to have got through without issue.  E.g. ç and ô.  Does anyone know what might be causing this?  If you require any additional information, please let me know.

The other minor issue I've found is with genre ID3v2 tags.  After modifying the genre field in all the source .cue files to match an item in the "lame --genre-list" output (effectively working around a [a href='index.php?showtopic=34170']silly LAME ID3v2 genre tag issue[/a]), I still get errors like this
Code: [Select]
CueProc: Albums01\Angie Stone\Black Diamond\Angie Stone - Black Diamond.flac [09
/16]
getaudio --begin 30:35:03 --end 32:11:70 "M:\Music\Images\Albums01\Angie Stone\B
lack Diamond\Angie Stone - Black Diamond.flac" | lame --tt "Black Diamond & Blue
Pearls (Interlude)" --ta "Angie Stone" --tl "Black Diamond" --tn 09 --tg R&B --
ty 1999 --add-id3v2 -V2 --vbr-new - "..\Compressed\Albums01\Angie Stone\Black Di
amond\09 Angie Stone - Black Diamond & Blue Pearls (Interlude).mp3"
Unknown genre: 'R'.  Specify genre name or number
'B' is not recognized as an internal or external command,
operable program or batch file.

I've seen problems with the genres "R&B", "Folk/Rock" and "Pop/Funk".  At a guess I'd say the ampersand and forward slash characters are getting in the way.

On the positive side, messages just appear as warnings and don't kill processing.  On the negative side it means tags aren't being properly written to the transcoded files.  And seeing as it's not stopping processing, these characters in other fields may well be affecting other types of tags.

Finally, and possibly slightly off topic...

The MP3s produced by this process will almost exclusively be used with an iPod and iTunes. Through posts around HA and my own testing, it seems iTunes can't correctly group tracks from a various artist album using standard tags.  It requires the TPE2 "Album Artist" (a.k.a. "Band") tag to be present.

Despite the frame being part of the informal standard (http://www.id3.org/id3v2.3.0.html#TPE2), LAME does not seem to support it.  Can anyone suggest a command line tool that will do the job as part of the CueProc transcode process?  So far the only solution I've seen is to do it all manually through a tool like Mp3tag, The GodFather, or even iTunes itself.  All help is greatly appreciated.
Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2007-01-11 04:14:16
Thank you for the detail report of your problem. So sorry for my late reply. I simply forgot about this while I was focussing on other jobs.    I released CueProc 1.7 a few days ago.

Running through the process a second time, CueProc tripped up and stopped relatively early on giving me this error message:
Code: [Select]
CueProc: Albums01\Beastie Boys\Hello Nasty - Bonus Disc\Beastie Boys - Hello Nas
ty - Bonus Disc.cue [02/04]
WARNING: Traceback (most recent call last):
  File "cueproc.py", line 556, in <module>
  File "cueproc.py", line 352, in process
  File "cueproc.py", line 159, in warn
  File "encodings\cp437.pyc", line 12, in encode
UnicodeEncodeError: 'charmap' codec can't encode character u'\xb4' in position 1
13: character maps to <undefined>
CueProc assumes the character encoding for cuesheet as CP437 (DOS-US) in your environment. Please specify the character encoding for cuesheet manually by -w option. I'm not sure the correct character encoding for your case, but I guess something like ISO-8859-1. Encodings CP437 and ISO-8859-1 share the same characters for US-ASCII, but have different mappings for characters such as ü, Â, etc.

I removed the offending image and all images processed up to that point from cues.txt, and started the process again.  A little later, it happened again.
Code: [Select]
CueProc: Albums01\Morcheeba\Charango\Morcheeba - Charango.cue [04/12]
WARNING: Traceback (most recent call last):
  File "cueproc.py", line 556, in <module>
  File "cueproc.py", line 352, in process
  File "cueproc.py", line 159, in warn
  File "encodings\cp437.pyc", line 12, in encode
UnicodeEncodeError: 'charmap' codec can't encode character u'\xe3' in position 8
2: character maps to <undefined>
This is also because the wrong setting for the character encoding.

The other minor issue I've found is with genre ID3v2 tags.  After modifying the genre field in all the source .cue files to match an item in the "lame --genre-list" output (effectively working around a [a href='index.php?showtopic=34170']silly LAME ID3v2 genre tag issue[/a]), I still get errors like this
Code: [Select]
CueProc: Albums01\Angie Stone\Black Diamond\Angie Stone - Black Diamond.flac [09
/16]
getaudio --begin 30:35:03 --end 32:11:70 "M:\Music\Images\Albums01\Angie Stone\B
lack Diamond\Angie Stone - Black Diamond.flac" | lame --tt "Black Diamond & Blue
Pearls (Interlude)" --ta "Angie Stone" --tl "Black Diamond" --tn 09 --tg R&B --
ty 1999 --add-id3v2 -V2 --vbr-new - "..\Compressed\Albums01\Angie Stone\Black Di
amond\09 Angie Stone - Black Diamond & Blue Pearls (Interlude).mp3"
Unknown genre: 'R'.  Specify genre name or number
'B' is not recognized as an internal or external command,
operable program or batch file.
Oops, R&B should be quoted. I'll fix this.

The MP3s produced by this process will almost exclusively be used with an iPod and iTunes. Through posts around HA and my own testing, it seems iTunes can't correctly group tracks from a various artist album using standard tags.  It requires the TPE2 "Album Artist" (a.k.a. "Band") tag to be present.

Despite the frame being part of the informal standard (http://www.id3.org/id3v2.3.0.html#TPE2), LAME does not seem to support it.  Can anyone suggest a command line tool that will do the job as part of the CueProc transcode process?  So far the only solution I've seen is to do it all manually through a tool like Mp3tag, The GodFather, or even iTunes itself.  All help is greatly appreciated.
I wrote two patches for LAME frontend last month.

Adding user-defined ID3v2.3 frame:
http://sourceforge.net/tracker/index.php?f...amp;atid=300290 (http://sourceforge.net/tracker/index.php?func=detail&aid=1617408&group_id=290&atid=300290)
Albumart (APIC ID3v2.3 frame) patch:
http://sourceforge.net/tracker/index.php?f...amp;atid=300290 (http://sourceforge.net/tracker/index.php?func=detail&aid=1617425&group_id=290&atid=300290)

Building a LAME binary with these patch enabled, you can use options like:
--tv "TPE2=Any Genre" (User-defined genre name)
--tv TCMP=1 (Compilation flag used by iTunes)
--ti cover.jpg (Writing an albumart image in APIC frame)

I'm going to change the command-line template that CueProc uses for LAME once these patches are integrated in the official release. But I can't employ these options for CueProc at this stage.
Title: Cuesheet Processor (CueProc)
Post by: coffeebucket on 2007-01-11 05:28:24
Thank you for the detail report of your problem. So sorry for my late reply. I simply forgot about this while I was focussing on other jobs.    I released CueProc 1.7 a few days ago.

Thank you for the time and effort spent on developing this application.  I can't stress enough how much I appreciate your work.  I'll run 1.7 against my problematic files and report back on how it went.
Adding user-defined ID3v2.3 frame:
http://sourceforge.net/tracker/index.php?f...amp;atid=300290 (http://sourceforge.net/tracker/index.php?func=detail&aid=1617408&group_id=290&atid=300290)
Albumart (APIC ID3v2.3 frame) patch:
http://sourceforge.net/tracker/index.php?f...amp;atid=300290 (http://sourceforge.net/tracker/index.php?func=detail&aid=1617425&group_id=290&atid=300290)

Building a LAME binary with these patch enabled, you can use options like:
--tv "TPE2=Any Genre" (User-defined genre name)
--tv TCMP=1 (Compilation flag used by iTunes)
--ti cover.jpg (Writing an albumart image in APIC frame)

I'm going to change the command-line template that CueProc uses for LAME once these patches are integrated in the official release. But I can't employ these options for CueProc at this stage.

Your coverart, TPE2 and TCMP tag option extensions to LAME are exactly what I'm looking for.  I don't possess the tools or knowledge to build LAME for myself but, if you do, and you're looking for someone to test it along side the planned CueProc template changes, I'd be more than happy to do some testing.
Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2007-01-11 16:37:05

Adding user-defined ID3v2.3 frame:
http://sourceforge.net/tracker/index.php?f...amp;atid=300290 (http://sourceforge.net/tracker/index.php?func=detail&aid=1617408&group_id=290&atid=300290)
Albumart (APIC ID3v2.3 frame) patch:
http://sourceforge.net/tracker/index.php?f...amp;atid=300290 (http://sourceforge.net/tracker/index.php?func=detail&aid=1617425&group_id=290&atid=300290)

Building a LAME binary with these patch enabled, you can use options like:
--tv "TCON=Any Genre" (User-defined genre name)
--tv TCMP=1 (Compilation flag used by iTunes)
--ti cover.jpg (Writing an albumart image in APIC frame)

I'm going to change the command-line template that CueProc uses for LAME once these patches are integrated in the official release. But I can't employ these options for CueProc at this stage.

Your coverart, TPE2 and TCMP tag option extensions to LAME are exactly what I'm looking for.  I don't possess the tools or knowledge to build LAME for myself but, if you do, and you're looking for someone to test it along side the planned CueProc template changes, I'd be more than happy to do some testing.

I uploaded the Win32 binary at:
http://www.hydrogenaudio.org/forums/index....showtopic=51781 (http://www.hydrogenaudio.org/forums/index.php?showtopic=51781)

BTW, the genre frame was "TCON" (I made a mistake in my posts). 
Title: Cuesheet Processor (CueProc)
Post by: coffeebucket on 2007-01-17 05:42:18
I'm pleased to report explicitly stating a character set (ISO-8859-1) with the -w switch processes the previously problematic cue sheets without any issues.  In combination with your unofficial LAME build, the command line ended up being
Code: [Select]
cueproc -c lame -p "-V2 --vbr-new --ignore-tag-errors --ti $quot$cuesheet_path\FrontCover.jpg$quot" -d "..\Compressed\$cuesheet_path" -o "$TRACKNUMBER $ARTIST - $TITLE" -w ISO-8859-1 --target=cues.txt

I've got a few questions I'm hoping you can help with.

LAME build
If it weren't for your recommendation not to, I'd transcode my entire collection now using the LAME binary as provided.  Aside from the obvious (head code, almost completely raw, no testing, etc.) are there any other reasons not to make use of this build?  Could the patch easily be applied to the 3.97 release code?  I've noticed compression times aren't particularly quick.  Which compile options did you use on the build?

Compilation flag
If I were to transcode my whole collection at the moment, I would need to run CueProc twice:
The CueProc help mentions a --no-auto-compilation option.  I'm assuming this will work in conjunction with LAME once the functionality has been officially implemented.  If so, how would this work with other formats?  Can you please elaborate.

Album art existence
Nearly every album in my collection has an album art file (FrontCover.jpg), but there are some that do not.  For the one's that don't, I'd like to insert a placeholder image during the process.  Can CueProc test for a file's existance?  I'd guess that it would resemble this
Code: [Select]
--ti #if{exists('FrontCover.jpg')}FrontCover.jpg#else<placeholder image>.jpg#endif

External metadata tool
Another thread about [a href='index.php?showtopic=51331']arbitrary ID3v2 frames[/a] (which mentions your LAME patches) discusses the metamp3 tool and the possibility of an "official" metadata tool.  Can CueProc make use of an external tool for defining metadata during processing?  If so, how would this be achieved with the current version?  This may provide a solution for adding compilation tags and album art, as well as replaygain/mp3gain and other arbitrary tags.

Finally, when looking further into the various character encodings the other day, I came across a character encoding auto-detection library (http://chardet.feedparser.org/) written in Python.  Might this be something you would consider incorporating into CueProc? Considering the issues I've faced, it may save someone a few headaches 
Title: Cuesheet Processor (CueProc)
Post by: Balthazar_B on 2007-02-03 13:35:09
I've just started looking at CueProc as a diversion from problems I was having with acdir in REACT, and it looks very very nice (and nyaochi, you've done a great job evolving it -- THANK YOU!), but this leads me to a feature request.

As a bit of background, I'd like to do a one-pass CD rip that will:Now with REACT I can do most of this if I operate entirely in track mode. REACT uses iTunesEncode to do the m4a track generation, but so far I've found no way to do this with acdir if REACT is in image mode. I'm beginning to think iTunesEncode (via acdir) is not capable of being scripted to be part of an image-based routine.

So the feature request is to let CueProc leverage iTunes' COM model directly (instead of iTunesEncode which is no longer supported, since the source code has been lost, and which may break anyway with a future version of iTunes). Omni Encoder does this already, by the way (but great as it is, OE isn't a one-pass system). 

The reason I want to use iTunes' AAC encoding is because of gapless playback on iPods; so far, NERO-encoded AAC will not reliably play back gapless on 5G iPods, and may never (I don't want to get into whose fault this is, since that discussion will not solve anything).  And I own many gapless CDs.  Lame-encoded MP3 will play gapless on an iPod, but in listening test I've done across my music library, the m4a output (at equivalent encoding rates/file sizes) is often superior to Lame mp3 on the systems through which I play music from the iPod (car, headphones). I've tried tweaking Lame settings, but have found I need to go to 160 VBR to get reliably and noticeably better output to m4a at 128 (and that advantage is offset by the reduction in storage capacity on the iPod).  Nero-encoded AAC sounds as good, but still has the gapless problem.

Now I love REACT and while nobody so far (as far as I know) has gotten it to work with CueProc (as a replacement for acdir, which it already works with), my guess is that it's only a matter of not much time before that happens.  If CueProc already worked directly with iTunes (similar to how it works with Lame, OggEnc, and WMA, etc.), nirvana would not be too far away!

Thanks, nyaochi, for considering this request!
Title: Cuesheet Processor (CueProc)
Post by: Deep_Elem on 2007-02-14 17:52:58
I really like this tool. Thanks for all the work you've put into it. I had a few issues with it when I first started using it, but all but one of them has been addressed by the various updates and posts here.

The only issue I still have is that the old acdir tool had a switch called '--hidden-track-1' that would cause the audio in INDEX 00 in TRACK 01 to be appended at the beginning of the first track. That switch doesn't seem to work with cueproc and the default behavior of cueproc is to skip the audio from INDEX 00 of TRACK 01. Is there a way around this other than deleting the INDEX 00 line from the cue sheet?

Thanks.
Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2007-02-14 18:48:53
Oops, I should have watched at this thread. Sorry for the late reply as always... 

LAME build
If it weren't for your recommendation not to, I'd transcode my entire collection now using the LAME binary as provided.  Aside from the obvious (head code, almost completely raw, no testing, etc.) are there any other reasons not to make use of this build?  Could the patch easily be applied to the 3.97 release code?  I've noticed compression times aren't particularly quick.  Which compile options did you use on the build?

MSVC2005. I don't have the latest version of Intel C++ compiler and can't provide the faster compile. Please ask, for example, john33 to build LAME binary with these patches enabled. I'm reluctant to distribute a LAME binary because it may be illegal to distribute an MP3 encoder due to the patent issue in my country and because I can't provide 'guranteed' service of maintaining the binary.

Compilation flag
If I were to transcode my whole collection at the moment, I would need to run CueProc twice:
  • once against a list albums with a single performer without "TCMP=1"
  • and again against a list of albums with multiple performers with "TCMP=1".
The CueProc help mentions a --no-auto-compilation option.  I'm assuming this will work in conjunction with LAME once the functionality has been officially implemented.  If so, how would this work with other formats?  Can you please elaborate.

The current CueProc issuees a compilation flag automatically with "nero_ap" and "oggenc". Unfortunately, it does not issue the flag to LAME encoder. This is because we need a LAME binary with the patch (user-defined ID3v2 frame) enabled, but it's not integrated to the official. I hope the patches to be integrated to the official, but it's up to the decision of LAME developers. I'm aware that the patch for albumart may be a bit problematic for them.

As for the other formats, please suggest me if you know the specification (or custom) to set compilation flag.

Album art existence
Nearly every album in my collection has an album art file (FrontCover.jpg), but there are some that do not.  For the one's that don't, I'd like to insert a placeholder image during the process.  Can CueProc test for a file's existance?  I'd guess that it would resemble this
Code: [Select]
--ti #if{exists('FrontCover.jpg')}FrontCover.jpg#else<placeholder image>.jpg#endif

I'll consider this.

External metadata tool
Another thread about [a href='index.php?showtopic=51331']arbitrary ID3v2 frames[/a] (which mentions your LAME patches) discusses the metamp3 tool and the possibility of an "official" metadata tool.  Can CueProc make use of an external tool for defining metadata during processing?  If so, how would this be achieved with the current version?  This may provide a solution for adding compilation tags and album art, as well as replaygain/mp3gain and other arbitrary tags.

Yes, it's possible although you need to change the source code. I will evaluate metamp3 tool for the possibility of using from CueProc.

Finally, when looking further into the various character encodings the other day, I came across a character encoding auto-detection library (http://chardet.feedparser.org/) written in Python.  Might this be something you would consider incorporating into CueProc? Considering the issues I've faced, it may save someone a few headaches 

In my opinion, those who use CueProc should be intellectual enough to be aware of the character encoding of a cuesheet. I will evaluate the library later, but the auto-detection of character encoding does not always work well. I guess the library leverages HTTP header and meta information to detect a character encoding.
Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2007-02-14 19:05:15
So the feature request is to let CueProc leverage iTunes' COM model directly (instead of iTunesEncode which is no longer supported, since the source code has been lost, and which may break anyway with a future version of iTunes). Omni Encoder does this already, by the way (but great as it is, OE isn't a one-pass system).

We don't have to integrate CueProc with iTunes COM interface. IMHO someone using iTunes should develop and maintain a command-line tool. If only a command-line tool (with STDIN input if possible) exists, I can write a module for the tool.

The reason I want to use iTunes' AAC encoding is because of gapless playback on iPods; so far, NERO-encoded AAC will not reliably play back gapless on 5G iPods, and may never (I don't want to get into whose fault this is, since that discussion will not solve anything).  And I own many gapless CDs.  Lame-encoded MP3 will play gapless on an iPod, but in listening test I've done across my music library, the m4a output (at equivalent encoding rates/file sizes) is often superior to Lame mp3 on the systems through which I play music from the iPod (car, headphones). I've tried tweaking Lame settings, but have found I need to go to 160 VBR to get reliably and noticeably better output to m4a at 128 (and that advantage is offset by the reduction in storage capacity on the iPod).  Nero-encoded AAC sounds as good, but still has the gapless problem.

Yeah, I understand that's a big reason.

Thanks, nyaochi, for considering this request!

Thanks for the suggestion. Please let me know if there's a good command-line tool for iTunes.

The only issue I still have is that the old acdir tool had a switch called '--hidden-track-1' that would cause the audio in INDEX 00 in TRACK 01 to be appended at the beginning of the first track. That switch doesn't seem to work with cueproc and the default behavior of cueproc is to skip the audio from INDEX 00 of TRACK 01. Is there a way around this other than deleting the INDEX 00 line from the cue sheet?

I'll implement this in the next version. It may take time as I will have a business trip for two weeks from this Friday.
Title: Cuesheet Processor (CueProc)
Post by: steveh on 2007-02-22 07:04:29
Hi,

I'm trying to use Cueproc to split Wavpack images into Nero AAC tracks.  Using the default "-c neromp4" option does what I want except for the filename and the comment.  The filename is easily changed by adding "--outputfn=$track - $title - $artist", but I can't figure out how to modify the comment.  At the moment, Cueproc writes the comment from the cuesheet.  Instead, I want "%date% NeroAAC Q0.35" (i.e. current date followed by encoder settings).  Can ayone help?

Thanks for the programme.

Stephen
Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2007-02-22 07:22:39
I'm trying to use Cueproc to split Wavpack images into Nero AAC tracks.  Using the default "-c neromp4" option does what I want except for the filename and the comment.  The filename is easily changed by adding "--outputfn=$track - $title - $artist", but I can't figure out how to modify the comment.  At the moment, Cueproc writes the comment from the cuesheet.  Instead, I want "%date% NeroAAC Q0.35" (i.e. current date followed by encoder settings).  Can ayone help?

I think -s (--setvar) option, which allows you to change values of any variables, should work. Please try:
Code: [Select]
-s "COMMENT=$DATE NeroAAC Q0.35"

This will overwrite the value of COMMENT variable set by CueProc based on the content of a cuesheet.

I'm now traveling abroad and can't test it by myself though.
Title: Cuesheet Processor (CueProc)
Post by: Deep_Elem on 2007-02-23 19:43:38
Thanks for your response to my earlier post, nyaochi. I realize you are a busy guy so I patiently await the next update of cueproc. It's a great tool. 

In the meantime, I have noticed two other minor behaviors of cueproc that you might want to have a look at when you get the opportunity. I have been experimenting with using cueproc for splitting to flac and wavpack formats using the -extpipe switch, and that's where these behaviors have come up, as follows:

1. Your website refers to the variable 'NUMTRACKS'. Within my tagging code, I have tried using the following code:

--tag=TOTALTRACKS=$quot${NUMTRACKS}$quot  [for flac output]
-w ${quot}TOTALTRACKS=${NUMTRACKS}$quot  [for wv output]

In both cases I get an error message that cueproc doesn't like the key 'NUMTRACKS', and the program aborts. But when I change numtracks to TOTALTRACKS in the above code, it works perfectly. The long and the short of it is I think your website just needs to be updated to show that the correct variable name is TOTALTRACKS, not NUMTRACKS.

2. Skipping existing files - This is supposed to be the default behavior of cueproc but it doesn't seem to work properly when making flac or wv files using the -extpipe switch. (It does, however, work as expected on the built-in lossy formats that I have tested, namely LAME, OGG and NeroAacEnc.)

In the case of flac and wavpack, I get an error message from the FLAC or WAVPACK executable saying that the file already exists. It's not a big problem, as Wavpack allows the user to tell it whether to overwrite the file or not, and Flac skips it and goes on to the next track. However, I would have expected that cueproc would itself skip a file that already exists and not even invoke flac.exe or wavpack.exe, as that seems to be how it functions with the built-in lossy codecs I have used.

In addition, there is a delay after flac.exe and wavpack.exe give the error messages. I suspect that cueproc is busy extracting the audio which is then being ignored by the codecs, because it seems that the delay lasts about as long as it takes to encode the track when I delete the existing output file and start from the beginning. I'm guessing, but I suspect this behavior might have something to do with the lack of built-in file extensions when using -extpipe. (I haven't been using the -e switch to set the extensions on flac and wavpack files since your website and posts here indicate that's not how to do it. Instead, I have been using code such as "-o $quot${output}.flac$quot" within the -m switch. This code works as expected.)

Neither flac.exe nor wavpack.exe has a switch forcing the codec to skip existing files, so I have to rely on cueproc to handle this. (They do have switches to force overwriting existing files, but that's not what I want to do).
Title: Cuesheet Processor (CueProc)
Post by: steveh on 2007-02-26 02:19:00
I think -s (--setvar) option, which allows you to change values of any variables, should work.

It sure does.  Thanks, Nyaochi.
Title: Cuesheet Processor (CueProc)
Post by: Deep_Elem on 2007-03-18 22:01:14
I think I have found a more serious bug when encoding to LAME. I discovered that a number of LAME files that I made with cueproc had bad headers according to mp3val and mp3guessenc. In each case, the mp3 file was misreporting its size by about 300 bytes bigger than it should have been. Fixing the headers with foobar2000 eliminated the problem but the LAME headers are now completely gone. I've been using lame 3.97 32-bits on Win XP.

I believe I have traced the problem to the way cueproc passes tagging commands to lame.exe. I did a work around and set cueproc to encode using the pipe, i.e. -c extpipe instead of -c lame. When I set lame to not tag the output files, they come out fine. Both mp3val and mp3guessenc report no errors. But when I duplicate the tagging of the -c lame switch I get the errors again, although they are slightly different in size depending on the precise tag parameters I use. I haven't managed to narrow down whether a particular tag command is causing the problem.

Has anyone else noticed this problem?
Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2007-03-18 23:05:27
How is the problem related with CueProc? The task of CueProc for lame is just to pass appropriate command-line parameters and to send the audio data to the pipe. What if you split tracks into WAVE files and enter the same command-line to LAME manually?

I have MP3 files encoded by CueProc and LAME3.98 (alpha) with no error reported by mp3guessenc.
Title: Cuesheet Processor (CueProc)
Post by: coffeebucket on 2007-03-18 23:51:53
Despite the previous character encoding issues I've had, CueProc's "--find" feature has always worked for me without incident.  But when I recently tried to enumerate a list of cue sheets, I received a familiar error
Code: [Select]
C:\Music\Images>cueproc --find *.cue > cues.txt
Cuesheet Processor (CueProc) Version 1.7 Copyright (c) 2006 by Nyaochi

Traceback (most recent call last):
  File "cueproc.py", line 552, in <module>
  File "cueproc.py", line 228, in find
  File "ntpath.pyc", line 334, in walk
  File "ntpath.pyc", line 334, in walk
  File "ntpath.pyc", line 334, in walk
  File "ntpath.pyc", line 328, in walk
  File "cueproc.py", line 224, in find_callback
  File "codecs.pyc", line 303, in write
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 24-26: invalid d
ata

The file/path that causes the error is
Code: [Select]
C:\Music\Images\Albums\Gotan Project\Lunático\Gotan Project - Lunático.cue

As I haven't touched any system level configuration on my machine recently, I can only assume a Windows update may be at fault.  I have also tried explicitly stating several system character sets with the "-W" switch (e.g. ISO-8859-1, windows-1252, utf-8) but they all produce the same result.

Redirecting the output of Windows' own "dir" command also garbles the path names so I'm running out of ideas.  Any help in the matter is greatly appreciated.
Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2007-03-19 00:34:42
This is the list of items I'm going to fix/add in CueProc 1.8. I think this list covers all reports/suggestions from users so far. The next release will be around the first of April. Please let me know if you have more reports/suggestions that are not included in the list.

CueProc 1.8 (2007-0x-xx):

[done]
- Support LAME with Nyaochi's patches applied as 'lame_nyaochi' encoder. This encoder supports albumartist, bpm, composer, copyright, disc-number, total-discs, and compilation variables.
- CueProc detects cover.jpg, albumart.jpg, or folder.jpg file as the albumart image. By default, CueProc willset ALBUMART variable if either of these files exists in the cuesheet directory. You can disable this feature by --no-auto-albumart option. CueProc does not overwrite ALBUMART variable if it is specified in the cuesheet.
- The batch file cueenc.bat now supports arguments more than 9.
- Support FLAC encoder
- Support WavPack encoder
- New option to configure the list of albumart filenames
- Fix ISO-8859-1/IBM-DOS encoding problem (in filenames described in cuesheet, --find command)
- New option: --hidden-track1 to include INDEX 00 of the first track

[Not a bug]
- Checking existence of an output file with 'extpipe' encoder
Wrong (CueProc tests the existence of output files by ${output}, but ${output} does not contain the extension ".flac"):
Code: [Select]
cueenc -c extpipe -m "flac -o $quot${output}.flac$quot" CDImage.cue
Correct (${output} will contain the extension ".flac"):
Code: [Select]
cueenc -c extpipe -e .flac -m "flac -o $quot${output}$quot" CDImage.cue


[planned]
- All done.

[deferred]
- Integration with metamp3 tagger. As I reported in this post (http://www.hydrogenaudio.org/forums/index.php?showtopic=49751&st=60#), I couldn't use metamp3 program to tag MP3 files with multi-byte characters (e.g., Japanese). I'll wait for this bug to be fixed.
Title: Cuesheet Processor (CueProc)
Post by: Deep_Elem on 2007-03-19 02:15:00
How is the problem related with CueProc? The task of CueProc for lame is just to pass appropriate command-line parameters and to send the audio data to the pipe. What if you split tracks into WAVE files and enter the same command-line to LAME manually?

I have MP3 files encoded by CueProc and LAME3.98 (alpha) with no error reported by mp3guessenc.

I just did some testing with lame 3.97 and lame 3.90.1 converting wave files on the command line. I set each up to apply tags. In both cases, mp3val reports that the mp3 files being produced are misreporting their size by about 300 bytes too many. So you are right, nyaochi. The problem isn't cueproc, it's lame.

Until I started using cueproc I never let lame.exe tag my files, so I've never had any reason to notice this problem before. I am amazed that with all the testing that lame receives and all the people here who use lame to apply tags from EAC, that a problem like this would crop up now.
Title: Cuesheet Processor (CueProc)
Post by: coffeebucket on 2007-03-19 02:35:10
Fantastic news nyaochi.  I look forward to the release.

As per your recommendation, I've been in contact with John33 and he's put together a build incorporating your patches.  I'm putting it through its paces at the moment and, if all goes well, he'll make a (semi-)formal release soon.  I'm keen on the new CueProc functionality which will tie in with your patches.  In addition to what you've listed, I'd like to request the following:

Conditional Album Art Processing
Mentioned in one of my earlier posts, conditional processing for album art files would be very useful.  Some examples I can think of are:
testing for a file's existence and adding only if true
Code: [Select]
#if{exists('FrontCover.jpg')}FrontCover.jpg#endif

testing for a file's existence and inserting a placeholder image if false
Code: [Select]
#if{exists('FrontCover.jpg')}FrontCover.jpg#else<placeholder image>.jpg#endif

setting order of precedence if multiple file names exist in the folder
Code: [Select]
#if{exists('FrontCover.jpg')}FrontCover.jpg
#elseif {exists('cover.jpg')}cover.jpg
#elseif {exists('folder.jpg')}folder.jpg
[etc.]
#endif

Automatic Compilation Detection
Using the future "lame_nyaochi" encoder, I assume the implementation for this will be something like
Code: [Select]
for Track in Tracks
  if (Track.ALBUMARTIST != Track.ARTIST)
    addParam(--tv TCMP=1)
I also assume the "--no-auto-compilation" will override this behaviour.  Can you please confirm the implementaion.

Thanks again.  If you require any assistance testing pre-release versions, please let me know.
Title: Cuesheet Processor (CueProc)
Post by: coffeebucket on 2007-03-19 03:31:11
I don't know that the problem is caused by cueproc for sure. That's why I asked if anyone else had experienced it. The problem could reside entirely with how lame.exe applies tags. I never use lame.exe to apply tags to files except with cueproc so I'm not set up to test whether lame.exe is the problem.

However, I tested cueproc again using a different lame binary, an old 3.90.1 binary that I still had, and I got the same header problem. So if cueproc isn't causing it, then I'm baffled. I'll just use the workaround I mentioned above and forget about it. I'm perfectly happy to tag the files with mp3tag anyway.
I've just run MP3val against my transcoded MP3s and, exactly as you mentioned, MP3val states there are the wrong number of bytes in each of the files' headers.  However, since it merely passes parameters to the selected encoder, I hardly think this is CueProc's fault.  To be sure, I manually ran the conversion command for a single file as CueProc would have produced.  MP3val also reported this MP3 as having the same header problem. 

Personally, the audio and meta data produced by LAME 3.97 (and later) have never caused any problems for the playback applications/devices I use (foobar2000, iTunes, iPod).  Aside from MP3val, have you had any playback applications/devices report issues with the files?
Title: Cuesheet Processor (CueProc)
Post by: Deep_Elem on 2007-03-19 03:57:53
I've just run MP3val against my transcoded MP3s and, exactly as you mentioned, MP3val states there are the wrong number of bytes in each of the files' headers.  However, since it merely passes parameters to the selected encoder, I hardly think this is CueProc's fault.  To be sure, I manually ran the conversion command for a single file as CueProc would have produced.  MP3val also reported this MP3 as having the same header problem. 

Personally, the audio and meta data produced by LAME 3.97 (and later) have never caused any problems for the playback applications/devices I use (foobar2000, iTunes, iPod).  Aside from MP3val, have you had any playback applications/devices report issues with the files?

I edited my post which you quote (thinking no one had read it yet), to indicate that I did do some testing and managed to demonstrate that it is indeed lame and not cueproc that is causing the problem.

Like you, I haven't noticed any playback problem with these particular files when I play them in foobar2000. But I do find it disconcerting that lame's tagging routines are causing an error in the headers that no one has ever noticed before.
Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2007-03-19 09:57:53
The problem isn't cueproc, it's lame.
Thanks for the deeper investigation and clarification. 

As per your recommendation, I've been in contact with John33 and he's put together a build incorporating your patches.
Thanks. I've just bought an MP3 player that displays an albumart image embedded in an APIC frame and come to want a faster compile of the binary.

As for the conditional album art processing, you can write such condition within #if{} bracket even with the current version if you are familiar with Python. Python has a function to test the existence of a file, e.g., #if{os.path.exists('cover.jpg')}. But you will need to a trivial code to concatnate the path to the cuesheet before the filename. The current CueProc also supports #if ... #elif ... #elif ... #endif syntax. So what you wanted to do is already achieved by the current CueProc.

However, I'm also aware that ordinal users are not so familar with Python. The idea of automatic cover-art detection is to eliminate such coding efforts for non-programmers. If you have an preferable ordered (prioritized) list of file names for albumart, please let me know. Maybe "frontcover.[jpg/png/gif]", "cover.[jpg/png/gif]", "albumart.[jpg/png/gif]"?

CueProc fires a compilation flag only if two or more distinct artist names exist in tracks in a cuesheet.
Title: Cuesheet Processor (CueProc)
Post by: coffeebucket on 2007-03-19 12:50:11
Like you, I haven't noticed any playback problem with these particular files when I play them in foobar2000. But I do find it disconcerting that lame's tagging routines are causing an error in the headers that no one has ever noticed before.
Digging through LAME's "--longhelp", I noticed this switch
Code: [Select]
--strictly-enforce-ISO   comply as much as possible to ISO MPEG spec

Unfortunately adding the switch still does not produce files MP3val is happy with.  Worse still, I found most of the files to be at least a few hundred kilobytes more bloated than when I didn't use the switch.  If a bug hasn't been filed already, and it's something that's concering youn, this might be one to mention to the LAME devs.

Thanks. I've just bought an MP3 player that displays an albumart image embedded in an APIC frame and come to want a faster compile of the binary.

John and I have had a few back-and-forths now, and we're certainly getting close.  In my testing I found that JPEG and PNG files work fine but GIF files cause some issues.  LAME happily accepts a GIF at encode time without throwing up any errors, but iTunes makes it appear as though nothing has been added (so far it's the only tool I've used to test this.)  I've had a look your patch and noticed the mime detection looks for "GIF8", which should cover GIF87a and GIF89a files.  If there are some particular GIF files you want me to test, or GIFs produced by a particular application (I've been using IrfanView and the Windows Picture Viewer), please let me know. Otherwise it might be worth contacting John direclty.

Incidentally, which MP3 player did you recently purchase?

As for the conditional album art processing, you can write such condition within #if{} bracket even with the current version if you are familiar with Python. Python has a function to test the existence of a file, e.g., #if{os.path.exists('cover.jpg')}. But you will need to a trivial code to concatnate the path to the cuesheet before the filename. The current CueProc also supports #if ... #elif ... #elif ... #endif syntax. So what you wanted to do is already achieved by the current CueProc.

However, I'm also aware that ordinal users are not so familar with Python. The idea of automatic cover-art detection is to eliminate such coding efforts for non-programmers. If you have an preferable ordered (prioritized) list of file names for albumart, please let me know. Maybe "frontcover.[jpg/png/gif]", "cover.[jpg/png/gif]", "albumart.[jpg/png/gif]"?

I've played around with Python in the past and, more recently, when trying to find a relatively simple solution for enumerating *.cue files.  Now that I know additional code can be injected into CueProc at runtime, I should be able to sort out a solution.  Just to clarify, is this possible with both the py2exe build and the source scripts?

I'd chance a guess that anyone using this tool is likely to be a "power user" and has the knowledge of at least some basic principles in conditional logic.  That said, you are right to make CueProc's use as simple as possible.  I personally do not have a need for prioritised cover art detection; but it would definitely be useful.  I can only guess as to how you would implement this feature but might I suggest either:The only other album art file name candidate I can suggest is "folder.jpg", which is used both by Windows and SlimServer (as a defult).
Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2007-03-19 14:38:41
John and I have had a few back-and-forths now, and we're certainly getting close.  In my testing I found that JPEG and PNG files work fine but GIF files cause some issues.  LAME happily accepts a GIF at encode time without throwing up any errors, but iTunes makes it appear as though nothing has been added (so far it's the only tool I've used to test this.)  I've had a look your patch and noticed the mime detection looks for "GIF8", which should cover GIF87a and GIF89a files.  If there are some particular GIF files you want me to test, or GIFs produced by a particular application (I've been using IrfanView and the Windows Picture Viewer), please let me know. Otherwise it might be worth contacting John direclty.
Actually, I did test with JPG files but didn't with PNG and GIF files.    I didn't realize the patch was incomplete with GIF files. Thank you for testing and debugging the patch.

Incidentally, which MP3 player did you recently purchase?
iriver X20 (sold only in Japan at this moment?) Recent iriver players (E10 and Clix2 maybe) support APIC ID2v2 frame.

I've played around with Python in the past and, more recently, when trying to find a relatively simple solution for enumerating *.cue files.  Now that I know additional code can be injected into CueProc at runtime, I should be able to sort out a solution.  Just to clarify, is this possible with both the py2exe build and the source scripts?
It should be. I'll test before releasing the next version though. 

I'll include "folder.jpg" and also add the option to specify the list.
Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2007-04-08 17:45:22
CueProc 1.8 is out.

ChangeLog:
Very short instruction for obtaining MP3 files with albumart images:
1. Save albumart images as folder.jpg in the same directories as cuesheets.
2. Download lame.exe with my patches applied from Rarewares ( http://www.rarewares.org/mp3.html (http://www.rarewares.org/mp3.html) ).
3. Specify "-c lame_nyaochi" instead of "-c lame" in the command-line for cueenc.

I hope that the character encoding problems are solved with this release.
Title: Cuesheet Processor (CueProc)
Post by: Deep_Elem on 2007-04-09 18:05:20
Thanks for the update, nyaochi.
Title: Cuesheet Processor (CueProc)
Post by: coffeebucket on 2007-04-11 07:07:00
Thanks for your work nyaochi.  I've not given any of the new functionality a try yet, but cuesheet enumeration with the --find switch is still causing issues.  The error output is similar to to version 1.7
Code: [Select]
Traceback (most recent call last):
  File "cueproc.py", line 599, in <module>
  File "cueproc.py", line 250, in find
  File "ntpath.pyc", line 334, in walk
  File "ntpath.pyc", line 334, in walk
  File "ntpath.pyc", line 334, in walk
  File "ntpath.pyc", line 328, in walk
  File "cueproc.py", line 246, in find_callback
  File "ntpath.pyc", line 102, in join
  File "encodings\utf_8.pyc", line 16, in decode
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 24-26: invalid data

As before I've tried specifying ISO-8859-1 with the -W and -w switches to no avail.  Are any new switches/parameters required for this to work?

UPDATE: Unfortunately it's not just file enumeration that's affected.  I've had a chance to test 1.8 with a manually populated target file and it produces similar errors; even with -W and -w switches.
Title: Cuesheet Processor (CueProc)
Post by: madxcream on 2007-04-15 12:41:03
Is there a way of copying over the cover art if there is any in the source directory to the destination directory? I don't want to have it added to the tags, just copied over. I can do it by hand, but it would save alot of time when doing all my cd's with the list.txt command.
Title: Cuesheet Processor (CueProc)
Post by: urlwolf on 2007-05-29 20:49:50
I agree whtn madxcream. That'd be a nice feature.
Overall, I find cueproc more reliable than foobar's covert tools. I'd like to use cueproc, but I need the cover art processing working for that.

I also got simiar error to coffeebucket when trying to create a list of cue files.
Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2007-06-09 16:01:47
CueProc 1.9 was out.
- Encoder 'lame_nyaochi' was removed to replace 'lame' codec. The 'lame' encoder now supports albumart images. This change was made because my patch has been merged to the lame CVS.
- New option, --albumart-action, to configure the action when albumart images are detected. CueProc now supports 'copy' action, which copies albumart images to the output directory.
- Bug-fix for --find action

Note that CueProc 1.9 requires LAME 3.97 with my patch applied, LAME 3.98b3, or later for lame encoding.

madxcream and urlwolf,
Thank you for the suggestion. Please add "--albumart-action copy" to the cueproc command-line.

coffeebucket,
Sorry for the late action for this problem. I also confirmed that "cueproc --find" did not work with filenames with Japanese characters. I hope this version will sort out your problem at last.
Title: Cuesheet Processor (CueProc)
Post by: urlwolf on 2007-06-09 16:47:52
Thanks for the update, nyaochi.

One question though.

I have some cue files that cueProc doesn't understand.
They have INDEX 02, I think this is the only common factor.

Any idea why this happens?

Thanks
Title: Cuesheet Processor (CueProc)
Post by: Lawrence on 2007-06-09 22:35:12
Hi Nyaochi,

Thanks for the cueproc. Question: when I run the cueproc 1.9 with a cuesheet pointing at an APE file. It said "WARNING: No suitable input class found for track #xx". I check with "cueproc -l". It doesn't list APE. However, I saw it on the webpage that it supports APE. Does cueproc really support APE? I ran the same cuesheet/ape with ACDIR and it experiences no problem. However, I would like to use cueproc since it seems that it has better support of UTF8 file name....

Lawrence
Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2007-06-10 02:46:08
I have some cue files that cueProc doesn't understand.
They have INDEX 02, I think this is the only common factor.

Any idea why this happens?

I added INDEX 02 to my chesheet file, but CueProc worked fine. One possibility is that the tracks do not have INDEX 01 but only INDEX 02. CueProc requires INDEX 01 to exist in all tracks.

Thanks for the cueproc. Question: when I run the cueproc 1.9 with a cuesheet pointing at an APE file. It said "WARNING: No suitable input class found for track #xx". I check with "cueproc -l". It doesn't list APE. However, I saw it on the webpage that it supports APE. Does cueproc really support APE? I ran the same cuesheet/ape with ACDIR and it experiences no problem. However, I would like to use cueproc since it seems that it has better support of UTF8 file name....

Yes, it does support APE files. I confirmed the compatilibity with Monkey's Audio 3.99F.

Please try:
getaudio --test CDImage.ape
If this command outputs "TEST OK", CueProc should handle the APE file.
Title: Cuesheet Processor (CueProc)
Post by: Lawrence on 2007-06-10 04:38:55

I have some cue files that cueProc doesn't understand.
They have INDEX 02, I think this is the only common factor.

Any idea why this happens?

I added INDEX 02 to my chesheet file, but CueProc worked fine. One possibility is that the tracks do not have INDEX 01 but only INDEX 02. CueProc requires INDEX 01 to exist in all tracks.

Thanks for the cueproc. Question: when I run the cueproc 1.9 with a cuesheet pointing at an APE file. It said "WARNING: No suitable input class found for track #xx". I check with "cueproc -l". It doesn't list APE. However, I saw it on the webpage that it supports APE. Does cueproc really support APE? I ran the same cuesheet/ape with ACDIR and it experiences no problem. However, I would like to use cueproc since it seems that it has better support of UTF8 file name....

Yes, it does support APE files. I confirmed the compatilibity with Monkey's Audio 3.99F.

Please try:
getaudio --test CDImage.ape
If this command outputs "TEST OK", CueProc should handle the APE file.


Thanks for your response. I ran that and I got "TEST OK". I became suspicious  that it might be some other reason:

I ran it with:

cueproc -c lame --target o.txt

where o.txt's contect is "?·?·??\CDImage.cue". (note: there are some Traditional Chinese character between the first " and \). It still gives me the same error. Anyway, I renamed the directory and changed o.txt to "fayewong\CDImage.cue". It ran partially success wheres the program jumped to lots of command line trying to invoke lame. (It still fail because the all the --tt --ta were messy international characters and my lame doesn't support --tv option.). Now, I think the cueproc couldn't support the traditional Chinese character. I am curious to know if the cueproc supports Japanese character since I guess you are from Japan...
Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2007-06-10 05:06:38
Do you use Windows on traditional Chinese locale? Otherwise, CueProc cannot deal with Chinese characters correctly.

There's no language specific routine in CueProc. It just converts everything from the Windows default codepage to UTF-8 for the internal representation, and coverts back to the Windows default codepage when invoking external encoders. I don't favor any language.
Title: Cuesheet Processor (CueProc)
Post by: Lawrence on 2007-06-10 06:21:56
Do you use Windows on traditional Chinese locale? Otherwise, CueProc cannot deal with Chinese characters correctly.

There's no language specific routine in CueProc. It just converts everything from the Windows default codepage to UTF-8 for the internal representation, and coverts back to the Windows default codepage when invoking external encoders. I don't favor any language.


Yes, I do. I have the "Control Panel"->"Regional and Langauge Options"->Advanced->Language for Non-Unicode Program set to Chinese(Taiwan). When I do a "dir", I can see those Traditional Chinese character without any problem. I can also use foobar2000 to play the UTF8 cuesheet without problem (under Traditional Chinese directory). I understand that Windows store those directory name in Unicode. Do you think the reason is the code page convert between Traditional Chinese (big5) & Unicode?
Title: Cuesheet Processor (CueProc)
Post by: urlwolf on 2007-06-10 10:34:58
Quote
I added INDEX 02 to my chesheet file, but CueProc worked fine. One possibility is that the tracks do not have INDEX 01 but only INDEX 02. CueProc requires INDEX 01 to exist in all tracks.


Then, I don't really know What is causing the problem... Here is one .cue that doesn't work:

Quote
CATALOG 0028941537126
PERFORMER "Bartok, Bela"
TITLE "Piano Concertos N° 1 and 2"
FILE "Range.wav" WAVE
  TRACK 01 AUDIO
    TITLE "N° 1  - I. Allegro moderato - Allegro"
    PERFORMER "Bartok, Bela"
    ISRC DEF057701540
    INDEX 00 00:00:00
    INDEX 01 00:00:33
  TRACK 02 AUDIO
    TITLE "N° 1  - II. Andante - Allegro - attacca -"
    PERFORMER "Bartok, Bela"
    ISRC DEF057701540
    INDEX 00 09:06:20
    INDEX 01 09:06:70
    INDEX 02 16:47:43
  TRACK 03 AUDIO
    TITLE "N° 1  - III. Allegro molto"
    PERFORMER "Bartok, Bela"
    ISRC DEF057701540
    INDEX 01 16:58:68
  TRACK 04 AUDIO
    TITLE "N° 2  - I. Allegro"
    PERFORMER "Bartok, Bela"
    ISRC DEF057701550
    INDEX 00 23:21:33
    INDEX 01 23:29:58
  TRACK 05 AUDIO
    TITLE "N° 2  - II. Adagio - Presto - Adagio"
    PERFORMER "Bartok, Bela"
    ISRC DEF057701550
    INDEX 00 33:06:70
    INDEX 01 33:09:33
  TRACK 06 AUDIO
    TITLE "N° 2  - III. Allegro molto - Presto"
    PERFORMER "Bartok, Bela"
    ISRC DEF057701550
    INDEX 00 44:54:33
    INDEX 01 44:57:70

thanks
Title: Cuesheet Processor (CueProc)
Post by: Lawrence on 2007-06-10 16:40:03

Do you use Windows on traditional Chinese locale? Otherwise, CueProc cannot deal with Chinese characters correctly.

There's no language specific routine in CueProc. It just converts everything from the Windows default codepage to UTF-8 for the internal representation, and coverts back to the Windows default codepage when invoking external encoders. I don't favor any language.


Yes, I do. I have the "Control Panel"->"Regional and Langauge Options"->Advanced->Language for Non-Unicode Program set to Chinese(Taiwan). When I do a "dir", I can see those Traditional Chinese character without any problem. I can also use foobar2000 to play the UTF8 cuesheet without problem (under Traditional Chinese directory). I understand that Windows store those directory name in Unicode. Do you think the reason is the code page convert between Traditional Chinese (big5) & Unicode?


I did some more study. I download your "lame" and did:

cd xxxx                    <- where xxxx is the Traditional Chinese character subdirectory
cueenc -w utf8 -c lame CDImage.cue

it still gave me:

WARNING: No suitable input class found for track #1, G:\xxxx\CDImage.ape
....

I suspect the error is caused by getaudio....
Title: Cuesheet Processor (CueProc)
Post by: urlwolf on 2007-06-11 12:13:19
Yet another cue file that doesn't get converted.
Foobar cannot open it either. It has unicode chars, but that should not be a problem, right?

Quote
REM GENRE Symphony
REM DATE 2006
REM DISCID 370F6A04
REM COMMENT "ExactAudioCopy v0.95b4"
CATALOG 7318599916163
PERFORMER "Beethoven"
TITLE "Symphony 9 Vänskä Minnesota Orchestra BIS 1616"
FILE "Beethoven Symphony 9 Vänskä Minnesota Orchestra BIS 1616.wav" WAVE
  TRACK 01 AUDIO
    TITLE "Symphony no. 9 - I. Allegro ma non troppo e un poco maestoso"
    PERFORMER "Beethoven"
    ISRC SEAEQ0616010
    INDEX 01 00:00:00
  TRACK 02 AUDIO
    TITLE "Symphony no. 9 - II. Molto vivace - Presto"
    PERFORMER "Beethoven"
    ISRC SEAEQ0616020
    INDEX 01 14:52:61
  TRACK 03 AUDIO
    TITLE "Symphony no. 9 - III. Adagio molto e cantabile - Andante cantabile"
    PERFORMER "Beethoven"
    ISRC SEAEQ0616030
    INDEX 01 28:32:12
  TRACK 04 AUDIO
    TITLE "Symphony no. 9 - IV. Presto ..."
    PERFORMER "Beethoven"
    ISRC SEAEQ0616040
    INDEX 01 42:44:55


This is an EAC encoded file. Threre are only INDEX 01s. I'm really stumped...
Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2007-06-11 13:40:42
I did some more study. I download your "lame" and did:

cd xxxx                    <- where xxxx is the Traditional Chinese character subdirectory
cueenc -w utf8 -c lame CDImage.cue

it still gave me:

WARNING: No suitable input class found for track #1, G:\xxxx\CDImage.ape
....

I suspect the error is caused by getaudio....

Sorry I have no idea and way to experiment your problem.

Yet another cue file that doesn't get converted.
Foobar cannot open it either. It has unicode chars, but that should not be a problem, right?

I don't think CueProc can handle cuesheets that foobar cannot open. You might fix this problem with -w option, but I'm not sure.
Title: Cuesheet Processor (CueProc)
Post by: Lawrence on 2007-06-11 22:53:12
Yet another cue file that doesn't get converted.
Foobar cannot open it either. It has unicode chars, but that should not be a problem, right?

Quote
REM GENRE Symphony
REM DATE 2006
REM DISCID 370F6A04
REM COMMENT "ExactAudioCopy v0.95b4"
CATALOG 7318599916163
PERFORMER "Beethoven"
TITLE "Symphony 9 Vänskä Minnesota Orchestra BIS 1616"
FILE "Beethoven Symphony 9 Vänskä Minnesota Orchestra BIS 1616.wav" WAVE
  TRACK 01 AUDIO
    TITLE "Symphony no. 9 - I. Allegro ma non troppo e un poco maestoso"
    PERFORMER "Beethoven"
    ISRC SEAEQ0616010
    INDEX 01 00:00:00
  TRACK 02 AUDIO
    TITLE "Symphony no. 9 - II. Molto vivace - Presto"
    PERFORMER "Beethoven"
    ISRC SEAEQ0616020
    INDEX 01 14:52:61
  TRACK 03 AUDIO
    TITLE "Symphony no. 9 - III. Adagio molto e cantabile - Andante cantabile"
    PERFORMER "Beethoven"
    ISRC SEAEQ0616030
    INDEX 01 28:32:12
  TRACK 04 AUDIO
    TITLE "Symphony no. 9 - IV. Presto ..."
    PERFORMER "Beethoven"
    ISRC SEAEQ0616040
    INDEX 01 42:44:55


This is an EAC encoded file. Threre are only INDEX 01s. I'm really stumped...



With my little experience with cueproc & foobar2000, I think your problem is caused by those international character, e.g. Vänskä. I ususally my cuesheet is saved in UTF8 format. So, say, you did that. Then, you can use:

cueenc -c lame -w utf8 yourcuesheet.cue
Title: Cuesheet Processor (CueProc)
Post by: Lawrence on 2007-06-11 23:14:12

I did some more study. I download your "lame" and did:

cd xxxx                    <- where xxxx is the Traditional Chinese character subdirectory
cueenc -w utf8 -c lame CDImage.cue

it still gave me:

WARNING: No suitable input class found for track #1, G:\xxxx\CDImage.ape
....

I suspect the error is caused by getaudio....

Sorry I have no idea and way to experiment your problem.


nyaochi,

Thanks. Just out of curiosity: Do you run Japanese song? I remember I tried to run the Momoe Yamaguchi yesterday. The directory name is like "??????????". I still has a similar problem. If you run with Japanese directory name without any problem, can you tell me what options you are setting (-W -w)?. Maybe it can give me some hint about how to handle Chinese directory name.... Thanks.
Title: Cuesheet Processor (CueProc)
Post by: Preuss on 2007-07-16 13:22:14
Your program CueProc is very nice.

I have two issues one is a bug and the other an extension of your "find" function.

1. If there is a "REM GENRE R&B" in the cuesheet then it will never encode anything. It must be a problem with the "&" character.

2. I have many cue sheets for each rip, and would like to be able to find all *.cue files but not *.
Title: Cuesheet Processor (CueProc)
Post by: Smyttie on 2007-08-01 00:17:10
  • CueProc detects cover.jpg, albumart.jpg, or folder.jpg file as the albumart image. By default, CueProc will set ALBUMART variable if either of these files exists in the cuesheet directory. You can disable this feature by --no-auto-albumart option. CueProc does not overwrite ALBUMART variable if it is specified in the cuesheet.
  • New option, --albumart-files, to configure the list of albumart filenames.


Is it intended for --albumart-files to also utilize variable substitution the way other CueProc options do?  I have my album artwork backed up using the same base name as my albums, using the following form:

${ARTIST} - [${DATE}] ${ALBUM}.cue
${ARTIST} - [${DATE}] ${ALBUM}.flac
${ARTIST} - [${DATE}] ${ALBUM}.jpg

It would be nice to be able to combine the --albumart-files and --target options when the artwork name varies. 
If there is a way to do this, I haven't been doing it right nor have I figured out how to with CueProc 1.9

Thanks.
Title: Cuesheet Processor (CueProc)
Post by: rohangc on 2007-11-23 07:34:22
Is it intended for --albumart-files to also utilize variable substitution the way other CueProc options do?  I have my album artwork backed up using the same base name as my albums, using the following form:

${ARTIST} - [${DATE}] ${ALBUM}.cue
${ARTIST} - [${DATE}] ${ALBUM}.flac
${ARTIST} - [${DATE}] ${ALBUM}.jpg


Wow! This is exactly how my FLAC library is organized! I wanted to ask Nyaochi the very same question, but you beat me to it.

Nyaochi, it will be great if you implement variable substitution for album art files, which will offer a great deal of flexibility when it comes to organizing ones library.

However, thank you for all the effort. I have used this program before and I love it.
Title: Cuesheet Processor (CueProc)
Post by: bsleeth on 2008-01-01 17:21:12
Thank you very much for a great tool.  I have one problem and one request.

The problem:
I am attempting to transcode using the lame plugin; however because the genre tag is not quoted, genres of "R&B", "Rock & Roll", and "Drum & Bass" will cause the process to fail.


The request:
I would like to be able to use your standard lame plugin to do the transcoding and tagging of my tracks.  Your tool works great, with one exception, identification of the "Various Artists".  I know this has been briefly touched on before, but, would it be possible to add an option to output the album artists in the band and/or a user "album artist" frame?  I realize that this can fuel the whole ragging debate between "BAND" versus "album artist", but the reality is that the tools I use expects to find "album artist" and pretty much ignores "BAND".

Thank you again for such a great tool.
Title: Cuesheet Processor (CueProc)
Post by: rohangc on 2008-01-28 04:30:48

Is it intended for --albumart-files to also utilize variable substitution the way other CueProc options do?  I have my album artwork backed up using the same base name as my albums, using the following form:

${ARTIST} - [${DATE}] ${ALBUM}.cue
${ARTIST} - [${DATE}] ${ALBUM}.flac
${ARTIST} - [${DATE}] ${ALBUM}.jpg


Wow! This is exactly how my FLAC library is organized! I wanted to ask Nyaochi the very same question, but you beat me to it.

Nyaochi, it will be great if you implement variable substitution for album art files, which will offer a great deal of flexibility when it comes to organizing ones library.

However, thank you for all the effort. I have used this program before and I love it.


Hi Nyaochi. I am thinking of moving from MP3 to AAC and am in need of this feature very badly. This is due to the fact that the Nero AAC encoder cannot embed album art into files. We need to use the AAC tagger for this purpose which rules out the usage of the current version of CUEProc. Can you tell me whether you plan to implement this soon? Thanks.
Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2008-01-28 12:24:59
Hi all,

After the long silence, I'm going to release an update of CueProc within a few weeks (in mid of Feb). I would like to include your as many requests from users as possible because I may not release CueProc so often. I do appreciate your suggestions and bug reports before the next release.

These are the issues to be addressed in the next release:
1. If there is a "REM GENRE R&B" in the cuesheet then it will never encode anything. It must be a problem with the "&" character.

This is the worst bug in the current CueProc release. I'll fix this.

2. I have many cue sheets for each rip, and would like to be able to find all *.cue files but not *.
  • .cue files.
    Can you do this.?

No. Use grep or other programs to filter out such files.


Is it intended for --albumart-files to also utilize variable substitution the way other CueProc options do?  I have my album artwork backed up using the same base name as my albums, using the following form:

${ARTIST} - [${DATE}] ${ALBUM}.cue
${ARTIST} - [${DATE}] ${ALBUM}.flac
${ARTIST} - [${DATE}] ${ALBUM}.jpg


Wow! This is exactly how my FLAC library is organized! I wanted to ask Nyaochi the very same question, but you beat me to it.

Nyaochi, it will be great if you implement variable substitution for album art files, which will offer a great deal of flexibility when it comes to organizing ones library.

Right. I'll support this.

I would like to be able to use your standard lame plugin to do the transcoding and tagging of my tracks.  Your tool works great, with one exception, identification of the "Various Artists".  I know this has been briefly touched on before, but, would it be possible to add an option to output the album artists in the band and/or a user "album artist" frame?  I realize that this can fuel the whole ragging debate between "BAND" versus "album artist", but the reality is that the tools I use expects to find "album artist" and pretty much ignores "BAND".

Do you want to extract album-artist values from "REM BAND" fields? Please elaborate this item if my understanding is wrong.

Hi Nyaochi. I am thinking of moving from MP3 to AAC and am in need of this feature very badly. This is due to the fact that the Nero AAC encoder cannot embed album art into files. We need to use the AAC tagger for this purpose which rules out the usage of the current version of CUEProc. Can you tell me whether you plan to implement this soon? Thanks.

I'm going to use neroAACTag.exe to attach albumart images to MP4/AAC files.
Title: Cuesheet Processor (CueProc)
Post by: rohangc on 2008-01-28 13:43:15
Moderation: removed unnecessary (massive) quote.

Wow! Thank you very much Nyaochi  . I will wait until you release the new version in February and use it then.
Title: Cuesheet Processor (CueProc)
Post by: bsleeth on 2008-01-29 06:22:02

I would like to be able to use your standard lame plugin to do the transcoding and tagging of my tracks.  Your tool works great, with one exception, identification of the "Various Artists".  ... would it be possible to add an option to output the album artists in the band and/or a user "album artist" frame?  I realize that this can fuel the whole ragging debate between "BAND" versus "album artist", but the reality is that the tools I use expects to find "album artist" and pretty much ignores "BAND".

Do you want to extract album-artist values from "REM BAND" fields? Please elaborate this item if my understanding is wrong.
...


Nyaochi.

Thank you again for sharing this great tool.  I apologize for the length of this reply, but I do hope it provides clarity to what I am doing.

I use EAC to rip a CD into a flac image.  I then use cueproc to transcode (and split) the flac image file into individual MP3 tracks.  For a compilation album (a compilation of different artists), EAC will create the cuesheet with an album level field "PERFORMER Various Artists".  The performer of each track will be correctly identified at the track level (e.g., "PERFOMER Frank Sinatra"). 

When the album level performer is not the same as all the track level performers, cueproc will correctly identify the album as a compilation.  For a compilation, one of the things the lame plugin does is to create an additional tag in the MP3 for "BAND", setting the value of the tag to that of the cuesheet's album level "PERFOMER".

Of course, this is what the tool already does, and it works perfectly.  My problem is that in addition to outputting the cuesheet's album level "PERFORMER" field in the MP3's "BAND" tag, I would also like to create a user text tag in the MP3 called "album artist" with the same value.

I have tried various methods to create the user text tag using cueproc and the lame plugin; however, I was not successful.  Instead, I have resorted to using your cueproc and Tycho's metamp3 as a post process.  Following is an sample of the two commands:

Code: [Select]
cueproc.exe --hide-cmdln --overwrite --outputfn "${TRACKNUMBER} - ${TITLE} [${ARTIST}]" --output lame --outputopt "-V2 --vbr-new --noreplaygain --nohist" --setvar GENRE=Other "Ultra-Lounge, Vol. 5- Wild, Cool and Swingin'.flac.cue"

cueproc.exe --hide-cmdln  --overwrite --outputfn "${TRACKNUMBER} - ${TITLE} [${ARTIST}]" --output extpipe --outputcmdln "metamp3.exe --user-text ${quot}[album artist]various artists${quot} $quot${output}.mp3$quot" "Ultra-Lounge, Vol. 5- Wild, Cool and Swingin'.flac.cue"


The way you identify a compilation and all the additional actions done automatically by the lame plugin are great.  I do not want to change any of that behavior.  I "simply" would like to create an additional user text tag for "album artist".

Thank you again.
Brian
Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2008-02-23 17:02:45
I released CueProc 1.10 today. The download URL has been changed due to a restructuring of my website.
http://nyaochi.sakura.ne.jp/software/cueproc/ (http://nyaochi.sakura.ne.jp/software/cueproc/)

CueProc 1.10 (2008-02-24)
The way you identify a compilation and all the additional actions done automatically by the lame plugin are great.  I do not want to change any of that behavior.  I "simply" would like to create an additional user text tag for "album artist".

The best way to do this is to customize the source code of CueProc for your own purpose. It's difficult to maintain the intersection of the ways in which users manage their music collections, but not so difficult to modify the source code of CueProc, which is written in Python (and Python is easy to learn). The relevant source code is src/ce_lame.py or src/ce_lame_eyed3.py. The following is the procedure to build cueproc.exe
I once wrote a plugin that uses LAME for MP3 encoding and metamp3 for MP3 tagging, but didn't release it because metamp3 did not seem to support Japanese character properly (at least when I tried before).
Title: Cuesheet Processor (CueProc)
Post by: bsleeth on 2008-02-24 10:56:53
Thank you for the update and the pointer (especially the steps necessary to (re)make cueproc.exe):

After installing Python, py2exe, an getting the eyed3 module installed, I was able to accomplish what I needed by modifying ce_lame_eyed3.py by inserting one line of code:
Code: [Select]
...
        if track.get('ALBUMARTIST'):
            tag.setArtist(track.get('ALBUMARTIST'), eyeD3.frames.BAND_FID)
            tag.addUserTextFrame('album artist', track.get('ALBUMARTIST'))   # <--My inserted line
            self.__formattag(track, 'ALBUMARTIST')
...

I did a very limited test (one image) and it works great!

Once again, thank you very much for sharing your hard work.

FYI:
When recreating cueproc.exe, I get the following warning:

The following modules appear to be missing
['email.Generator', 'email.Iterators', 'email.Utils']


I could not figure out what I had done wrong; nor could I find any requirements for the email module.  I checked that the email module was installed and tried various ways of including the module, but nothing worked.  As my Python skills are extremely limited and cueproc.exe is working, I am going to ignore the error for now.
Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2008-02-24 15:13:38
bsleeth,

I'm a bit surprised to see that you had achieved what you want in such a short time.    Thanks for the understanding.

When recreating cueproc.exe, I get the following warning:

The following modules appear to be missing
['email.Generator', 'email.Iterators', 'email.Utils']

Yes, I also got this warning too. I think we can simply ignore this as CueProc does not have a dependency to email module.
Title: Cuesheet Processor (CueProc)
Post by: rohangc on 2008-02-25 04:38:04
Excellent news!    Thank you very much, Nyaochi. I've been waiting for this for a while and my patience has finally paid off.

Unfortunately, I cannot test the new version until the weekend, but I will post updates as soon as I do so.

Once again, Nyaochi, thank you very much.
Title: Cuesheet Processor (CueProc)
Post by: rohangc on 2008-04-09 05:34:48
Hi Nyaochi. Sorry about this huge delay. I unfortunately decided to stick to LAME as most of my devices play MP3s and not all of them play AACs. Hence, I am afraid that I may not have any useful feedback as far as the new features are concerned.

However, thank you once again for this excellent utility. Keep up the great work! 
Title: Cuesheet Processor (CueProc)
Post by: stuarticus on 2008-06-17 13:14:46
Hi there, I've been using Cueproc to break up wav files of interviews, it's been really handy, thanks for the great program!

I have been having a bit of a problem with cue files though, the specifications I have come across have been a bit vague re Index 00 and index 01.

What i would like to do is instead of having exact cuts, I would like to add 1 sec to the start and end of each mp3, to create a slight overlap which will mean if the gap is quite narrow then nothing is cut off.  Does anyone know how to do this?

I currently use just one index entry per track to cut the track where required.

  Thanks for any help!

  Stuart
Title: Cuesheet Processor (CueProc)
Post by: steveh on 2008-06-20 04:47:58
Hi everyone,

I'm trying to use getaudio.exe to extract short samples (10s~30s each) from my wavpack images.  What's the right command line to do this?  I know it starts with "getaudio --begin 00:00:00 --end 00:10:00 floyd.wv" (for example), but what's after that?

I also can't get cueproc to work on this new computer, or I would just copy the command line from it.  If I use:  cueproc -c wave -o "$TITLE" floyd.cue

I get the error:  CueProc: floyd.cue [01/10]
WARNING: No suitable input class found for track #1, C:\store\cueproc\win32bin\floyd.wv (repeated for track 2, track 3 etc.)

If I use:  cueproc -c wave -o "$TITLE" floyd.wv (i.e. change floyd.cue to floyd.wv)
I get:  WARNING: Failed to open a target, floyd.wv

I guess my command line is wrong?  I haven't used cueproc for a while.  I know that the floyd.wv file is OK because I can use getaudio.exe to make a 10s mp3 file, but that's not what I want...

Thanks,
Stephen
Title: Cuesheet Processor (CueProc)
Post by: Deep_Elem on 2008-06-20 15:46:42
Whenever I've had the 'no suitable input class found' error it was because I had the wrong file name in the cuesheet. Typically I had the wave version listed in the cuesheet even though the file was compressed, or vice versa.

I.e. do you have the file listed as 'floyd.wav' in the cuesheet even though it's now a wavpack file?
Title: Cuesheet Processor (CueProc)
Post by: steveh on 2008-06-20 23:18:53
Hi Deep_Elem,

The cuesheet has the line: FILE "floyd.wv" WAVE.  It should point to the right file.

Could you do me a favour and run cueproc to output .wav files, and tell me what the second half of the getaudio.exe command line is?

Thanks

Edit:  Don't worry, it works fine on this computer.  I need to add " > .\floyd_clip.wav" to the end of getaudio.  I probably should have tried it again before posting...
Title: Cuesheet Processor (CueProc)
Post by: nyaochi on 2008-06-21 09:23:49
What i would like to do is instead of having exact cuts, I would like to add 1 sec to the start and end of each mp3, to create a slight overlap which will mean if the gap is quite narrow then nothing is cut off.  Does anyone know how to do this?

It's impossible to achieve this by modifying cuesheets. This should be dealt with by modifying the CueProc source code. In cueproc.py, the following line generates the command-line for extracting an audio stream of a track:
Code: [Select]
        # Obtain the command-line for extracting the source audio.
        incmdln = inobj.get_cmdln_track(track, outobj.is_utf8)

Here, track.begin and track.end store the start time and end time of the track in string format. You can modify the start time and end time just before this line. It would be good if CueProc had the scalability to achieve this. But currently, modifying the source code is the easiest approach to achieve what you want.

Edit:  Don't worry, it works fine on this computer.  I need to add " > .\floyd_clip.wav" to the end of getaudio.  I probably should have tried it again before posting...

FYI, this is how CueProc invokes getaudio.exe:
Code: [Select]
1) getaudio.exe [--begin START_TIME] [--end END_TIME] AUDIO_FILE
2) getaudio.exe --test AUDIO_FILE
3) getaudio.exe --tag AUDIO_FILE

The syntax 1) extracts an audio stream (in the specified period) in AUDIO_FILE to STDIN in WAVE format. The syntax 2) checks if AUDIO_FILE is supported by getaudio.exe. The syntax 3) outputs meta-information in AUDIO_FILE to STDIN.
Title: Cuesheet Processor (CueProc)
Post by: stuarticus on 2008-07-14 16:21:00
Thanks For responding, Nyaochi,
                                                I'm sure you know best and I am just going to look like an idiot, but would it be easier to change in cuesheet.py here?

Code: [Select]
# Assign begin
        if i == 1 and pregap and cs[i].indexes.has_key(0):
            track.begin = cs[i].indexes[0]
        elif cs[i].indexes.has_key(1):
            track.begin = cs[i].indexes[1]
        # Assign end
        if i != len(cs) - 1:
            if cs[i].filename == cs[i+1].filename:
                if delgap and cs[i+1].indexes.has_key(0):
                    track.end = cs[i+1].indexes[0]
                else:
                    track.end = cs[i+1].indexes[1]


  Also how does CueProc handles times so I know how to adjust?

  Thanks for any help you can provide.

  Stuart.




[quote name='nyaochi' date='Jun 21 2008, 02:23' post='572315']
[quote name='stuarticus' post='571537' date='Jun 17 2008, 21:14']
What i would like to do is instead of having exact cuts, I would like to add 1 sec to the start and end of each mp3, to create a slight overlap which will mean if the gap is quite narrow then nothing is cut off.  Does anyone know how to do this?
[/quote]
It's impossible to achieve this by modifying cuesheets. This should be dealt with by modifying the CueProc source code. In cueproc.py, the following line generates the command-line for extracting an audio stream of a track:
Code: [Select]
        # Obtain the command-line for extracting the source audio.
        incmdln = inobj.get_cmdln_track(track, outobj.is_utf8)
Title: Cuesheet Processor (CueProc)
Post by: stuarticus on 2008-10-15 15:04:59
Hi Nyaochi, I am still no closer to solving this (I am not a very experienced Python user) am I right in thinking that the track.begin is held as a string? Does this make it difficult to change?

  This functionality would be very useful to our project, could you make the modification for a fee, if necessary?

  Anyone else with any Python advice that can be help I would also be pleased to hear from.

  Cheers, Stuart.
Title: Cuesheet Processor (CueProc)
Post by: Agent69 on 2008-12-26 02:15:22
Nyaochi,

I just wanted to say thanks for developing this program. It's really working great for me.
Title: Cuesheet Processor (CueProc)
Post by: xorsyst on 2009-10-01 10:56:06
Hi, thanks for the great program!

There are a couple of bugs I've noticed:
There's at least one place in the code where you've put 'condidions'
instead of 'conditions', which causes python to bomb.
If I try to run the source python, I'm missing a dependency on the
eyed3 module.  Is that something you could include?

Also, I'd really like the command-line option to run a script/program
on the output directory when the processing is complete.  In my case,
I'd like to run mp3gain on the mp3 files.
Title: Cuesheet Processor (CueProc)
Post by: coffeebucket on 2011-07-18 10:09:03
It's been a really long time, so I'm hoping this gets seen by the right people.

My operating system of choice has been Mac OS X (10.5 and 10.6) for quite some time now.  But I've kept a Windows XP machine around to handle the bulk of my audio processing needs.  Unfortunately the aging machine is reaching its end of days and I'd like to move my entire setup to OS X.  So far XLD has been proven itself as a fairly capable replacement for ExactAudioCopy.  Along with full-disc ripping and cuesheet embedding, it even includes several transcoding options for various formats.  But I've found it doesn't come close to providing the level of flexibility implemented by CueProc.

Being written in Python, it was trivial to get CueProc 1.10 running under OS X.  Or so I thought.  The main problem is the reliance on the "getaudio.exe" precompiled binary: CueProc's primary method of extracting audio from the source location in order to transcode it.  Since the source code for this executable was not included in the releases, there's no straightforward way to get this part of the processing up and running on other operating systems. 

Before I start venturing down other avenues (virtual machines, Boot Camp, implementing a replacement from scratch), I figured it was worth asking:

Thanks in advance.
Title: Re: Cuesheet Processor (CueProc)
Post by: dpr on 2018-01-06 16:08:39
where can i get cueproc 1.10 from?
http://nyaochi.sakura.ne.jp/software/cueproc/ is not working.

Thanks
D
Title: Re: Cuesheet Processor (CueProc)
Post by: Chibisteven on 2018-01-08 04:27:03
where can i get cueproc 1.10 from?
http://nyaochi.sakura.ne.jp/software/cueproc/ is not working.

Thanks
D

Looks like a command line tool that has completely disappeared off the web.  The Wayback Machine has no archived copies of this but the site itself is archived (https://web.archive.org/web/20130404121507/http://nyaochi.sakura.ne.jp/software/cueproc/).

There's plenty of applications that can parse and do what cueproc does all with a nicer, easier to use GUI (http://www.foobar2000.org/).
Title: Re: Cuesheet Processor (CueProc)
Post by: Cynic on 2018-01-08 17:07:47
where can i get cueproc 1.10 from?
http://nyaochi.sakura.ne.jp/software/cueproc/ is not working.
I had a copy lying around:
https://mega.nz/#!wuBHGA6Y!PB1tGbc157lWb-0D1Nakz5ucfxPMA6aVeiTKUCUbajE

You shouldn't trust binaries from internet strangers, etc...
Title: Re: Cuesheet Processor (CueProc)
Post by: dpr on 2018-01-08 22:04:25
where can i get cueproc 1.10 from?
http://nyaochi.sakura.ne.jp/software/cueproc/ is not working.

Thanks
D




Looks like a command line tool that has completely disappeared off the web.  The Wayback Machine has no archived copies of this but the site itself is archived (https://web.archive.org/web/20130404121507/http://nyaochi.sakura.ne.jp/software/cueproc/).

There's plenty of applications that can parse and do what cueproc does all with a nicer, easier to use GUI (http://www.foobar2000.org/).

Thanks. Can food are process a directory tree of cuefiles?
Title: Re: Cuesheet Processor (CueProc)
Post by: dpr on 2018-01-16 06:26:01
where can i get cueproc 1.10 from?
http://nyaochi.sakura.ne.jp/software/cueproc/ is not working.

Thanks
D




Looks like a command line tool that has completely disappeared off the web.  The Wayback Machine has no archived copies of this but the site itself is archived (https://web.archive.org/web/20130404121507/http://nyaochi.sakura.ne.jp/software/cueproc/).

There's plenty of applications that can parse and do what cueproc does all with a nicer, easier to use GUI (http://www.foobar2000.org/).

Thanks. Can food are process a directory tree of cuefiles?


I meant foo as in foobar2000
Title: Re: Cuesheet Processor (CueProc)
Post by: ercofra on 2019-05-20 00:48:23
where can i get cueproc 1.10 from?
http://nyaochi.sakura.ne.jp/software/cueproc/ is not working.
I had a copy lying around:
https://mega.nz/#!wuBHGA6Y!PB1tGbc157lWb-0D1Nakz5ucfxPMA6aVeiTKUCUbajE

You shouldn't trust binaries from internet strangers, etc...

Offline, if someone still have a copy of cueproc can upload it?

Thanks
Title: Re: Cuesheet Processor (CueProc)
Post by: Cynic on 2019-05-20 11:42:22
cueproc-1.10_win32.zip (https://mega.nz/#!8nRmgAYZ!FHHUw9z3ihxXIKaRKkkE_5Xj37okJDCo68aTSNpQ7nI)
SimplePortal 1.0.0 RC1 © 2008-2019