Why Do Oggs Need So Long... |
![]() ![]() |
Why Do Oggs Need So Long... |
Nov 11 2002, 21:50
Post
#1
|
|
![]() Group: Members Posts: 2 Joined: 7-October 02 From: Hamburg-Germany Member No.: 3495 |
Hey all,
Have a question: You know, why Ogg Vorbis files need so long to Tag or to rename with tag? mp3s are average. Mpc really go fast but Oggs are so lame Thats the only disadvantage of this format. thanx, Duke |
|
|
|
Nov 11 2002, 22:33
Post
#2
|
|
|
Group: Banned Posts: 386 Joined: 5-December 01 Member No.: 589 |
QUOTE (DukeSchmitti @ Nov 11 2002 - 02:50 PM) Hey all, Have a question: You know, why Ogg Vorbis files need so long to Tag or to rename with tag? mp3s are average. Mpc really go fast but Oggs are so lame Thats the only disadvantage of this format. thanx, Duke How can they be slower? Are you using some kooky software or something? What is your setup. They are speedy for me. |
|
|
|
Nov 11 2002, 22:37
Post
#3
|
|
|
Group: Developer (Donating) Posts: 2041 Joined: 19-October 01 From: Finland Member No.: 322 |
Ogg comment header is located at the beginning of the file, editing it with vorbis libraries means that whole file must be rewritten with new contents. On a 3MB file this means that about 16000 times more bytes must be written compared to tags that are located at the end of file.
|
|
|
|
Nov 11 2002, 23:35
Post
#4
|
|
![]() Group: Members Posts: 284 Joined: 13-January 02 From: Sthlm, Sweden Member No.: 999 |
If ogg ever takes the big step into the file sharing programs and/or Usenet, there are one advantage and one disadvantage with the tagging system.
Disadvantage: If for some reason the transfer is interupted, you cannot tell by the tags if the file has been interupted. This is the case for mp3s and id3v1 - a quick look at the tags of an album and you can spot the incomplete tracks immediately. Advantage: You actually get the tags even if the transfer is interupted. So with this in mind, I'd prefer both id3v1 and id3v2x in mp3's published on the Internet. But that might just be me. -------------------- http://forum.studio.se (in Swedish)
|
|
|
|
Nov 12 2002, 00:03
Post
#5
|
|
|
Group: Members Posts: 757 Joined: 8-October 01 Member No.: 247 |
QUOTE (Case @ Nov 11 2002 - 10:37 PM) Ogg comment header is located at the beginning of the file, editing it with vorbis libraries means that whole file must be rewritten with new contents. On a 3MB file this means that about 16000 times more bytes must be written compared to tags that are located at the end of file. I don't understand why "padding" is not implemented with oggenc yet. It has been described how to do it - around 10 lines of extra code if I'm not mistaken. Then editing tags in ogg files would be just as fast as with any other sort of tag. Maybe you (or someone else who can compile oggenc) could make a custum version? I'm pretty sure it would go in the main branch soon enough... I'm not so good with C myself so I haven't managed to compile oggenc yet so I wait for someone else to do it... But here is what I suggest to change: After this line in encode.c: vorbis_analysis_headerout(&vd,opt->comments, header_main,&header_comments,&header_codebooks); Add: header_comments.packet = realloc(header_comments.packet, header_comments.bytes + 1024); header_comments.bytes += 1024; At least the idea on how to do it should be clear. This post has been edited by ErikS: Nov 12 2002, 00:19 |
|
|
|
Nov 12 2002, 23:22
Post
#6
|
|
![]() xcLame and OggDropXPd Developer Group: Developer Posts: 3708 Joined: 30-September 01 From: Bracknell, UK Member No.: 111 |
Oggenc2.1 is now available at Mirror 1, below. It incorporates the following additional command line option:
CODE -p, --padding n Number of kilobytes of padding to provide in comment header for post-encoding tagging. (0 - 4 permitted) The requested space is zero filled. -------------------- John
---------------------------------------------------------------- My compiles and utilities are at http://www.rarewares.org/ |
|
|
|
Nov 12 2002, 23:41
Post
#7
|
|
![]() Group: Members Posts: 54 Joined: 5-September 02 Member No.: 3302 |
What about having it defult to 0.25? Would this be a problum? Can it take a decimal value?
thanks in advance |
|
|
|
Nov 13 2002, 00:56
Post
#8
|
|
![]() Group: Members Posts: 393 Joined: 23-July 02 From: Blue Grass, IA Member No.: 2760 |
Updating Ogg tags in Media Jukebox seems very fast, so by default it seems there is SOME padding and it is NOT rewriting the whole file.
Question is....will extra padding keep whatever tag editor from a whole file rewrite? If not then there isn't much point in it. Why did Xiph put tag info in front of the file? Behind like in ID3v1 seems more logical. Xenno -------------------- No one can be told what Ogg Vorbis is...you have to hear it for yourself
- Morpheus |
|
|
|
Nov 13 2002, 01:03
Post
#9
|
|
|
Group: Members Posts: 757 Joined: 8-October 01 Member No.: 247 |
There is no padding by default, but if your new tag is smaller than what was there before obviously you don't need to rewrite the whole file. When you add padding to the file you won't have to rewrite it even when the new tag is bigger.
|
|
|
|
Nov 13 2002, 01:05
Post
#10
|
|
|
Group: Members Posts: 85 Joined: 14-November 01 Member No.: 459 |
I believe that it was because ogg vorbis was heavily focussed on streaming, and therefore the header should be the first thing to arrive.
Also, part of that focus meant that it is possible to put extra headers in the stream throughout, meaning the tags can update while still playing a stream. Seems like a good way to do it to me. Problem is update time (which may be resolved by using padding). To be honest, I can't actually see where the logic of putting a stream header at the end of the file steps in. That is just me of course; I am not renown for my logic gnoshi -------------------- happiness comes in brown paper bags.
|
|
|
|
Nov 13 2002, 01:10
Post
#11
|
|
![]() xcLame and OggDropXPd Developer Group: Developer Posts: 3708 Joined: 30-September 01 From: Bracknell, UK Member No.: 111 |
QUOTE (deveco @ Nov 12 2002 - 10:41 PM) What about having it defult to 0.25? Would this be a problum? Can it take a decimal value? thanks in advance I can pretty much make the unit of padding( How about I make it units of 128bytes upto a maximum of 5kb? Does anyone have any other ideas about this? -------------------- John
---------------------------------------------------------------- My compiles and utilities are at http://www.rarewares.org/ |
|
|
|
Nov 13 2002, 05:36
Post
#12
|
|
|
Group: Members Posts: 233 Joined: 3-December 01 Member No.: 578 |
QUOTE (john33 @ Nov 12 2002 - 08:10 PM) How about I make it units of 128bytes upto a maximum of 5kb? Does anyone have any other ideas about this? Bytes would be fine, for those that really want to have something exact. KB would also be fine, because who's really worried about 512 bytes of padding after a few MB anyway (and if you are, why)? It could even be bytes, but multiplied by 1024 if the last character is a 'K' (or 'k'). This post has been edited by Ardax: Nov 13 2002, 05:36 |
|
|
|
Nov 13 2002, 09:10
Post
#13
|
|
|
Group: Members Posts: 125 Joined: 13-January 02 From: Cold Lake, Alberta Member No.: 997 |
Is adding padding going to affect gapless playback as it has with mp3?
Or has that already been addressed? B) -------------------- The sky is blue.
|
|
|
|
Nov 13 2002, 15:14
Post
#14
|
|
|
Group: Members Posts: 233 Joined: 3-December 01 Member No.: 578 |
Only if your padding is large enough that it takes longer to seek through than your audio buffer can handle. In other words: Don't leave enough space so you can uuencode a 1200 dpi scan of the CD cover and you should be fine.
|
|
|
|
Nov 13 2002, 16:09
Post
#15
|
|
|
Group: Members Posts: 111 Joined: 2-July 02 From: Germany Member No.: 2450 |
QUOTE (Emanuel @ Nov 12 2002 - 12:35 AM) Disadvantage: If for some reason the transfer is interupted, you cannot tell by the tags if the file has been interupted. This is the case for mp3s and id3v1 - a quick look at the tags of an album and you can spot the incomplete tracks immediately. There's something called EOS flag... when the last frame of an ogg file doesn't have this flag set the file isn't complete... You can verify this with ogginfo for instance... BTW this is not vorbis specific Maybe a function to verify the file can be added to the player plugins This post has been edited by Slo Mo Snail: Nov 13 2002, 16:12 |
|
|
|
Nov 13 2002, 19:09
Post
#16
|
|
![]() Group: Members Posts: 54 Joined: 5-September 02 Member No.: 3302 |
QUOTE How about I make it units of 128bytes upto a maximum of 5kb? Does anyone have any other ideas about this? This sounds fine, lets just make it default to 2 (256bytes), that way if you have only a tag like "track 1" you can replace it with album, artist and, track w/o re-writing the file. |
|
|
|
Nov 17 2002, 01:37
Post
#17
|
|
|
Group: Members Posts: 79 Joined: 5-May 02 Member No.: 1970 |
QUOTE (Emanuel @ Nov 11 2002 - 10:35 PM) If ogg ever takes the big step into the file sharing programs and/or Usenet, there are one advantage and one disadvantage with the tagging system. Disadvantage: If for some reason the transfer is interupted, you cannot tell by the tags if the file has been interupted. This is the case for mp3s and id3v1 - a quick look at the tags of an album and you can spot the incomplete tracks immediately. Advantage: You actually get the tags even if the transfer is interupted. So with this in mind, I'd prefer both id3v1 and id3v2x in mp3's published on the Internet. But that might just be me. The ogg file header contains information that can tell you if it is an incomplete stream. Just run ogginfo on the ogg file, and it will say "possibly incomplete file"..... So you don't need to tell by the tags. |
|
|
|
Dec 23 2003, 01:59
Post
#18
|
|
|
Group: Members Posts: 208 Joined: 28-May 02 From: Helsingborg Member No.: 2147 |
John33, is there any program out there that can add padding to an already encoded file ?
|
|
|
|
Dec 23 2003, 10:44
Post
#19
|
|
![]() xcLame and OggDropXPd Developer Group: Developer Posts: 3708 Joined: 30-September 01 From: Bracknell, UK Member No.: 111 |
QUOTE (treech @ Dec 23 2003, 12:59 AM) John33, is there any program out there that can add padding to an already encoded file ? None that I know of. -------------------- John
---------------------------------------------------------------- My compiles and utilities are at http://www.rarewares.org/ |
|
|
|
Dec 23 2003, 12:08
Post
#20
|
|
|
Group: Members Posts: 208 Joined: 28-May 02 From: Helsingborg Member No.: 2147 |
Hmmm, perhaps someone could persuade peter to add it to foobar ?
This post has been edited by treech: Dec 23 2003, 12:09 |
|
|
|
Dec 23 2003, 12:22
Post
#21
|
|
|
Matroska developer Group: Members Posts: 922 Joined: 29-September 01 Member No.: 74 |
Why cant the tags be anywhere in the file, like for matroska, so this decision is left to the app making them ? Is there any technical reason to not allow that in Ogg ?
-------------------- Support matroska - the bestest vapourware project ! http://www.matroska.org
|
|
|
|
Dec 23 2003, 13:35
Post
#22
|
|
|
Group: Banned Posts: 694 Joined: 19-April 02 Member No.: 1820 |
why would anyone put something designed to be changed in the worst spot for changing? "cuz I love id3v2"
|
|
|
|
Dec 23 2003, 15:37
Post
#23
|
|
|
Group: Members Posts: 71 Joined: 24-March 02 Member No.: 1614 |
Metadata isn't "designed to be changed". I write my metadata once on average.
|
|
|
|
Dec 24 2003, 00:56
Post
#24
|
|
|
Group: Banned Posts: 694 Joined: 19-April 02 Member No.: 1820 |
if you say so. heh.
|
|
|
|
Dec 24 2003, 02:43
Post
#25
|
|
![]() Group: Members Posts: 1193 Joined: 3-September 03 From: Bergen, Norway Member No.: 8667 |
QUOTE (eloj @ Dec 23 2003, 06:37 AM) Metadata isn't "designed to be changed". I write my metadata once on average. ...so good to see we have hawkeyed young men who never doubts or falters.... -------------------- "ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
- Oceania Association of Autonomous Astronauts |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 25th May 2013 - 11:24 |