Help please with flac parameters

I am trying to sort out a problem with ripping some opera cds using grip and believe the freedb data obtained may contain illegal characters. However before attempting to sort this out I am trying to understand the parameters which are passed to flac by grip. I have read the man pages for flac but have difficulty in understanding them.

The parameters passed to flac are as follows:-

–best -TTRACKNUMBER=%t -TALBUM=%d -TTITLE=%n -TARTIST=%a -TGENRE=%G -TDATE=%y -TDISCID=%i -TDESCRIPTION=“Created by Grip” -V -o %m %w

I understand that --best is equivalent to -8 or maximum compression but where are %t, %d, %n, %a, %G, %y, %i defined and what are the %m %w at the end for?

Similarly the parameters for encode file format are:-

~/flac/%A/%d/%n.%x.
I do not have a directory ~/flac/ and none seems to be created during the process. The files are put in ~/Music/ where I want. How does this work. Finally where are all the % parameters defined and what does the .%x. do?

Sorry to be so dumb but if somebody could please point me to a guide I would truly appreciate the help.
Budge2

So here is one of the manual pages you may have already seen: flac(1): Free Lossless Audio Codec - Linux man page

But, I must ask if you are just ripping audio CD’s, have you tried using Asunder? Is it that flac does not work properly with Asunder or that you could not find the right command for flac, no matter the ripping program?

Thank You,

Hi and many thanks. I had studied the man pages but it the the “%” followed by a letter that have me foxed. Where are the letters defined and what exactly does the % signify.

I have so far tried asunder, grip, K3b, Audex, soundKonverter and if I could find an 11.4 version I would try Kaudiocreator.
The problem starts with the freedb lookup. In some cases I get nothing back but in other cases I get a great deal of data but when I rip, for some tracks the process fails and I either get left with a .wav file or no ending and an error message.

As I have posted elsewhere I believe there may be illegal characters in the tagging data which is frustrating the process.
About to try again. If you have any ideas please let me know.
Regards and Happy New Year,
Budgie2

Some times the % sign is used to represent a space I know. As for illegal characters, here is a script snipit I used to remove such characters from the file names of existing media files before conversion (m4a).

#
# This section contains the modifications to files before the conversion
#


#replace all spaces with an underline 
    for i in *.[Mm]4[Aa] ; do
      mv "$i" `echo $i | tr ' ' '_'`
    done


#replace all uppercase letters with lowercase
    for i in *.[Mm]4[Aa] ; do 
      mv "$i" `echo $i | tr '[A-Z]' '[a-z]'` 
    done


#replace all ( letters with -
    for i in *.[Mm]4[Aa] ; do 
      mv "$i" `echo $i | tr '(' '-'` 
    done


#replace all ) letters with -
    for i in *.[Mm]4[Aa] ; do 
      mv "$i" `echo $i | tr ')' '-'` 
    done

Of course this was for existing media files, but the characters in question were giving me a problem.

Thank You,

Hi, Many thanks. Still no info on the meaning of the symbol letters. For example %a might be artist but what is %A?
Thanks for the script. My problem is the offending text comes from freedb data and I have not found means to edit this before ripping.
Will keep trying but my new attempt with asunder gave same results. 19 tracks ripped but errors on 16 and only three .flac files created.
Regards,
Budgie2

So I have just been using Asunder with MP3 format myself with no problems. I did find one interesting link here you might want to read:

Backing up a CD collection on Linux | oyvindhauge.com

Thank You,

Hi and thanks for the link. Clearly many have gone before me on this and indeed I have 20,000 files completed and in flac on my NAS but it has been these last two new opera CDs that have caused the difficulty. My original diagnosis of problems being caused by illegal characters in the freedb data seems to be confirmed. Not entirely sure which characters are illegal but I read they are defined in the Vorbis man pages so will research in due course. Meanwhile I found that soundKonverter allowed me to edit the tags downloaded from freedb before ripping so I removed all :, !, and replaced by _ and lo and behold the rip went perfectly.

My second problem is that for the second disk CD2 in the set in each case the freedb lookup either fails or returns the CD1 data. So my next question is how to search the freedb database to force the correct choice. Is the possible?

At some point I shall have to do a summary of my experience for the benefit of the few who share my taste in music but what would be really good would be for the freedb site to filter tags before allowing them to be posted. My guess is the problem comes from a Windoze user but I could be wrong.

Any comments on the freedb welcome.
Meanwhile I have just done the new install of 12.1 to stay up to date so I have a few setting up tasks to get on with.

Regards,
Budgie2

On Sun, 01 Jan 2012 16:16:02 GMT, Budgie2
<Budgie2@no-mx.forums.opensuse.org> wrote:

>
>jdmcdaniel3;2424839 Wrote:
>> So here is one of the manual pages you may have already seen: ‘flac(1):
>> Free Lossless Audio Codec - Linux man page’
>> (http://linux.die.net/man/1/flac)
>>
>> But, I must ask if you are just ripping audio CD’s, have you tried
>> using Asunder? Is it that flac does not work properly with Asunder or
>> that you could not find the right command for flac, no matter the
>> ripping program?
>>
>> Thank You,
>Hi and many thanks. I had studied the man pages but it the the “%”
>followed by a letter that have me foxed. Where are the letters defined
>and what exactly does the % signify.
>
>I have so far tried asunder, grip, K3b, Audex, soundKonverter and if I
>could find an 11.4 version I would try Kaudiocreator.
>The problem starts with the freedb lookup. In some cases I get nothing
>back but in other cases I get a great deal of data but when I rip, for
>some tracks the process fails and I either get left with a .wav file or
>no ending and an error message.
>
>As I have posted elsewhere I believe there may be illegal characters in
>the tagging data which is frustrating the process.
>About to try again. If you have any ideas please let me know.
>Regards and Happy New Year,
>Budgie2

On Sun, 01 Jan 2012 16:16:02 GMT, Budgie2
<Budgie2@no-mx.forums.opensuse.org> wrote:

>
>jdmcdaniel3;2424839 Wrote:
>> So here is one of the manual pages you may have already seen: ‘flac(1):
>> Free Lossless Audio Codec - Linux man page’
>> (http://linux.die.net/man/1/flac)
>>
>> But, I must ask if you are just ripping audio CD’s, have you tried
>> using Asunder? Is it that flac does not work properly with Asunder or
>> that you could not find the right command for flac, no matter the
>> ripping program?
>>
>> Thank You,
>Hi and many thanks. I had studied the man pages but it the the “%”
>followed by a letter that have me foxed. Where are the letters defined
>and what exactly does the % signify.

From watching Amarok and k3b do their thing a bit i figure it is shell
exported variables by name. In particular in k3b look at the file naming
control strings:

%A is Album artist
%a is track artist
and so forth

> TTRACKNUMBER=%t -TALBUM=%d -TTITLE=%n -TARTIST=%a -TGENRE=%G
> -TDATE=%y -TDISCID=%i

from the parameter list like with the shell like variables set with
something like export %A=<variable>

Many rippers glue the parts together like this. A chunk of Amarok is Ruby
scripts.

>
>I have so far tried asunder, grip, K3b, Audex, soundKonverter and if I
>could find an 11.4 version I would try Kaudiocreator.
>The problem starts with the freedb lookup. In some cases I get nothing
>back but in other cases I get a great deal of data but when I rip, for
>some tracks the process fails and I either get left with a .wav file or
>no ending and an error message.
>
>As I have posted elsewhere I believe there may be illegal characters in
>the tagging data which is frustrating the process.
>About to try again. If you have any ideas please let me know.
>Regards and Happy New Year,
>Budgie2

On Tue, 03 Jan 2012 10:06:02 GMT, Budgie2
<Budgie2@no-mx.forums.opensuse.org> wrote:

>
>My second problem is that for the second disk CD2 in the set in each
>case the freedb lookup either fails or returns the CD1 data. So my next
>question is how to search the freedb database to force the correct
>choice. Is the possible?

Yes and no. What you have to do is reject freedb result, type in all the
correct information, and send that to freedb. Not much fun, i have done
so many times. My collection is about half the size of yours.

?-)