dbry / WavPack

WavPack encode/decode library, command-line programs, and several plugins
BSD 3-Clause "New" or "Revised" License
346 stars 65 forks source link

Handling of ID3v2 tags from DSF files #85

Closed ArminiusTux closed 4 years ago

ArminiusTux commented 4 years ago

The following wavpack CLI option implies to always make use of ID3 tags from DSF (uncompressed DSD) files.

--import-id3            attempt to import ID3v2 tags from the trailer of files
                             (standard on DSF, optional on WAV and DSDIFF)

This is not the case,

General Complete name : C:\Temp\wavpack\remus.dsf Format : DSF Format/Info : Direct Stream Digital Stream File Format version : Version 1 File size : 241 MiB Duration : 1 min 59 s Overall bit rate : 16.9 Mb/s Album : Star Trek Nemesis - Original Soundtrack Recording Album/Performer : Jerry Goldsmith Part/Position : 1 Part/Total : 1 Track name : Remus Track name/Position : 1 Track name/Total : 14 Performer : Jerry Goldsmith Publisher : 2002 Varese Sarabande Genre : Soundtrack Recorded date : 2003-31-01 Copyright : 2002 Varese Sarabande

Audio Format : DSD Format/Info : Direct Stream Digital Commercial name : DSD64 Format settings : Little Duration : 1 min 59 s Bit rate : 16.9 Mb/s Channel(s) : 6 channels Channel layout : L R C Ls Rs LFE Sampling rate : 2 822 kHz Compression mode : Lossless Stream size : 241 MiB (100%)

as this

wavpack -h remus.dsf remus-high.wv

 WAVPACK  Hybrid Lossless Audio Compressor  Win64 Version 5.3.0
 Copyright (c) 1998 - 2020 David Bryant.  All Rights Reserved.

created remus-high.wv in 29.59 secs (lossless, 55.36%)

yields the following:

General Complete name : C:\Temp\wavpack\remus-high.wv Format : WavPack File size : 108 MiB Duration : 7 min 58 s Overall bit rate mode : Variable Overall bit rate : 1 890 kb/s

Audio Format : WavPack Format profile : 4.16 Format settings : Lossless Duration : 7 min 58 s Bit rate mode : Variable Bit rate : 1 890 kb/s Channel(s) : 6 channels Channel layout : L R C LFE Lb Rb Sampling rate : 88.2 kHz Bit depth : 8 bits Compression ratio : 0.747 Stream size : 108 MiB (100%) Encoding settings : -h

and this

wavpack --import-id3 remus.dsf remus-normal.wv

 WAVPACK  Hybrid Lossless Audio Compressor  Win64 Version 5.3.0
 Copyright (c) 1998 - 2020 David Bryant.  All Rights Reserved.

successfully imported 10 items from ID3v2 tag
created remus-normal.wv in 5.16 secs (lossless, 44.67%)

produces this:

General Complete name : C:\Temp\wavpack\remus-normal.wv Format : WavPack File size : 133 MiB Duration : 7 min 58 s Overall bit rate mode : Variable Overall bit rate : 2 342 kb/s Album : Star Trek Nemesis - Original Soundtrack Recording Track name : Remus Track name/Position : 1 Track name/Total : 14 Performer : Jerry Goldsmith Genre : Soundtrack Recorded date : 2003 Copyright : 2002 Varese Sarabande ALBUMARTIST : Jerry Goldsmith PUBLISHER : 2002 Varese Sarabande DISC : 1/1

Audio Format : WavPack Format profile : 4.16 Format settings : Lossless Duration : 7 min 58 s Bit rate mode : Variable Bit rate : 2 342 kb/s Channel(s) : 6 channels Channel layout : L R C LFE Lb Rb Sampling rate : 88.2 kHz Bit depth : 8 bits Compression ratio : 0.602 Stream size : 133 MiB (100%)

In any case the good news is, that the source ID3v2 tags are ALWAYS carried along - assuring a bit-perfect reproduction of the original DSF-file.

dbry commented 4 years ago

Actually that is a little confusing, but is the intended behavior. The comment about ID3v2 tags being standard on DSF is referring to whether or not that is the standard tagging method for that format, not whether or not it's standard behavior for WavPack to attempt to import the tags. If I did that, then I would need a different option to turn it off, which is a little inconsistent.

BTW, if you forget to import the tags, you can do it after the fact with the wvtag utility because, like you say, the ID3v2 is carried along:

wvtag --import-id3 filename.wv

The only thing I don't particularly like about all of this is it means that large album art is duplicated in the WavPack files, but it's still usually pretty small compared to the DSD data (and I generally use relatively small art anyway).

ArminiusTux commented 4 years ago

Ohh well, thank you for the clarification - let's close this issue then.