Re: error in files after removing padding

Martijn van Beurden <[email protected]> Mon, 19 May 2014 16:06:11 +0200
Newsgroups gmane.comp.audio.compression.flac.user
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============0351596255==
Content-Type: multipart/alternative;
 boundary="------------010304020206010202020906"

This is a multi-part message in MIME format.
--------------010304020206010202020906
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Oh, I forgot to tell (but you probably had that figured out 
anyway) that those 2 steps were for a file that you didn't strip 
of padding before.

Would it be possible you send me a part of a file that is 
affected? I'd like to know what happened, so this can be fixed. 
I presume the FLAC__STREAM_DECODER_END_OF_STREAM errors occur 
right after the album art? In that case, if the files are too 
big and you are using linux you could use head -c 500kB 
input.flac > input-first500kb.flac I don't know any equivalent 
methods on other operating systems. If the included album art is 
bigger than 500kb, you might want to change the numbers accordingly.

op 19-05-14 15:56, Scott Brown schreef:
> Thanks for the help Martijn,
>
> I get the same FLAC__STREAM_DECODER_END_OF_STREAM error 
> after doing the 2 steps you suggested.
>
> Scott
>
>
> On Mon, May 19, 2014 at 9:36 AM, Martijn van Beurden 
> <[email protected] <mailto:[email protected]>> wrote:
>
>     Once more hi,
>
>     I've tried to reproduce this issue, but I am unable to do
>     so. Could you try to re-encode the file with FLAC (to make
>     sure it is not an issue with Taglib) and try to strip with
>     metaflac again? This can be done as follows
>
>     flac input.flac -o output.flac
>     metaflac --dont-use-padding --remove --block-type=PADDING
>     output.flac
>
>     If this turns out to be fine it probably solves your
>     problem, but still I would be interested in a file to
>     check whether Taglib produces non-compliant files or
>     metaflac doesn't accept all valid input. If it turns out
>     that metaflac doesn't like this either, there is something
>     rather weird going on.
>
>
>     op 19-05-14 15:21, Scott Brown schreef:
>>     ERROR while decoding data
>>                         state =
>>     FLAC__STREAM_DECODER_END_OF_STREAM
>>
>>     It's happening with every file that I've tried now, using
>>     both 1.2.1 and 1.3.0.
>>
>>     If a file has artwork and I remove padding, I get the
>>     above error when verifying or decompressing. If no
>>     artwork and I remove padding, the file verifies and
>>     decompresses with no issues.
>>
>>     I'm writing tags via Taglib's file.save() but removing
>>     padding via metaflac.
>>
>>     Thanks,
>>     Scott
>>
>>
>>     On Mon, May 19, 2014 at 9:16 AM, Martijn van Beurden
>>     <[email protected] <mailto:[email protected]>> wrote:
>>
>>         Hi Scott,
>>
>>         Can you be a little more specific? What error do you
>>         get? I'm unable to reproduce this error currently, do
>>         you have any files you can share that are
>>         problematic? What version of metaflac are you using?
>>
>>         It might be a bug, it might be corruption induced by
>>         some other part of the system.
>>
>>         op 19-05-14 15:04, Scott Brown schreef:
>>>         I want to remove padding from flac files, so I ran
>>>         the following command on files with artwork in them:
>>>
>>>         metaflac --dont-use-padding --remove
>>>         --block-type=PADDING [filename]
>>>
>>>
>>>         but now my files are corrupt. Verifying them reports
>>>         a stream error and they won't decode.
>>>
>>>         If the files had no picture data in them, the remove
>>>         padding command did not corrupt them.
>>>
>>>         Is this a bug, or did I run something bad with metaflac?
>>>
>>>         Thanks,
>>>         Scott
>>>
>>>
>>>         _______________________________________________
>>>         Flac mailing list
>>>         [email protected]  <mailto:[email protected]>
>>>         http://lists.xiph.org/mailman/listinfo/flac
>>
>>
>>         _______________________________________________
>>         Flac mailing list
>>         [email protected] <mailto:[email protected]>
>>         http://lists.xiph.org/mailman/listinfo/flac
>>
>>
>
>
>     _______________________________________________
>     Flac mailing list
>     [email protected] <mailto:[email protected]>
>     http://lists.xiph.org/mailman/listinfo/flac
>
>


--------------010304020206010202020906
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html>
  <head>
    <meta content=3D"text/html; charset=3DUTF-8" http-equiv=3D"Content-Ty=
pe">
  </head>
  <body bgcolor=3D"#FFFFFF" text=3D"#000000">
    Oh, I forgot to tell (but you probably had that figured out anyway)
    that those 2 steps were for a file that you didn't strip of padding
    before.<br>
    <br>
    Would it be possible you send me a part of a file that is affected?
    I'd like to know what happened, so this can be fixed. I presume the
    FLAC__STREAM_DECODER_END_OF_STREAM errors occur right after the
    album art? In that case, if the files are too big and you are using
    linux you could use head -c 500kB input.flac &gt;
    input-first500kb.flac I don't know any equivalent methods on other
    operating systems. If the included album art is bigger than 500kb,
    you might want to change the numbers accordingly.<br>
    <br>
    <div class=3D"moz-cite-prefix">op 19-05-14 15:56, Scott Brown schreef=
:<br>
    </div>
    <blockquote
cite=3D"mid:[email protected]=
l.com"
      type=3D"cite">
      <div dir=3D"ltr">Thanks for the help Martijn,
        <div><br>
        </div>
        <div>I get the same=C2=A0<span
            style=3D"font-family:arial,sans-serif;font-size:13px">FLAC__S=
TREAM_DECODER_END_OF_</span><font
            face=3D"arial, sans-serif">STREAM error after=C2=A0doing the =
2
            steps you suggested.</font><br>
        </div>
        <div><font face=3D"arial, sans-serif"><br>
          </font></div>
        <div><font face=3D"arial, sans-serif">Scott</font></div>
      </div>
      <div class=3D"gmail_extra"><br>
        <br>
        <div class=3D"gmail_quote">On Mon, May 19, 2014 at 9:36 AM,
          Martijn van Beurden <span dir=3D"ltr">&lt;<a
              moz-do-not-send=3D"true" href=3D"mailto:[email protected]"
              target=3D"_blank">[email protected]</a>&gt;</span> wrote:<br=
>
          <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor=3D"#FFFFFF" text=3D"#000000"> Once more hi,<br>
              <br>
              I've tried to reproduce this issue, but I am unable to do
              so. Could you try to re-encode the file with FLAC (to make
              sure it is not an issue with Taglib) and try to strip with
              metaflac again? This can be done as follows<br>
              <br>
              flac input.flac -o output.flac<br>
              metaflac --dont-use-padding --remove --block-type=3DPADDING
              output.flac<br>
              <br>
              If this turns out to be fine it probably solves your
              problem, but still I would be interested in a file to
              check whether Taglib produces non-compliant files or
              metaflac doesn't accept all valid input. If it turns out
              that metaflac doesn't like this either, there is something
              rather weird going on.<br>
              <br>
              <br>
              <div>op 19-05-14 15:21, Scott Brown schreef:<br>
              </div>
              <div>
                <div class=3D"h5">
                  <blockquote type=3D"cite">
                    <div dir=3D"ltr">
                      <div>ERROR while decoding data</div>
                      <div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 state =3D
                        FLAC__STREAM_DECODER_END_OF_STREAM</div>
                      <div><br>
                      </div>
                      <div>It's happening with every file that I've
                        tried now, using both 1.2.1 and 1.3.0.</div>
                      <div><br>
                      </div>
                      <div>If a file has artwork and I remove padding, I
                        get the above error when verifying or
                        decompressing. If no artwork and I remove
                        padding, the file verifies and decompresses with
                        no issues.</div>
                      <div><br>
                      </div>
                      <div>I'm writing tags via Taglib's file.save() but
                        removing padding via metaflac.</div>
                      <div><br>
                      </div>
                      <div>Thanks,</div>
                      <div>Scott</div>
                      <div class=3D"gmail_extra"><br>
                        <br>
                        <div class=3D"gmail_quote">On Mon, May 19, 2014 a=
t
                          9:16 AM, Martijn van Beurden <span dir=3D"ltr">=
&lt;<a
                              moz-do-not-send=3D"true"
                              href=3D"mailto:[email protected]"
                              target=3D"_blank">[email protected]</a>&gt;<=
/span>
                          wrote:<br>
                          <blockquote class=3D"gmail_quote"
                            style=3D"margin:0 0 0 .8ex;border-left:1px
                            #ccc solid;padding-left:1ex">
                            <div bgcolor=3D"#FFFFFF" text=3D"#000000"> Hi
                              Scott,<br>
                              <br>
                              Can you be a little more specific? What
                              error do you get? I'm unable to reproduce
                              this error currently, do you have any
                              files you can share that are problematic?
                              What version of metaflac are you using?<br>
                              <br>
                              It might be a bug, it might be corruption
                              induced by some other part of the system.<b=
r>
                              <br>
                              <div>op 19-05-14 15:04, Scott Brown
                                schreef:<br>
                              </div>
                              <blockquote type=3D"cite">
                                <div>
                                  <div>
                                    <div dir=3D"ltr">I want to remove
                                      padding from flac files, so I ran
                                      the following command on files
                                      with artwork in them:
                                      <div><br>
                                      </div>
                                      <div>metaflac=C2=A0<span
                                          style=3D"color:rgb(209,47,27);f=
ont-family:Menlo;font-size:11px">--dont-use-padding=C2=A0</span><span
style=3D"color:rgb(209,47,27);font-family:Menlo;font-size:11px">--remove=C2=
=A0</span><span
style=3D"color:rgb(209,47,27);font-family:Menlo;font-size:11px">--block-t=
ype=3DPADDING


                                          [filename]</span></div>
                                      <div>
                                        <p
                                          style=3D"margin:0px;font-size:1=
1px;font-family:Menlo;color:rgb(61,29,129)"><br>
                                        </p>
                                        <p
                                          style=3D"margin:0px;font-size:1=
1px;font-family:Menlo;color:rgb(61,29,129)"><span
                                            style=3D"color:rgb(0,0,0)"></=
span></p>
                                      </div>
                                      <div>but now my files are corrupt.
                                        Verifying them reports a stream
                                        error and they won't decode.</div=
>
                                      <div><br>
                                      </div>
                                      <div>If the files had no picture
                                        data in them, the remove padding
                                        command did not corrupt them.</di=
v>
                                      <div><br>
                                      </div>
                                      <div>Is this a bug, or did I run
                                        something bad with metaflac?</div=
>
                                      <div><br>
                                      </div>
                                      <div>Thanks,</div>
                                      <div>Scott</div>
                                    </div>
                                    <br>
                                    <fieldset></fieldset>
                                    <br>
                                  </div>
                                </div>
                                <pre>____________________________________=
___________
Flac mailing list
<a moz-do-not-send=3D"true" href=3D"mailto:[email protected]" target=3D"_blan=
k">[email protected]</a>
<a moz-do-not-send=3D"true" href=3D"http://lists.xiph.org/mailman/listinf=
o/flac" target=3D"_blank">http://lists.xiph.org/mailman/listinfo/flac</a>
</pre>
                              </blockquote>
                              <br>
                            </div>
                            <br>
_______________________________________________<br>
                            Flac mailing list<br>
                            <a moz-do-not-send=3D"true"
                              href=3D"mailto:[email protected]"
                              target=3D"_blank">[email protected]</a><br>
                            <a moz-do-not-send=3D"true"
                              href=3D"http://lists.xiph.org/mailman/listi=
nfo/flac"
                              target=3D"_blank">http://lists.xiph.org/mai=
lman/listinfo/flac</a><br>
                            <br>
                          </blockquote>
                        </div>
                        <br>
                      </div>
                    </div>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
            <br>
            _______________________________________________<br>
            Flac mailing list<br>
            <a moz-do-not-send=3D"true" href=3D"mailto:[email protected]">Fla=
[email protected]</a><br>
            <a moz-do-not-send=3D"true"
              href=3D"http://lists.xiph.org/mailman/listinfo/flac"
              target=3D"_blank">http://lists.xiph.org/mailman/listinfo/fl=
ac</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>

--------------010304020206010202020906--

--===============0351596255==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Flac mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/flac

--===============0351596255==--