LinuxMCE Forums

General => Users => Topic started by: tschak909 on November 12, 2007, 06:52:30 am

Title: utility to strip the ID3 tags off oggs for using elsewhere?
Post by: tschak909 on November 12, 2007, 06:52:30 am
Has anyone attempted this yet? I'm THIS close to throwing something together that can rip the ID3 tags off of a set of oggs (and store them elsewhere) so that I can bring them into my software to put on my ipod...

-Thom
Title: Re: utility to strip the ID3 tags off oggs for using elsewhere?
Post by: PeteK on November 12, 2007, 07:05:46 am
I'm not really sure what you're asking here, Thom.  Do you mean a utility for removing Vorbis tags from Ogg files?  Or are you looking for a way to read them?  If you're looking at playing with tags, though, I do have a request.  I have a bunch of tagged FLAC files (which also use Vorbis tags) that LMCE currently doesn't have any info for.  To import them, I'd either have to manually tag them, or come up with a script to read the tags and create an .id3 file for LMCE.  If you're looking into creating a similar script, It would be awesome if it would do that as well.
Title: Re: utility to strip the ID3 tags off oggs for using elsewhere?
Post by: tschak909 on November 12, 2007, 07:33:47 am
PeteK: The ogg vorbis files that are ripped via LinuxMCE's Copy Disc feature have ID3 tags attached to the front of them...which make them unreadable anywhere else.

-Thom
Title: Re: utility to strip the ID3 tags off oggs for using elsewhere?
Post by: PeteK on November 12, 2007, 07:38:46 am
Ah, that's strange.  That may explain why I couldn't read them with a standard ogg utility.  I thought that tag information for non-mp3 (i.e. flac, ogg) files was done via the external .id3 files.  Do you have any idea where the ID3 information gets appended?  I added tagging in the ripDiskWrapper.sh script, but that's through the ogg encoder utility, and the tags seemed to be added correctly in the testing I did.
Title: Re: utility to strip the ID3 tags off oggs for using elsewhere?
Post by: tschak909 on November 12, 2007, 07:55:07 am
i'm not sure yet.. i'm looking and haven't found it as of yet... damn! there's a lot of code....

-Thom
Title: Re: utility to strip the ID3 tags off oggs for using elsewhere?
Post by: Zaerc on November 12, 2007, 04:25:03 pm
The ogginfo utility seems to display a bunch of this info, but maybe I don't completely understand your question.  I'm looking for tools to verify the new quality settings with.

Code: [Select]
# ogginfo /mnt/device/75/data/audio/The\ Disposable\ Heroes\ of\ Hiphoprisy/Hypocrisy\ Is\ the\ Greatest\ Luxury/Television\,\ the\ Drug\ of\ the\ Nation.ogg
Processing file "/mnt/device/75/data/audio/The Disposable Heroes of Hiphoprisy/Hypocrisy Is the Greatest Luxury/Television, the Drug of the Nation.ogg"...

Warning: Hole in data found at approximate offset 4500 bytes. Corrupted ogg.
New logical stream (#1, serial: 5466a948): type vorbis
Vorbis headers parsed for stream 1, information follows...
Version: 0
Vendor: Xiph.Org libVorbis I 20050304
Channels: 2
Rate: 44100

Nominal bitrate: 499.821000 kb/s
Upper bitrate not set
Lower bitrate not set
User comments section follows...
        artist=Disposable Heroes Of Hiphoprisy
        genre=Hip-Hop
        date=1992
        album=Hypocrisy Is The Greatest Luxury
        tracknumber=3
Vorbis stream 1:
        Total data length: 24738573 bytes
        Playback length: 6m:38.973s
        Average bitrate: 496.044641 kb/s
Logical stream 1 ended
Warning: Hole in data found at approximate offset 24743936 bytes. Corrupted ogg.


(I suspect the data-hole-errors are the result of scratches, the file plays just fine).
Title: Re: utility to strip the ID3 tags off oggs for using elsewhere?
Post by: PeteK on November 12, 2007, 04:36:57 pm
Zaerc--

I wound up using a windows tool for flac/ogg file manipulation on files over Samba because of the ease in finding tools for windows.  I'm sure there are linux equivalents, but I just wasn't familiar with them.
Title: Re: utility to strip the ID3 tags off oggs for using elsewhere?
Post by: tschak909 on November 12, 2007, 05:27:51 pm
dude, zaerc, read the output you're getting from ogginfo

ogginfo will always try to plod through reading the file, even if the beginning headers are incorrect.

"Warning: Hole in data found at approximate offset 4500 bytes. Corrupted ogg."

I can't play the ogg files ripped inside lmce anywhere else, because ID3 tags are being slammed onto the beginning of them. And a lot of people are going to be very pissed if they use Copy Disc, and try to move their files elsewhere.

-Thom
Title: Re: utility to strip the ID3 tags off oggs for using elsewhere?
Post by: Zaerc on November 12, 2007, 07:42:52 pm
dude, zaerc, read the output you're getting from ogginfo

ogginfo will always try to plod through reading the file, even if the beginning headers are incorrect.

"Warning: Hole in data found at approximate offset 4500 bytes. Corrupted ogg."

I can't play the ogg files ripped inside lmce anywhere else, because ID3 tags are being slammed onto the beginning of them. And a lot of people are going to be very pissed if they use Copy Disc, and try to move their files elsewhere.

-Thom

Well I'm sorry if that wasn't what you were looking for.  I thought you wanted to read the tags so you could store them elsewhere.

If you can tell me how these tags should be added properly instead, I might be able to fix that in the ripping script as well.
Title: Re: utility to strip the ID3 tags off oggs for using elsewhere?
Post by: tschak909 on November 12, 2007, 08:01:07 pm
well, basically they're added correctly, but it needs to work like the video files, where the ID3 file is separate (the ID3 file is where the pointers to the image thumbnails are stored as well), instead of being embedded onto the front of the file.. that's a big big big big huge no-no.

-Thom
Title: Re: utility to strip the ID3 tags off oggs for using elsewhere?
Post by: Zaerc on November 12, 2007, 08:26:07 pm
Ok, let's just assume I know nothing about how it works with the video files (alright I confess I don't).  Could you give me an example of how to do it manually?

Just FYI, this is how they are put in by the ripping script:
Code: [Select]
oggenc -Q --artist "$DARTIST" --album "$DALBUM" --date "$CDYEAR" --genre "$CDGENRE" --tracknum "$TrackNumber" '$Quality' -o "$Dir/$FileName.'"$FinalExt"'.in-progress" -

Which I gather is aparently not the right way to do it then.  I know very little about these things, but I'm messing with that script now anyway, so I figured I might as well look into it if it's causing problems.
Title: Re: utility to strip the ID3 tags off oggs for using elsewhere?
Post by: tschak909 on November 12, 2007, 08:45:48 pm
i'm looking into it too, it's not oggenc causing the problem... it happens afterwards.... oggenc does not add id3 tags to anything, vorbis has its own tagging system...

-Thom
Title: Re: utility to strip the ID3 tags off oggs for using elsewhere?
Post by: PeteK on November 12, 2007, 09:37:23 pm
Hmm.  UpdateMedia tags MP3 files, but I thought it created separate .id3 files for .ogg and .flac files.  Do your oggs have .id3 files in the same directory?
Title: Re: utility to strip the ID3 tags off oggs for using elsewhere?
Post by: tschak909 on November 12, 2007, 09:44:34 pm
nope, they're being tacked onto the beginning of the ogg files!

*hmm*

Code: [Select]

dcerouter_41349:/home/public/data/audio/Devo/Duty Now for the Future# ls -l
total 31884
-rw-r--r-- 1 root public 2488320 2007-11-11 16:26 Blockhead.ogg
-rw-r--r-- 1 root public 2426880 2007-11-11 16:05 Clockout.ogg
-rw-r--r-- 1 root public 1026048 2007-11-11 16:05 Devo Corporate Anthem.ogg
-rw-r--r-- 1 root public 2711552 2007-11-11 16:05 Pink Pussycat.ogg
-rw-r--r-- 1 root public 2267136 2007-11-09 18:27 Red-Eye Express.ogg
-rw-r--r-- 1 root public 3784704 2007-11-11 16:05 S.I.B. (Swelling Itching Brain).ogg
-rw-r--r-- 1 root public 2990080 2007-11-11 16:05 Secret Agent Man.ogg
-rw-r--r-- 1 root public 5066752 2007-11-11 16:05 Smart Patrol Mr. DNA.ogg
-rw-r--r-- 1 root public 2250752 2007-11-11 16:05 Strange Pursuits.ogg
-rw-r--r-- 1 root public 2250752 2007-11-11 16:05 The Day My Baby Gave Me a Surprize.ogg
-rw-r--r-- 1 root public 1126400 2007-11-11 16:05 Timing X.ogg
-rw-r--r-- 1 root public 1945600 2007-11-11 16:05 Triumph of the Will.ogg
-rw-r--r-- 1 root public 2301952 2007-11-11 16:05 Wiggly World.ogg

and file shows me:

Code: [Select]

dcerouter_41349:/home/public/data/audio/Devo/Duty Now for the Future# file *.ogg
Blockhead.ogg:                          Audio file with ID3 version 23.0 tag, MP3 encoding
Clockout.ogg:                           Audio file with ID3 version 23.0 tag, MP3 encoding
Devo Corporate Anthem.ogg:              Audio file with ID3 version 23.0 tag, MP3 encoding
Pink Pussycat.ogg:                      Audio file with ID3 version 23.0 tag, MP3 encoding
Red-Eye Express.ogg:                    Audio file with ID3 version 23.0 tag, MP3 encoding
S.I.B. (Swelling Itching Brain).ogg:    Audio file with ID3 version 23.0 tag, MP3 encoding
Secret Agent Man.ogg:                   Audio file with ID3 version 23.0 tag, MP3 encoding
Smart Patrol Mr. DNA.ogg:               Audio file with ID3 version 23.0 tag, MP3 encoding
Strange Pursuits.ogg:                   Audio file with ID3 version 23.0 tag, MP3 encoding
The Day My Baby Gave Me a Surprize.ogg: Audio file with ID3 version 23.0 tag, MP3 encoding
Timing X.ogg:                           Audio file with ID3 version 23.0 tag, MP3 encoding
Triumph of the Will.ogg:                Audio file with ID3 version 23.0 tag, MP3 encoding
Wiggly World.ogg:                       Audio file with ID3 version 23.0 tag, MP3 encoding
dcerouter_41349:/home/public/data/audio/Devo/Duty Now for the Future#


further analysis of the files confirms that they are indeed OGG files with small mp3 files attached to the beginning of them
a single frame
with the id3 tags inside the frame.

this is nowhere near remotely sane or correct.

-Thom

Title: Re: utility to strip the ID3 tags off oggs for using elsewhere?
Post by: Zaerc on November 12, 2007, 10:11:51 pm
That sure explains a thing or two, thanks tschak909 for clearing this up.  I was really puzzeled why I was getting different results from both "file" and "ogginfo", I must have sometimes ran those before the files I was looking at got mangeled.

I'm really just starting to scratch the surface but should I happen to stumble over the culprit I will surely have a stab at fixing that (or at least blow the whistle on it's hideout).
Title: Re: utility to strip the ID3 tags off oggs for using elsewhere?
Post by: PeteK on November 12, 2007, 11:40:09 pm
Zaerc--

I remember looking at UpdateMedia.  The system checks for supported formats (.ogg, .flac, .mp3) and is supposed to either tag the files (mp3) or create .id3 files (ogg, flac).  You may be able to zero in by grepping .ogg, .flac, and .mp3 in the Updatemedia directory.
Title: Re: utility to strip the ID3 tags off oggs for using elsewhere?
Post by: Zaerc on November 13, 2007, 02:12:23 am
Well I looked around a bit, searched all the .cpp and .h files for .ogg, .flac and .mp3 but there seems to be no reference to them anywhere in the source (not outside the UpdateMedia directory either).

I did find UpdateMedia/id3info/id3info.cpp, which has calls to functions like: ID3_AddYear(&myTag, sValue.c_str(), true); but I can't even find where those functions are actually implemented.  ???

I'll look around some more, but I'm just not familiar enough with the code to figure out where it's being done, let alone able to do something about it, at least for the time being (and I'm not in much of a rush either). 
Title: Re: utility to strip the ID3 tags off oggs for using elsewhere?
Post by: schaferj on February 12, 2008, 08:33:14 am
A thread from last summer

http://forum.linuxmce.org/index.php?topic=1746

Suggests that UpdateMedia is writting the id3 tags in mp3, ogg, aac files (the code is svn: src/UpdateMedia/PlutoMediaFile.cpp) using libid3 - hardcoded to these three extensions.

Some desired to embed meta data in the files themselves, instead using the .id3 files in the directories and the database for flexibility.  And so modified LinuxMCE (rip script) to embed Artist/Album/Track/Genre/Date information into the music files when ripping a CD to see the information on the Squeezebox when playing back ripped files from the core. 

Perhaps a better solution for this goal would be to enable lmce to present the metadata to the squeezebox from either the .id3 files or the native tags of the format.

Is there a way to create .id3 tags for video (and audio that does not use id3) outside of lmce?

I use Jaikoz to lookup songs by acoustic id from MusicBrainz & MusicIP (and file/folder/metadata).  It's a java app - http://www.jthink.net/jaikoz/

Also dBpoweramp does format conversion and conditional paths/names as well as ripping & AMG meta retrieval.
http://forum.dbpoweramp.com/showthread.php?t=13928

And http://www.mp3tag.de/en/ let's you export tags to html, rtf, csv, xml, etc. So that may be a way to get meta data into .id3 files.  dBpa also allows exports with programming - http://www.dbpoweramp.com/developer-scripting-dmc.htm

Finally, I'm curious if anyone has had luck orgainizing video files with tools like idealsorter - http://www.idealsorter.com/ or similar?

Bottom line is I have a large collection of av (some carefully tagged, some not yet) but I'd like to have lmce display the meta on the ones I have organized.  lmce does not seem to pick up the meta directly, so I'm thinking that adding .id3 files may help.

thanks,
joseph

Title: Re: utility to strip the ID3 tags off oggs for using elsewhere?
Post by: kir on February 12, 2008, 03:41:29 pm
PeteK: The ogg vorbis files that are ripped via LinuxMCE's Copy Disc feature have ID3 tags attached to the front of them...which make them unreadable anywhere else.

-Thom


Thom, is this still an issue with the latest 0710b3? Do you still get these unreadable OGG Vorbis tracks or this has been fixed already?
Title: Re: utility to strip the ID3 tags off oggs for using elsewhere?
Post by: tschak909 on February 12, 2008, 03:47:32 pm
kir: just tried, and apparently, I can't rip audio CDs from my jukebox. I will try from my internal Disk Drive, when I get home.

-Thom
Title: Re: utility to strip the ID3 tags off oggs for using elsewhere?
Post by: kir on February 12, 2008, 04:07:00 pm
kir: just tried, and apparently, I can't rip audio CDs from my jukebox. I will try from my internal Disk Drive, when I get home.

-Thom


Thanks for trying - I managed to reproduce it: happens for the recognized Audio CD, so if your Audio CD is identified, it will most likely have this issue when ripped as OGG.

Reported in Mantis:
http://mantis.linuxmce.org/view.php?id=3935
Title: Re: utility to strip the ID3 tags off oggs for using elsewhere?
Post by: kir on February 12, 2008, 05:54:33 pm
The issue is fixed in SVN (and post-0710b3), so you will need new version of UpdateMedia to avoid doing this.

To cleanup the "broken" OGG files from attributes, you can use win32 too mp3tag -- select there all files and File->Remove_tag