You are not logged in.
I have been converting flac files to ogg for my son's ogg player and have been running into the problem that the tags describing the album, artist and song name are not being transferred to the ogg file.
The flac file has the info at least when I check the file in EasyTag and it shows up in Banshee but when I convert it using Soundconverter to ogg the tags are marked "unknown" (Checked them in EasyTag).
I would like to being able to be able to batch convert the flac files to ogg with the song info being automatically transferred to the tags.
Any help would be much appreciated.
Last edited by Hantabaru (2010-07-21 20:16:43)
Offline
Maybe http://aur.archlinux.org/packages.php?ID=36627 ?
http://wiki.archlinux.org/index.php/Convert_Flac_to_Mp3 <- this one's for mp3s but it deals w/ tags, so have a look.
Last edited by karol (2010-07-21 10:17:25)
Offline
You're sure they're not MP3 tags? I have encountered a few FLACs (ripped with EAC, often) that didn't have Vorbis tags but MP3 tags.
If your FLACs have vorbis tags, oggenc will preserve the tags in the Ogg Vorbis file.
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
Maybe http://aur.archlinux.org/packages.php?ID=36627 ?
http://wiki.archlinux.org/index.php/Convert_Flac_to_Mp3 <- this one's for mp3s but it deals w/ tags, so have a look.
Thanks, didn't think to check the wiki...:(
Will have a look.
Offline
You're sure they're not MP3 tags? I have encountered a few FLACs (ripped with EAC, often) that didn't have Vorbis tags but MP3 tags.
If your FLACs have vorbis tags, oggenc will preserve the tags in the Ogg Vorbis file.
I'm not sure.
I ripped the songs directly from the cd using Grip and the default settings for flac encoding.
I then converted using Soundconverter.
Are there some flags I should be adding to flac encoding to get the correct tag format for vorbis?
Offline
Offline
What do you see when you run
metaflac --liston one of your FLAC files? You should see the artist, album and title tags also.
Example:
METADATA block #2
type: 4 (VORBIS_COMMENT)
is last: false
length: 492
vendor string: reference libFLAC 1.2.1 20070917
comments: 16
comment[0]: TITLE=Hyyerr ft. Chip Tha Ripper
comment[1]: ARTIST=Kid Cudi
comment[2]: ALBUM=Man On The Moon: The End Of Day
comment[3]: DISCNUMBER=1
comment[4]: DATE=2009
comment[5]: TRACKNUMBER=14
comment[6]: TRACKTOTAL=16
comment[7]: GENRE=Rap
comment[8]: COMPOSER=C. Kalla/Leon Huff/Kenneth Gamble/Chip Tha Ripper
comment[9]: DISCTOTAL=1
comment[10]: ISRC=USUM70981909
comment[11]: REPLAYGAIN_REFERENCE_LOUDNESS=89.0 dB
comment[12]: REPLAYGAIN_TRACK_GAIN=-8.60 dB
comment[13]: REPLAYGAIN_TRACK_PEAK=0.98852539
comment[14]: REPLAYGAIN_ALBUM_GAIN=-8.46 dB
comment[15]: REPLAYGAIN_ALBUM_PEAK=0.98852539Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
http://flac.sourceforge.net/documentati … rview.html (at the very bottom)
As a convenience, the reference decoder knows how to skip ID3v1 and ID3v2 tags.
If your tags are in that format that's probably happening.
Offline
I'm usually using this script
#!/bin/bash
file=${1/.flac/}
qual=$2
echo " File: $file.flac"
echo "Quality: $qual"
title=`metaflac --show-tag="title" "$file.flac" | sed "s/title=//"`
artist=`metaflac --show-tag="artist" "$file.flac" | sed "s/artist=//"`
album=`metaflac --show-tag="album" "$file.flac" | sed "s/album=//"`
date=`metaflac --show-tag="date" "$file.flac" | sed "s/date=//"`
genre=`metaflac --show-tag="genre" "$file.flac" | sed "s/genre=//"`
track=`metaflac --show-tag="tracknumber" "$file.flac" | sed "s/tracknumber=//"`
flac -c -d "$file.flac" | oggenc -t "$title" -a "$artist" -G "$genre" -l "$album" \
-d "$date" -n "$track" -o $file.ogg -q $qual -Then enter a directory
for i in *flac; do flac2ogg.sh "$i" QUALITY; doneWorks for me. Of course the flacs should be properly tagged.
Last edited by Foucault (2010-07-21 16:28:59)
Offline
What do you see when you run
metaflac --liston one of your FLAC files? You should see the artist, album and title tags also.
Example:
METADATA block #2 type: 4 (VORBIS_COMMENT) is last: false length: 492 vendor string: reference libFLAC 1.2.1 20070917 comments: 16 comment[0]: TITLE=Hyyerr ft. Chip Tha Ripper comment[1]: ARTIST=Kid Cudi comment[2]: ALBUM=Man On The Moon: The End Of Day comment[3]: DISCNUMBER=1 comment[4]: DATE=2009 comment[5]: TRACKNUMBER=14 comment[6]: TRACKTOTAL=16 comment[7]: GENRE=Rap comment[8]: COMPOSER=C. Kalla/Leon Huff/Kenneth Gamble/Chip Tha Ripper comment[9]: DISCTOTAL=1 comment[10]: ISRC=USUM70981909 comment[11]: REPLAYGAIN_REFERENCE_LOUDNESS=89.0 dB comment[12]: REPLAYGAIN_TRACK_GAIN=-8.60 dB comment[13]: REPLAYGAIN_TRACK_PEAK=0.98852539 comment[14]: REPLAYGAIN_ALBUM_GAIN=-8.46 dB comment[15]: REPLAYGAIN_ALBUM_PEAK=0.98852539
metaflac --list donkeyboy-sometimes.flac
METADATA block #0
type: 0 (STREAMINFO)
is last: false
length: 34
minimum blocksize: 4096 samples
maximum blocksize: 4096 samples
minimum framesize: 981 bytes
maximum framesize: 14604 bytes
sample_rate: 44100 Hz
channels: 2
bits-per-sample: 16
total samples: 8436624
MD5 signature: 68890658aece54ab07c126f1087b84e6
METADATA block #1
type: 3 (SEEKTABLE)
is last: false
length: 360
seek points: 20
point 0: sample_number=0, stream_offset=0, frame_samples=4096
point 1: sample_number=438272, stream_offset=813983, frame_samples=4096
point 2: sample_number=880640, stream_offset=1923357, frame_samples=4096
point 3: sample_number=1318912, stream_offset=3102828, frame_samples=4096
point 4: sample_number=1761280, stream_offset=4426333, frame_samples=4096
point 5: sample_number=2203648, stream_offset=5615681, frame_samples=4096
point 6: sample_number=2641920, stream_offset=6794303, frame_samples=4096
point 7: sample_number=3084288, stream_offset=8074336, frame_samples=4096
point 8: sample_number=3526656, stream_offset=9430728, frame_samples=4096
point 9: sample_number=3964928, stream_offset=10797110, frame_samples=4096
point 10: sample_number=4407296, stream_offset=12126215, frame_samples=4096
point 11: sample_number=4849664, stream_offset=13197499, frame_samples=4096
point 12: sample_number=5287936, stream_offset=14386568, frame_samples=4096
point 13: sample_number=5730304, stream_offset=15714231, frame_samples=4096
point 14: sample_number=6172672, stream_offset=17091390, frame_samples=4096
point 15: sample_number=6610944, stream_offset=18453602, frame_samples=4096
point 16: sample_number=7053312, stream_offset=19828001, frame_samples=4096
point 17: sample_number=7495680, stream_offset=21167556, frame_samples=4096
point 18: sample_number=7933952, stream_offset=22456332, frame_samples=4096
point 19: sample_number=8376320, stream_offset=23366834, frame_samples=4096
METADATA block #2
type: 4 (VORBIS_COMMENT)
is last: false
length: 122
vendor string: reference libFLAC 1.2.1 20070917
comments: 4
comment[0]: album=Caught in a life
comment[1]: tracknumber=7
comment[2]: artist=Donkeyboy
comment[3]: title=Sometimes
METADATA block #3
type: 1 (PADDING)
is last: true
length: 8110It looks like the comments/ogg tags are there.
As a side note...How would I add them on the command line if they weren't there?
Offline
> As a side note...How would I add them on the command line if they weren't there?
man metaflac
Offline
I'm usually using this script
#!/bin/bash file=${1/.flac/} qual=$2 echo " File: $file.flac" echo "Quality: $qual" title=`metaflac --show-tag="title" "$file.flac" | sed "s/title=//"` artist=`metaflac --show-tag="artist" "$file.flac" | sed "s/artist=//"` album=`metaflac --show-tag="album" "$file.flac" | sed "s/album=//"` date=`metaflac --show-tag="date" "$file.flac" | sed "s/date=//"` genre=`metaflac --show-tag="genre" "$file.flac" | sed "s/genre=//"` track=`metaflac --show-tag="tracknumber" "$file.flac" | sed "s/tracknumber=//"` flac -c -d "$file.flac" | oggenc -t "$title" -a "$artist" -G "$genre" -l "$album" \ -d "$date" -n "$track" -o $file.ogg -q $qual -Then enter a directory
for i in *flac; do flac2ogg.sh "$i" QUALITY; doneWorks for me. Of course the flacs should be properly tagged.
Fantastic ![]()
Always more fun having a script to do it with ![]()
Will try this, but still want to figure out what is going wrong with the other method I have used.
Offline
Foucault wrote:I'm usually using this script
#!/bin/bash file=${1/.flac/} qual=$2 echo " File: $file.flac" echo "Quality: $qual" title=`metaflac --show-tag="title" "$file.flac" | sed "s/title=//"` artist=`metaflac --show-tag="artist" "$file.flac" | sed "s/artist=//"` album=`metaflac --show-tag="album" "$file.flac" | sed "s/album=//"` date=`metaflac --show-tag="date" "$file.flac" | sed "s/date=//"` genre=`metaflac --show-tag="genre" "$file.flac" | sed "s/genre=//"` track=`metaflac --show-tag="tracknumber" "$file.flac" | sed "s/tracknumber=//"` flac -c -d "$file.flac" | oggenc -t "$title" -a "$artist" -G "$genre" -l "$album" \ -d "$date" -n "$track" -o $file.ogg -q $qual -Then enter a directory
for i in *flac; do flac2ogg.sh "$i" QUALITY; doneWorks for me. Of course the flacs should be properly tagged.
Fantastic
Always more fun having a script to do it with
Will try this, but still want to figure out what is going wrong with the other method I have used.
The script works like a dream and encodes the tags correctly so that they show the artist, album and title when playing...thanks very much ![]()
A question about the script...How could I adjust it to put the encoded ogg files in another directory?
Would it be something to do with the -o switch of the oggenc line?
For example:
flac -c -d "$file.flac" | oggenc -t "$title" -a "$artist" -G "$genre" -l "$album" \
-d "$date" -n "$track" -o /data/music/tmp/$file.ogg -q $qual -Cheers ![]()
Last edited by Hantabaru (2010-07-21 18:39:56)
Offline
'-o' may mean output, so you can tweak it to your liking.
Offline
> As a side note...How would I add them on the command line if they weren't there?
man metaflac
I have looked a the man page but as usual doesn't help until I have seen an example of its use.
I assume it is
--set-tag=field
Add a tag. The field must comply with the Vorbis comment spec,
of the form "NAME=VALUE". If there is currently no tag block,
one will be created.which is the relevant bit, so does that mean it would be
metaflac --set-tag="album=Caught in a life" donkeyboy_sometimes.flacIf this is correct, where can I find a list of the NAMEs for each tag?
If this isn't correct, how should it look AND where can I find a list of the NAMEs for each tag? ![]()
Offline
karol wrote:> As a side note...How would I add them on the command line if they weren't there?
man metaflacI have looked a the man page but as usual doesn't help until I have seen an example of its use.
I assume it is
--set-tag=field Add a tag. The field must comply with the Vorbis comment spec, of the form "NAME=VALUE". If there is currently no tag block, one will be created.which is the relevant bit, so does that mean it would be
metaflac --set-tag="album=Caught in a life" donkeyboy_sometimes.flacIf this is correct, where can I find a list of the NAMEs for each tag?
If this isn't correct, how should it look AND where can I find a list of the NAMEs for each tag?
Ok...tried the metaflac line using the tag "genre=pop" and that worked.
Still wondering if there is a list of the tag names anywhere?
Offline
> Ok...tried the metaflac line using the tag "genre=pop" and that worked.
IIRC there was one called "Christian Gangsta".
I've found this one: http://www.multimediasoft.com/amp3dj/he … 00003e.htm
Last edited by karol (2010-07-21 19:24:13)
Offline
A question about the script...How could I adjust it to put the encoded ogg files in another directory?
Would it be something to do with the -o switch of the oggenc line?
For example:
flac -c -d "$file.flac" | oggenc -t "$title" -a "$artist" -G "$genre" -l "$album" \ -d "$date" -n "$track" -o /data/music/tmp/$file.ogg -q $qual -Cheers
Tried this adjustment to the -o switch and it works fine.
What would be really cool however would be if i can get it to automatically create an additional ./artist/album/ folder ![]()
Offline
> Ok...tried the metaflac line using the tag "genre=pop" and that worked.
IIRC there was one called "Christian Gangsta".I've found this one: http://www.multimediasoft.com/amp3dj/he … 00003e.htm
I was thinking more like a list of the album, artist, title, genre, etc., but this is helpful too.
Offline
About ready to mark this as solved.
The only thing really missing is why Soundconverter did not transfer the tags when converting flac to ogg?
Offline
You should be able to set whatever you want for the genre, that should not matter. I noticed however your Vorbis tags are lowercase variables, try uppercase ones and see how Soundconverter treats these. It would be silly, but you never know Soundconverter looks for uppercase variables.
Also, see if oggenc keeps the vorbis tags. If it does, then you can be positive the problem is with Soundconverter.
Also, if you're going to be converting FLAC to Ogg Vorbis, just use oggenc. Any script to convert FLAC to Ogg Vorbis is plain redundant. As I said the tags are preserved, I've been doing my conversion like that for years, litterally (nofi Foucault).
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
karol wrote:> Ok...tried the metaflac line using the tag "genre=pop" and that worked.
IIRC there was one called "Christian Gangsta".I've found this one: http://www.multimediasoft.com/amp3dj/he … 00003e.htm
I was thinking more like a list of the album, artist, title, genre, etc., but this is helpful too.
I think this is what I was looking for http://xiph.org/vorbis/doc/v-comment.html ![]()
Offline
I usually use this script
oggenc -q6 *.flac
mv *.ogg /path/to/my/rockbox(kinda)
Works!
Offline
Damn, I totally forgot that oggenc can read FLAC. So much for all the hassle.
Offline
You should be able to set whatever you want for the genre, that should not matter. I noticed however your Vorbis tags are lowercase variables, try uppercase ones and see how Soundconverter treats these. It would be silly, but you never know Soundconverter looks for uppercase variables.
Also, see if oggenc keeps the vorbis tags. If it does, then you can be positive the problem is with Soundconverter.
Also, if you're going to be converting FLAC to Ogg Vorbis, just use oggenc. Any script to convert FLAC to Ogg Vorbis is plain redundant. As I said the tags are preserved, I've been doing my conversion like that for years, litterally (nofi Foucault).
The script i was talking about was for batch converting lots of flac files and the one supplied by Foucault worked well.
The tags being lowercase was directly from the conversion of the wav files to flac by Grip, may try changing them to uppercase and seeing if soundconverter does it then, will see if I have time.
Happy now that I can do what I need to do now...marking this as solved ![]()
Appreciate all the help.
Offline