#3919 closed enhancement (fixed)
FFprobe reports incorrect bit depth for some WavPack files
Reported by: | ahthovaikied | Owned by: | |
---|---|---|---|
Priority: | wish | Component: | ffprobe |
Version: | git-master | Keywords: | wavpack |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
Generate a 24bit wave file (or use any existing one):
$ sox -n -b 24 a.wav synth 30 sine 1k
Encode it with wavpack, default lossless compression:
$ wavpack -q a.wav -o a.wv
Check it's still 24bits:
$ wvunpack -q -ss a.wv file name: a.wv file size: 2700306 bytes source: 24-bit ints at 48000 Hz channels: 1 (mono) duration: 0:00:30.00 modalities: lossless compression: 37.49% ave bitrate: 720 kbps encoder version: 4 file wrapper: 80 byte RIFF header $ soxi a.wv Input File : 'a.wv' Channels : 1 Sample Rate : 48000 Precision : 24-bit Duration : 00:00:30.00 = 1440000 samples ~ 2250 CDDA sectors File Size : 2.70M Bit Rate : 720k Sample Encoding: 24-bit WavPack
FFprobe report:
ffprobe -show_streams a.wv ffprobe version N-66050-g098af26 Copyright (c) 2007-2014 the FFmpeg developers built on Sep 2 2014 22:46:46 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1) configuration: libavutil 54. 7.100 / 54. 7.100 libavcodec 56. 1.100 / 56. 1.100 libavformat 56. 3.100 / 56. 3.100 libavdevice 56. 0.100 / 56. 0.100 libavfilter 5. 0.103 / 5. 0.103 libswscale 3. 0.100 / 3. 0.100 libswresample 1. 1.100 / 1. 1.100 Input #0, wv, from 'a.wv': Duration: 00:00:30.00, start: 0.000000, bitrate: 720 kb/s Stream #0:0: Audio: wavpack, 48000 Hz, mono, '''s32p''' [STREAM] index=0 codec_name=wavpack codec_long_name=WavPack profile=unknown codec_type=audio codec_time_base=1/48000 codec_tag_string=[0][0][0][0] codec_tag=0x0000 sample_fmt=s32p sample_rate=48000 channels=1 channel_layout=mono bits_per_sample=0 id=N/A r_frame_rate=0/0 avg_frame_rate=0/0 time_base=1/48000 start_pts=0 start_time=0.000000 duration_ts=1440000 duration=30.000000 bit_rate=N/A max_bit_rate=N/A nb_frames=N/A nb_read_frames=N/A nb_read_packets=N/A DISPOSITION:default=0 DISPOSITION:dub=0 DISPOSITION:original=0 DISPOSITION:comment=0 DISPOSITION:lyrics=0 DISPOSITION:karaoke=0 DISPOSITION:forced=0 DISPOSITION:hearing_impaired=0 DISPOSITION:visual_impaired=0 DISPOSITION:clean_effects=0 DISPOSITION:attached_pic=0 [/STREAM]
Problematic part is bits_per_sample=0
and sample_fmt=s32p
.
Change History (8)
comment:1 by , 10 years ago
Component: | undetermined → ffprobe |
---|---|
Keywords: | bit depth removed |
Priority: | normal → wish |
Reproduced by developer: | set |
Status: | new → open |
Type: | defect → enhancement |
comment:2 by , 10 years ago
Thanks.
Why differenciate bits_per_sample
and bits_per_raw_sample
though?
follow-up: 4 comment:3 by , 10 years ago
Iirc, bits_per_sample
is codec-specific and mostly meaningful for PCM and ADPCM codecs.
comment:4 by , 10 years ago
Replying to cehoyos:
Iirc,
bits_per_sample
is codec-specific and mostly meaningful for PCM and ADPCM codecs.
So what is the reliable, portable (across formats) way to get audio bits per sample ?
bits_per_sample
is 0 for most filesbits_per_raw_sample
seems correct after applying your patch for the 24bits example, but not always available (ie with a 16bit file)sample_fmt
is unrelated ?
comment:5 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
Should be fixed in 42b4da75
Concerning your question, they are three different things, bits_per_sample
is relevant for PCM codecs, bits_per_raw_sample
is only relevant for codecs that actually compress and sample_fmt
is FFmpeg's internal representation of the decoded data.
follow-up: 7 comment:6 by , 10 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Here is a WavPack sample that has a similar problem with Git-master:
http://www.datafilehost.com/d/4859a6a1
comment:7 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Replying to cgbug:
Here is a WavPack sample that has a similar problem with Git-master:
http://www.datafilehost.com/d/4859a6a1
If you believe you found a bug in FFmpeg, please consider opening a ticket here, including your failing command line, the complete, uncut console output and a short explanation what went wrong.
If you have questions concerning the usage of FFmpeg, please post on the user mailing list.
Please avoid reopening old fixed tickets, unless you believe that the original issue was not fixed.
I don't know / understand what you want to report but it does not seem closely related to this ticket.
comment:8 by , 10 years ago
The sample I posted gives bits_per_sample=0 and (as a result?) it also has a duration of 0.
Patch sent.