Author Topic: utility to strip the ID3 tags off oggs for using elsewhere?  (Read 11370 times)

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
utility to strip the ID3 tags off oggs for using elsewhere?
« 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

PeteK

  • Guru
  • ****
  • Posts: 408
    • View Profile
Re: utility to strip the ID3 tags off oggs for using elsewhere?
« Reply #1 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.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: utility to strip the ID3 tags off oggs for using elsewhere?
« Reply #2 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

PeteK

  • Guru
  • ****
  • Posts: 408
    • View Profile
Re: utility to strip the ID3 tags off oggs for using elsewhere?
« Reply #3 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.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: utility to strip the ID3 tags off oggs for using elsewhere?
« Reply #4 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

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: utility to strip the ID3 tags off oggs for using elsewhere?
« Reply #5 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).
"Change is inevitable. Progress is optional."
-- Anonymous


PeteK

  • Guru
  • ****
  • Posts: 408
    • View Profile
Re: utility to strip the ID3 tags off oggs for using elsewhere?
« Reply #6 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.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: utility to strip the ID3 tags off oggs for using elsewhere?
« Reply #7 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

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: utility to strip the ID3 tags off oggs for using elsewhere?
« Reply #8 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.
"Change is inevitable. Progress is optional."
-- Anonymous


tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: utility to strip the ID3 tags off oggs for using elsewhere?
« Reply #9 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

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: utility to strip the ID3 tags off oggs for using elsewhere?
« Reply #10 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.
"Change is inevitable. Progress is optional."
-- Anonymous


tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: utility to strip the ID3 tags off oggs for using elsewhere?
« Reply #11 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

PeteK

  • Guru
  • ****
  • Posts: 408
    • View Profile
Re: utility to strip the ID3 tags off oggs for using elsewhere?
« Reply #12 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?

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: utility to strip the ID3 tags off oggs for using elsewhere?
« Reply #13 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


Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: utility to strip the ID3 tags off oggs for using elsewhere?
« Reply #14 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).
"Change is inevitable. Progress is optional."
-- Anonymous