MP3 conversion rate suggestions

I'm in the process of converting my FLAC files to MP3's for use on my iPhone. I will be using LAME. What have you found to be the best rate type (VBR, CBR etc.), & rate setting? That is, what saves the most memory, but provides the most acceptable sonics?
For an iphone, I imagine that a 128kbps MP3 would be perfectly adequate. After all, what equipment do you plan to hook up to the iphone? I think that MP3 files between 128 kpbs and 192 kbps is an optimal point of sound quality to file size.

You'll need 4 programs (in Linux, at least): flac (to extract the audio info from FLAC files), metaflac (to extract tags from FLAC files), lame (to encode MP3 files), and id3v2 (to tag the MP3 files).

Using Linux, you would execute a command such as:

flac -d -o - "FLAC_FILENAME_HERE" | lame -b MP3_BITRATE_HERE -h - > "MP3_FILENAME_HERE"

Then, to copy the tags (this example is a subroutine in Perl that accepts thet FLAC and MP3 filenames as parameters and copies the pertinent tags from the FLAC file to the MP3 file):

sub copy_tag_data
my $FLAC_filename = shift;
my $MP3_filename = shift;

my %tags;
my $tag_parameter;

# Read FLAC file tags

$tags{'title'} = `metaflac --show-tag=TITLE "$FLAC_filename"`;
$tags{'artist'} = `metaflac --show-tag=ARTIST "$FLAC_filename"`;
$tags{'album'} = `metaflac --show-tag=ALBUM "$FLAC_filename"`;
$tags{'genre'} = `metaflac --show-tag=GENRE "$FLAC_filename"`;
$tags{'tracknumber'} = `metaflac --show-tag=TRACKNUMBER "$FLAC_filename"`;
$tags{'date'} = `metaflac --show-tag=DATE "$FLAC_filename"`;
$tags{'ensemble'} = `metaflac --show-tag=ENSEMBLE "$FLAC_filename"`;
$tags{'composer'} = `metaflac --show-tag=COMPOSER "$FLAC_filename"`;

foreach $tag_parameter (keys %tags)
# Strip the "TAG=" part out

$tags{$tag_parameter} =~ s|^.*?=||;

# Get rid of double quotes or backtics
# (convert them to single quotes)

$tags{$tag_parameter} =~ s|[\"\`]|\'|g;

# Remove trailing newlines

chomp ($tags{$tag_parameter});

# Now write these tags to the MP3 file

`id3v2 --song \"$tags{'title'}\" --artist \"$tags{'artist'}\" --album \"$tags{'album'}\" --TCON \"$tags{'genre'}\" --TRCK \"$tags{'tracknumber'}\" --TCOM \"$tags{'composer'}\" --TYER \"$tags{'date'}\" "$MP3_filename"`;


I hope that helps!

Contrary to the first response I disagree.
Either use vbr with v0
Or cbr with 320. This is after all an audiophile website (not that mp3s fit in this particulart). But you must utilize the best options that the lossy compression format offer, right?!?!

Hope this helps, and best of luck.
Tmesselt, the point of his using a lossy codec is to save space. At 320 kbps you're getting less of a size advantage relative to FLAC, which is what his original files are encoded in. So that's why I recommended the mid-range cbr settings (128-192).

As for cbr vs vbr, both are probably perfectly acceptable nowadays. There were issues in the past with compatibility using vbr in MP3's, but that's been solved for the most part. Why not try experimenting with both and see if you can perceive any sound quality differences? If not, choose the one that produces the smallest files.

I stand by my original post, of just sticking with v0 or 320. V0 will save you more storage space of the 2, while some believe it is the best sounding as well. Ymmv

To sufentanil, I respect your need for storage concerns. I on the other hand would much rather have less music on a device at a higher bitrate than vice-versa.
For that you should look into various sites for those who have compared.I only want on computer 320 or FLAC but have heard that a 192/256 VBR is hard to distinguish on a average stereo let alone a portable.
Check out mediacoder audio edition. Free. Transcodes straight from flac to mp3. Very easy to use. It's so easy to use that you can basically decide spur of the moment what you want to convert, do it quickly, and put the mp3s whereever you need them. I would suggest something in the range of 192 VBR.
The magic flac to mp3 free converter is great, i use it to convert that kind of files. Magic FLAC to MP3 Converter allows you to convert FLAC files (Free lossless audio codec) (.flac , .fla, .ogg) to MP3 and WMA, WAV.