title
Products            Buy            Support Forum            Professional            About            Codec Central
 

Bug: wav->shn conversion introduces non-canonical header

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Unregistered

    Bug: wav->shn conversion introduces non-canonical header

    wav->shn conversion introduces a non-canonical header. when the same shn is converted back into a wav by dMC, the header becomes canonical again. the problem is that if I encode a wav->shn and send it to a friend that uses a different program to decode it, the result is a wav with a non-canonical header. a non-canonical header can lead to pops between tracks when sound is continuous across the break (and possibly worse, I've heard Macs won't play wavs with non-canonical headers).

    the other software i used is http://www.etree.org/shnutils/shntool/ to tell me when the header is canonical and http://home.att.net/~mkw/mkwact.htm to encode shns.l

    shntool can fix the header while the data is in shn form, and then the other program will decode to a wav with a canonical header. i don't know anything about the internals of the shn codec, but even when a dMC-encoded shn is fixed, its MD5 doesn't match an mkwACT-encoded shn, which may or may not indicate further problems.
  • Spoon
    Administrator
    • Apr 2002
    • 44574

    #2
    Re: Bug: wav->shn conversion introduces non-canonical header

    By Canonical you mean the extra 2 bytes in the Wave header? that is a WAVEFORMATEX rather than WAVEFORMAT?
    Spoon
    www.dbpoweramp.com

    Comment

    • Brent

      • Nov 2009
      • 7

      #3
      wma lossless -> wav conversion introduces non-canonical header

      I have many .wma lossless files tagged to the hilt with covers and text fields. The files that result can play in almost all players, but I have had lots of trouble using them in DVD-Video authoring applications (including Scenarist). When I convert them to .wav I end up with:

      1) non-canonical (as identified by LPEX), refused by LPEX
      2) Accepted but crashes (locks up) when muxing in Scenarist
      3) Format Chunk Length = 40 (as identified by WaveInfo) (untagged is 16 and works in the authoring apps.)
      4) in dbpoweramp is listed as: Album Art, ID Tag[LIST & ID3 & BEXT v0]

      I love that these files have cover art and metadata in apps. like WinAmp, but I need to be able to burn these to DVD-Video to get them to play in a home theather. All these files are 96kHz/24-bit/2.0, BTW.

      An example of such a file can be downloaded for free (ignore BUY implication) from:



      Select the Stereo PCM purple Buy button. It is about 43 MB, so not too bad.

      Hope: I need to know if there is a way to perserve most or all of the metadata and still get these files to burn to DVD-Video.

      I need to know of a good tool (can dbpoweramp do this?) to strip all the headers and make the Format Chunk Length = 16 quickly.

      Currently, the fastest way I have is to convert the file to FLAC and back to WAV with Trader's Little Helper. It is very slow and I have 1000s to do this to.

      Thanks in advance,
      BAC

      Comment

      • Brent

        • Nov 2009
        • 7

        #4
        Re: Bug: wav->shn conversion introduces non-canonical header

        That link is:

        Comment

        • Brent

          • Nov 2009
          • 7

          #5
          Re: Bug: wav->shn conversion introduces non-canonical header

          Hello? Anyone?

          Comment

          • Spoon
            Administrator
            • Apr 2002
            • 44574

            #6
            Re: Bug: wav->shn conversion introduces non-canonical header

            Use the DSP effect ID Tag Processing and delete all Tags when converting.
            Spoon
            www.dbpoweramp.com

            Comment

            • Brent

              • Nov 2009
              • 7

              #7
              Re: Bug: wav->shn conversion introduces non-canonical header

              Thanks Spoon,

              I should have worded my message a little differently.

              Is there anyway to create the headers so there can be tags and album art and have them work in the authoring application? I think the answer is no.

              It is unfortunate. I tried hard to get all this metadata in the files and now it looks like I will have to throw out all that work so they will work with the authoring application.

              I know .wav tags are not well supported, but I didn't think adding them would render the files unusable for many applications.

              Any thoughts? The audiophiles like their audio naked of even WavPak or FLAC compression.

              BAC

              Comment

              • Spoon
                Administrator
                • Apr 2002
                • 44574

                #8
                Re: Bug: wav->shn conversion introduces non-canonical header

                You might have better luck with AIFF which supports the same ID3 chunk, but Apple write it as standard, so might be supported in said authoring app.
                Spoon
                www.dbpoweramp.com

                Comment

                • Brent

                  • Nov 2009
                  • 7

                  #9
                  Re: Bug: wav->shn conversion introduces non-canonical header

                  Thanks Spoon but this does not work. It strips the Tags but leaves it as Riff Fmt = 40. Converting from FLAC to .wav does work and will be OK for me (Riff fmt = 16 now).

                  I am locked into .wavs now (as one of many formats) so will have to be satisfied with no tags. Too bad .wav apps. never matured to support all the tags you can stuff into fmt = 40. Any other thoughts are welcome.

                  Thanks.

                  Comment

                  • Brent

                    • Nov 2009
                    • 7

                    #10
                    Re: Bug: wav->shn conversion introduces non-canonical header

                    Note/Update: I found that if I create the .wavs without strippping the flags from the flac files it generates a fmt =16 file with tags. This is strange since if I do it from the wma file, it generates a fmt =40 file.

                    Comment

                    • Brent

                      • Nov 2009
                      • 7

                      #11
                      Re: Bug: wav->shn conversion introduces non-canonical header

                      Thanks for all your help on this Spoon.

                      It turns out that some players (Linn Sneaky DS) also do not like Format Chunk Length = 40 wave files. (not just authoring apps.)

                      Before I step into it again, do you have comments about my above method I found of creating the Format Chunk Length = 16 files from the FLAC files? It creates a Album Art, ID Tag[LIST & ID3] tagged file. Is this also a bad idea since not many players read this information and the below says it is illegal?

                      I have read:

                      ID3 tags in Wav files are a big no-no (it breaks the container), there is a standard for supporting limited ID tags in waves, not much uses it though.

                      In summary, is it wisest to strip my files of all tags and make sure they are Format Chunk Legnth =16? I'll just have to tell my clients that the .wav format does not support tags well.

                      BAC

                      Comment

                      • Spoon
                        Administrator
                        • Apr 2002
                        • 44574

                        #12
                        Re: Bug: wav->shn conversion introduces non-canonical header

                        A wave file with a 40 byte length header is a Waveformat Extensible, there is a huge amount which cannot support this, in dbpoweramp configuration >> codecs >> advanced you can set dbpoweramp to never write such.

                        Tagging is not an issue (as dbpoweramp puts the tags in a proper chunk, the thread you link to is just about taking an id3 tag on the end of a wave file).

                        If you are streaming with asset upnp you do not need to do anything to the files, in Asset configuration switch streaming to 'wave' and put a check mark next to wave, asset will effectively stream a 16 byte header wave file with no tags to the ds.
                        Spoon
                        www.dbpoweramp.com

                        Comment

                        Working...

                        ]]>