MediaArea / MediaInfoLib

Convenient unified display of the most relevant technical and tag data for video and audio files.
https://mediaarea.net/MediaInfo
BSD 2-Clause "Simplified" License
636 stars 175 forks source link

Incorrect duration reported on wavpack compressed dsd files. #2008

Closed zachjord closed 7 months ago

zachjord commented 5 years ago

Any DSD file that I have compressed with wavpack reports a duration 4 times the actual duration. foobar2000 and mp3tag both report correct durations and I haven't had any issues converting or listening to these files.

Edit: I just checked if it depends on the version of wavpack used to do the compression and so far it seems that way. I haven't gone through my whole library yet, but it looks like this affects wavpack v5 and not v4. v5 and v4 files still report correctly in the cases I mentioned above.

JeromeMartinez commented 5 years ago

Please provide a sample file (a buggy one).

zachjord commented 5 years ago

https://drive.google.com/open?id=1sUuoDa2YtRA6udIWYQwRQivMTi6tk2GK

ArminiusTux commented 4 years ago

Hello,

it is not only about the correct duration - showing the type of audio stream (PCM vs. DSD) within WavPack v5 files would also be a nice addition.

WavPack (v5) DSD file:

General Complete name : C:\Temp\mediainfo\remus.wv Format : WavPack File size : 108 MiB Duration : 7 min 58 s Overall bit rate mode : Variable Overall bit rate : 1 890 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 : 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

Original DSF:

General Complete name : C:\Temp\mediainfo\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%)

The distinction (audio format) could be "WavPack PCM" vs. "WavPack DSD".

Just for comparison, the transcoded PCM (.wav):

General Complete name : C:\Temp\mediainfo\remus-pcm.wav Format : Wave File size : 724 MiB Duration : 1 min 59 s Overall bit rate mode : Constant Overall bit rate : 50.8 Mb/s Album : Star Trek Nemesis - Original Soundtrack Recording Part/Position : 1 Part/Total : 1 Track name : Remus Track name/Position : 1 Track name/Total : 14 Performer : Jerry Goldsmith Director : Jerry Goldsmith Publisher : 2002 Varese Sarabande Genre : Soundtrack Recorded date : 2003 Original source form/Name : Star Trek Nemesis - Original Soundtrack Recording Copyright : 2002 Varese Sarabande ITRK : 1 AlbumArtist : Jerry Goldsmith

Audio Format : PCM Commercial name : DXD Format settings : Little / Signed Codec ID : 00000001-0000-0010-8000-00AA00389B71 Duration : 1 min 59 s Bit rate mode : Constant Bit rate : 50.8 Mb/s Channel(s) : 6 channels Channel layout : L R C LFE Lb Rb Sampling rate : 352.8 kHz Bit depth : 24 bits Stream size : 724 MiB (100%)

and its WavPack (v5) PCM companion:

General Complete name : C:\Temp\mediainfo\remus-pcm.wv Format : WavPack File size : 572 MiB Overall bit rate mode : Variable 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 PUBLISHER : 2002 Varese Sarabande DISC : 1/1 ALBUMARTIST : Jerry Goldsmith

Audio Format : WavPack Format profile : 4.16 Format settings : Lossless Bit rate mode : Variable Channel(s) : 6 channels Channel layout : L R C LFE Lb Rb Bit depth : 24 bits Stream size : 572 MiB (100%) Encoding settings : -h -hh

Regards,

ArminiusTux

1024mb commented 3 years ago

Having the same problem in my end with DSD files.

sergeevabc commented 7 months ago

Sample: YuriKorzunov-ThroughMoonRing.dsf.wv

MediaInfo 24.03 on Windows 7 x64 reports 36 min 36 s, but it's actually 04 m 34 s.

$ mediainfo YuriKorzunov-ThroughMoonRing.dsf.wv

General
Complete name                            : YuriKorzunov-ThroughMoonRing.dsf.wv
Format                                   : WavPack
File size                                : 252 MiB
Duration                                 : 36 min 36 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 962 kb/s

Audio
Format                                   : WavPack
Format profile                           : 4.16
Format settings                          : Lossless
Duration                                 : 36 min 36 s
Bit rate mode                            : Variable
Bit rate                                 : 962 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 88.2 kHz
Bit depth                                : 8 bits
Compression ratio                        : 1.467
Stream size                              : 252 MiB (100%)
Encoding settings                        : -m

$ wvunpack -s YuriKorzunov-ThroughMoonRing.dsf.wv

 WVUNPACK  Hybrid Lossless Audio Decompressor  Win64 Version 5.7.0
 Copyright (c) 1998 - 2024 David Bryant.  All Rights Reserved.

file name:         YuriKorzunov-ThroughMoonRing.dsf.wv
file size:         264114336 bytes
source:            1-bit DSD at 5644800 Hz
channels:          2 (stereo)
duration:          0:04:34.56
modalities:        lossless
compression:       31.83%
ave bitrate:       7696 kbps
encoder version:   5
original md5:      2fb9db74b7bd0a0bcca5fc0bdc6bd41b