[FFmpeg-user] Impossible to get the bit depth value of an audio-file with ffprobe

Paul B Mahol onemda at gmail.com
Wed Aug 5 23:36:31 EEST 2020


On 8/5/20, scrutinizer <iljashebalin2 at gmail.com> wrote:
> To add more practical usage examples where bits_per_sample is useless.
> Here’s an APE file on which MediaInfo reports 24 bit depth. And here’s the
> output of the ffprobe:
>
> '/Users/Me/Music/For Batch Conversion/Judas Priest - Stained Class -
> 1978.Ape':
>   Duration: 00:43:21.00, Start: 0.000000, Bitrate: 3039 Kb/S
>     Stream #0:0: Audio: Ape (Ape  / 0X20455041), 96000 Hz, Stereo, S32P
> Bits_Per_Sample=0
> Bits_Per_Raw_Sample=N/A
>
> Bits per sample is 0? It’s not. Any form of the ffprobe command - be it
> show_streams, select_stream, show_formats - returns the identically
> incorrect result.

This is obvious bug, bits_per_raw_sample should report 24.

>
>> On 5 Aug 2020, at 20:18, scrutinizer <iljashebalin2 at gmail.com> wrote:
>>
>> If the option in question indeed is available then it’s undocumented. The
>> ffprobe help reveals the following usage:
>>
>> Global options (affect whole program instead of just one file):
>> -loglevel loglevel  set logging level
>> -v loglevel         set logging level
>> -report             generate a report
>> -max_alloc bytes    set maximum size of a single allocated block
>> -y                  overwrite output files
>> -n                  never overwrite output files
>> -ignore_unknown     Ignore unknown stream types
>> -filter_threads     number of non-complex filter threads
>> -filter_complex_threads  number of threads for -filter_complex
>> -stats              print progress report during encoding
>> -max_error_rate maximum error rate  ratio of errors (0.0: no errors, 1.0:
>> 100% errors) above which ffmpeg returns an error instead of success.
>> -bits_per_raw_sample number  set the number of bits per raw sample
>> -vol volume         change audio volume (256=normal)
>>
>>
>> There’s bits_per_raw_sample but no bits_per_sample. And the same is true
>> for the video options - no bits_per_sample.
>>
>>> On 5 Aug 2020, at 12:08, Paul Blakeman via ffmpeg-user
>>> <ffmpeg-user at ffmpeg.org <mailto:ffmpeg-user at ffmpeg.org>> wrote:
>>>
>>>
>>>
>>> Input #0, wav, from 'Lee.wav':
>>>  Metadata:
>>>    encoded_by      : Pro Tools
>>>    originator_reference: 7iGQ3S9p7mlaaaGk
>>>    date            : 2020-07-23
>>>    creation_time   : 14:05:55
>>>    time_reference  : 158865370
>>>  Duration: 00:04:15.83, bitrate: 1422 kb/s
>>>    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2
>>> channels, s16, 1411 kb/s
>>> bits_per_sample=16
>>> bits_per_raw_sample=N/A
>>>
>>>
>>> When I try on an audio file created with ProTools
>>>
>>> ffprobe -show_streams -show_format Lee.wav | grep bits
>>>
>>> On an audio file “bits_per_sample” is what you are after
>>>
>>>
>>>> On 5 Aug 2020, at 08:41, Paul B Mahol <onemda at gmail.com
>>>> <mailto:onemda at gmail.com>> wrote:
>>>>
>>>> On 8/5/20, scrutinizer <iljashebalin2 at gmail.com
>>>> <mailto:iljashebalin2 at gmail.com>> wrote:
>>>>> The file is AIFF, 24bit/96kHz. I want to get the “24bit” part (or
>>>>> simply
>>>>> “24").
>>>>
>>>> See bits per raw sample field.
>>>>
>>>>>
>>>>>> On 5 Aug 2020, at 03:39, Carl Eugen Hoyos <ceffmpeg at gmail.com
>>>>>> <mailto:ceffmpeg at gmail.com>> wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Am 04.08.2020 um 16:56 schrieb scrutinizer <iljashebalin2 at gmail.com
>>>>>>> <mailto:iljashebalin2 at gmail.com>>:
>>>>>>>
>>>>>>> is it possible to retrieve the bit depth value of an audio-file
>>>>>>
>>>>>> Depends on the file.
>>>>>>
>>>>>> Carl Eugen
>>>>>> _______________________________________________
>>>>>> ffmpeg-user mailing list
>>>>>> ffmpeg-user at ffmpeg.org <mailto:ffmpeg-user at ffmpeg.org>
>>>>>> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>>>>>
>>>>>> To unsubscribe, visit link above, or email
>>>>>> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>>>>>
>>>>> _______________________________________________
>>>>> ffmpeg-user mailing list
>>>>> ffmpeg-user at ffmpeg.org <mailto:ffmpeg-user at ffmpeg.org>
>>>>> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>>>>
>>>>> To unsubscribe, visit link above, or email
>>>>> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>>>> _______________________________________________
>>>> ffmpeg-user mailing list
>>>> ffmpeg-user at ffmpeg.org <mailto:ffmpeg-user at ffmpeg.org>
>>>> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>>>
>>>> To unsubscribe, visit link above, or email
>>>> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>>>
>>> _______________________________________________
>>> ffmpeg-user mailing list
>>> ffmpeg-user at ffmpeg.org <mailto:ffmpeg-user at ffmpeg.org>
>>> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>>
>>> To unsubscribe, visit link above, or email
>>> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>>
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list