Opened 6 years ago

Closed 6 years ago

#3047 closed defect (invalid)

bits_per_sample is reporting 0 for FLAC files

Reported by: shensiapoost Owned by:
Priority: normal Component: ffprobe
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug: When I use ffprobe, the bits_per_sample is 0 for every FLAC file that I try. When I open the same files in VLC media player, it properly reports the correct bits_per_sample. Here is where I got one of my example files (it is also attached):
http://download.wavetlan.com/SVV/Media/HTTP/FLAC/ConvertedFiles/BonkEnc/BonkEnc_test4_level3_9m5s_VBR_723kbps_Stereo_44100Hz_16bit.flac

How to reproduce:

ffprobe -v quiet -print_format json -show_format -show_streams BonkEnc_test4_level3_9m5s_VBR_723kbps_Stereo_44100Hz_16bit.flac 
{
    "streams": [
        {
            "index": 0,
            "codec_name": "flac",
            "codec_long_name": "FLAC (Free Lossless Audio Codec)",
            "codec_type": "audio",
            "codec_time_base": "1/44100",
            "codec_tag_string": "[0][0][0][0]",
            "codec_tag": "0x0000",
            "sample_fmt": "s16",
            "sample_rate": "44100",
            "channels": 2,
            "channel_layout": "stereo",
            "bits_per_sample": 0,
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "time_base": "1/44100",
            "duration_ts": 24064128,
            "duration": "545.671837",
            "disposition": {
                "default": 0,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0
            }
        }
    ],
    "format": {
        "filename": "BonkEnc_test4_level3_9m5s_VBR_723kbps_Stereo_44100Hz_16bit.flac",
        "nb_streams": 1,
        "nb_programs": 0,
        "format_name": "flac",
        "format_long_name": "raw FLAC",
        "duration": "545.671837",
        "size": "49332331",
        "bit_rate": "723252",
        "probe_score": 50
    }
}

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Change History (1)

comment:1 Changed 6 years ago by cehoyos

  • Keywords FLAC bits_per_sample removed
  • Resolution set to invalid
  • Status changed from new to closed

Afaict, bits_per_sample is only valid for pcm and closely related codecs. Perhaps sample_fmt is what you are searching for? A flac file (as supported by FFmpeg) can either output s16 or s32 (or s16p or s32p respectively).

Note: See TracTickets for help on using tickets.