From mathiaskunter at yahoo.de Thu Aug 12 06:47:56 2010 From: mathiaskunter at yahoo.de (Mathias Kunter) Date: Thu, 12 Aug 2010 13:47:56 +0000 (GMT) Subject: [ID3 Dev] Unsynchronization for Dummies In-Reply-To: <4C60375E.9010501@mroc.de> References: <1279776875.14942.ezmlm@id3.org> <4C5C4CB1.2000609@mroc.de> <4C5ECE91.8040509@comcast.net> <4C60375E.9010501@mroc.de> Message-ID: <84334.96457.qm@web27005.mail.ukl.yahoo.com> > What confused me was that the spec of 2.4 states that > the frame header includes the size after unsynchronization. Yes, that's correct. The frame size is always meant as "frame size within the source data stream" - otherwise you couldn't skip a frame without decoding it. > So if a tag has unsynchronization > turned off, but the tag turned on, the frame size includes the size > after unsynchronization. I guess you meant "but the FRAME turned on". Well, if a frame has been unsynchronisated, then the frame size *always* is the size after the unsynchronisation. Regarding the unsynchronisation flags: Set the FRAME unsynchronisation flag ONLY if the frame data has been altered by the unsynchronisation. The frame data often isn't changed by the unsynchronisation. Don't set the flag in this case, your tags will be more compatible with other ID3 implementations. Set the TAG unsynchronisation flag ONLY if ALL of your frames have a set unsynchronisation flag. This should happen rarely, at least when using the default ISO-8859-1 text encoding (Unicode BOM's can require unsynchronisation more often, but that's a different story). I hope this helps. Mathias Kunter ________________________________ Von: Matthias Mayrock An: id3v2 at id3.org Gesendet: Montag, den 9. August 2010, 19:14:06 Uhr Betreff: Re: [ID3 Dev] Unsynchronization for Dummies Hi Peter, thank you for your reply. I will follow your advice and try to not write synchronized tags at all. Nevertheless I'll want to support the feature and I think I got it now. What confused me was that the spec of 2.4 states that the frame header includes the size after unsynchronization. If I understand this correctly it is only the case if the whole tag has unsynchronization turned off but a frame turned it on. This would at least make sense to me. So if a tag has unsynchronization turned off, but the tag turned on, the frame size includes the size after unsynchronization. thank you very much and best wishes, matthias mayrock Am 8/8/2010 5:34 PM, schrieb Peter Bennett: > Hi Matthias > > I recommend against writing Unsynchronized frames. Players do not > need them these days, and one version of Windows media player would > not play an mp3 file file if the tag had unsynchronized frames. My > method is to be able to read unsynchronized frames but not to write them. > > Peter Bennett > > On 8/6/2010 1:56 PM, Matthias Mayrock wrote: >> Hi There, >> >> Sorry I ask this dumb question but the unchronization, >> to get it right, when writing v2.0-2.4, works like this: >> >> 1) Write frame data >> 2) Insert unsynchronization zeros into frame data >> 3) Take new frame data length and put into frame header >> >> So the frame header contains the size of frame content >> after inserted zeros, right? >> >> Thanks for any answer and best wishes, >> >> matthias mayrock >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: id3v2-unsubscribe at id3.org >> For additional commands, e-mail: id3v2-help at id3.org >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: id3v2-unsubscribe at id3.org > For additional commands, e-mail: id3v2-help at id3.org > --------------------------------------------------------------------- To unsubscribe, e-mail: id3v2-unsubscribe at id3.org For additional commands, e-mail: id3v2-help at id3.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From mail at mroc.de Mon Aug 9 10:14:06 2010 From: mail at mroc.de (Matthias Mayrock) Date: Mon, 09 Aug 2010 19:14:06 +0200 Subject: [ID3 Dev] Unsynchronization for Dummies In-Reply-To: <4C5ECE91.8040509@comcast.net> References: <1279776875.14942.ezmlm@id3.org> <4C5C4CB1.2000609@mroc.de> <4C5ECE91.8040509@comcast.net> Message-ID: <4C60375E.9010501@mroc.de> Hi Peter, thank you for your reply. I will follow your advice and try to not write synchronized tags at all. Nevertheless I'll want to support the feature and I think I got it now. What confused me was that the spec of 2.4 states that the frame header includes the size after unsynchronization. If I understand this correctly it is only the case if the whole tag has unsynchronization turned off but a frame turned it on. This would at least make sense to me. So if a tag has unsynchronization turned off, but the tag turned on, the frame size includes the size after unsynchronization. thank you very much and best wishes, matthias mayrock Am 8/8/2010 5:34 PM, schrieb Peter Bennett: > Hi Matthias > > I recommend against writing Unsynchronized frames. Players do not > need them these days, and one version of Windows media player would > not play an mp3 file file if the tag had unsynchronized frames. My > method is to be able to read unsynchronized frames but not to write them. > > Peter Bennett > > On 8/6/2010 1:56 PM, Matthias Mayrock wrote: >> Hi There, >> >> Sorry I ask this dumb question but the unchronization, >> to get it right, when writing v2.0-2.4, works like this: >> >> 1) Write frame data >> 2) Insert unsynchronization zeros into frame data >> 3) Take new frame data length and put into frame header >> >> So the frame header contains the size of frame content >> after inserted zeros, right? >> >> Thanks for any answer and best wishes, >> >> matthias mayrock >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: id3v2-unsubscribe at id3.org >> For additional commands, e-mail: id3v2-help at id3.org >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: id3v2-unsubscribe at id3.org > For additional commands, e-mail: id3v2-help at id3.org > --------------------------------------------------------------------- To unsubscribe, e-mail: id3v2-unsubscribe at id3.org For additional commands, e-mail: id3v2-help at id3.org From pgbennett at comcast.net Sun Aug 8 08:34:41 2010 From: pgbennett at comcast.net (Peter Bennett) Date: Sun, 08 Aug 2010 11:34:41 -0400 Subject: [ID3 Dev] Unsynchronization for Dummies In-Reply-To: <4C5C4CB1.2000609@mroc.de> References: <1279776875.14942.ezmlm@id3.org> <4C5C4CB1.2000609@mroc.de> Message-ID: <4C5ECE91.8040509@comcast.net> Hi Matthias I recommend against writing Unsynchronized frames. Players do not need them these days, and one version of Windows media player would not play an mp3 file file if the tag had unsynchronized frames. My method is to be able to read unsynchronized frames but not to write them. Peter Bennett On 8/6/2010 1:56 PM, Matthias Mayrock wrote: > Hi There, > > Sorry I ask this dumb question but the unchronization, > to get it right, when writing v2.0-2.4, works like this: > > 1) Write frame data > 2) Insert unsynchronization zeros into frame data > 3) Take new frame data length and put into frame header > > So the frame header contains the size of frame content > after inserted zeros, right? > > Thanks for any answer and best wishes, > > matthias mayrock > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: id3v2-unsubscribe at id3.org > For additional commands, e-mail: id3v2-help at id3.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: id3v2-unsubscribe at id3.org For additional commands, e-mail: id3v2-help at id3.org From mail at mroc.de Tue Aug 17 13:30:01 2010 From: mail at mroc.de (Matthias Mayrock) Date: Tue, 17 Aug 2010 22:30:01 +0200 Subject: [ID3 Dev] Unsynchronization for Dummies In-Reply-To: <84334.96457.qm@web27005.mail.ukl.yahoo.com> References: <1279776875.14942.ezmlm@id3.org> <4C5C4CB1.2000609@mroc.de> <4C5ECE91.8040509@comcast.net> <4C60375E.9010501@mroc.de> <84334.96457.qm@web27005.mail.ukl.yahoo.com> Message-ID: <4C6AF149.8060005@mroc.de> Hi Mathias, thank for your detailed explanation, it helped alot. It would also have helped if I would have read the http://id3.org/id3v2.4.0-changes before ;-) It states: "Unsynchronisation [S:6.1] is done on frame level, instead of on tag level, making it easier to skip frames, increasing the streamability of the tag." In the end, all made sense. best wishes, matthias mayrock Am 8/12/2010 3:47 PM, schrieb Mathias Kunter: > > What confused me was that the spec of 2.4 states that > > the frame header includes the size after unsynchronization. > > Yes, that's correct. The frame size is always meant as "frame size > within the source data stream" - otherwise you couldn't skip a frame > without decoding it. > > > So if a tag has unsynchronization > > turned off, but the tag turned on, the frame size includes the size > > after unsynchronization. > > I guess you meant "but the FRAME turned on". Well, if a frame has been > unsynchronisated, then the frame size *always* is the size after the > unsynchronisation. > > Regarding the unsynchronisation flags: > > Set the FRAME unsynchronisation flag ONLY if the frame data has been > altered by the unsynchronisation. The frame data often isn't changed > by the unsynchronisation. Don't set the flag in this case, your tags > will be more compatible with other ID3 implementations. > > Set the TAG unsynchronisation flag ONLY if ALL of your frames have a > set unsynchronisation flag. This should happen rarely, at least when > using the default ISO-8859-1 text encoding (Unicode BOM's can require > unsynchronisation more often, but that's a different story). > > I hope this helps. > > Mathias Kunter > > > ------------------------------------------------------------------------ > *Von:* Matthias Mayrock > *An:* id3v2 at id3.org > *Gesendet:* Montag, den 9. August 2010, 19:14:06 Uhr > *Betreff:* Re: [ID3 Dev] Unsynchronization for Dummies > > Hi Peter, > > thank you for your reply. I will follow your advice and try to > not write synchronized tags at all. > > Nevertheless I'll want to support the feature and I think I got > it now. What confused me was that the spec of 2.4 states that > the frame header includes the size after unsynchronization. > > If I understand this correctly it is only the case if the whole tag > has unsynchronization turned off but a frame turned it on. This > would at least make sense to me. So if a tag has unsynchronization > turned off, but the tag turned on, the frame size includes the size > after unsynchronization. > > thank you very much and best wishes, > > matthias mayrock > > > > Am 8/8/2010 5:34 PM, schrieb Peter Bennett: > > Hi Matthias > > > > I recommend against writing Unsynchronized frames. Players do not > > need them these days, and one version of Windows media player would > > not play an mp3 file file if the tag had unsynchronized frames. My > > method is to be able to read unsynchronized frames but not to write > them. > > > > Peter Bennett > > > > On 8/6/2010 1:56 PM, Matthias Mayrock wrote: > >> Hi There, > >> > >> Sorry I ask this dumb question but the unchronization, > >> to get it right, when writing v2.0-2.4, works like this: > >> > >> 1) Write frame data > >> 2) Insert unsynchronization zeros into frame data > >> 3) Take new frame data length and put into frame header > >> > >> So the frame header contains the size of frame content > >> after inserted zeros, right? > >> > >> Thanks for any answer and best wishes, > >> > >> matthias mayrock > >> > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: id3v2-unsubscribe at id3.org > > >> For additional commands, e-mail: id3v2-help at id3.org > > >> > >> > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: id3v2-unsubscribe at id3.org > > > For additional commands, e-mail: id3v2-help at id3.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: id3v2-unsubscribe at id3.org > > For additional commands, e-mail: id3v2-help at id3.org > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mail at mroc.de Fri Aug 6 10:56:01 2010 From: mail at mroc.de (Matthias Mayrock) Date: Fri, 06 Aug 2010 19:56:01 +0200 Subject: [ID3 Dev] Unsynchronization for Dummies In-Reply-To: <1279776875.14942.ezmlm@id3.org> References: <1279776875.14942.ezmlm@id3.org> Message-ID: <4C5C4CB1.2000609@mroc.de> Hi There, Sorry I ask this dumb question but the unchronization, to get it right, when writing v2.0-2.4, works like this: 1) Write frame data 2) Insert unsynchronization zeros into frame data 3) Take new frame data length and put into frame header So the frame header contains the size of frame content after inserted zeros, right? Thanks for any answer and best wishes, matthias mayrock --------------------------------------------------------------------- To unsubscribe, e-mail: id3v2-unsubscribe at id3.org For additional commands, e-mail: id3v2-help at id3.org