]>
diplodocus.org Git - flac-archive/blob - flac2mp3
5 B<flac2mp3> - transcode FLAC file to MP3 files
9 B<flac2mp3> [B<--lame-options> I<lame-options>] [B<-q>] [B<-v>] I<file> [...]
13 B<flac2mp3> transcodes the FLAC files I<file> to MP3 files. I<file>
14 may be the kind of FLAC file B<fa-flacd> generates. That is, it
15 contains a cue sheet, one TITLE tag per track listed therein, and
16 ARTIST, ALBUM, and DATE tags.
18 Note that lame is retarded, and parses B<LANG> directly itself! So, in order
19 for it to transcode textual tags, you must specify the encoding in LANG, e.g.
26 =item B<--lame-options> I<lame-options>
28 Pass I<lame-options> to B<lame>. This ends up being passed to the
29 shell, so feel free to take advantage of that. You'll almost
30 certainly have to put I<lame-options> in single quotes.
32 =item B<-q> [B<--quiet>]
34 Suppress status information. This option is passed along to B<flac>
37 =item B<-v> [B<--verbose>]
39 Print diagnostic information. This option is passed along to B<flac>
46 Written by Eric Gillespie <epg@pretzelnet.org>.
50 package epg
::flac
::archive
::mp3
;
57 use lib
$FindBin::Bin
;
60 epg
::flac
::archive
::tags-
>import(
75 # This is an old TODO; what's wrong with --ty ?
76 # TODO: Look at TDOR, TDRL, TDRC for date.
87 '--pad-id3v2-size', 0,
90 quote
($tags->{artist
}),
92 quote
($tags->{album
}),
94 quote
($tags->{tracknumber
}),
96 quote
($tags->{title
}),
101 #(map { ('--tv', quote("TPE2=$_")) } @{$albumartist}),
102 (map { ('--tv', quote
("TPOS=$_")) } @{$tags->{discnumber
}}),
111 mangle_for_file_name
(
115 (map { two_digits
($_) } @{$tags->{DISCNUMBER
} // []}),
116 (map { two_digits
($_) } @{$tags->{TRACKNUMBER
} // []}),
118 @{$tags->{VERSION
} // []},
119 @{$tags->{PARTNUMBER
} // []},
126 say('metaflac --export-picture-to=flac2mp3.cover.$$ ',
127 quote
($flac), ' && pic_options="--ti flac2mp3.cover.$$"');
130 my ($tags) = read_tags_metaflac
($flac);
131 flac2mp3
(filename
($tags), $flac, {track_tags
($tags)});
132 say('unset pic_options');
134 say('rm -f flac2mp3.cover.$$');