I originally asked how to find the compression ratio using the basic flac tools because that is all I was aware might be effective for finding that information, even though I failed to determine how. I have no special affinity for those tools, however, so if ffmpeg has this functionality, then it helps greatly to say how to use it for that purpose in addition to saying simply that it can be used.
If you have ffmpeg installed you will probably have ffprobe.
Then with
ffprobe YourInputFileHere -hide_banner
you'll get something like
Input #0, flac, from 'q:\temp\temp.flac':
Duration: 00:04:16.22, start: 0.000000, bitrate: 939 kb/s
Stream #0:0: Audio: flac, 44100 Hz, stereo, s16
You can parse that anyway you want or if it's easier:
>ffprobe "q:\temp\temp.flac" -hide_banner -show_streams
you'll get
Input #0, flac, from 'q:\temp\temp.flac':
Duration: 00:04:16.22, start: 0.000000, bitrate: 939 kb/s
Stream #0:0: Audio: flac, 44100 Hz, stereo, s16
[STREAM]
index=0
codec_name=flac
codec_long_name=FLAC (Free Lossless Audio Codec)
profile=unknown
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
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/44100
start_pts=0
start_time=0.000000
duration_ts=11299439
duration=256.223107
bit_rate=N/A
max_bit_rate=N/A
bits_per_raw_sample=16
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
DISPOSITION:timed_thumbnails=0
[/STREAM]
You can even change the output format with e.g. -print_format json (available formats: default, compact, csv, flat, ini, json, xml).
If you know exactly what values you want you could use something like:
ffprobe -v error "q:\temp\temp.flac" -show_entries stream=duration:stream=channels:stream=sample_rate:stream=sample_fmt -of default=noprint_wrappers=1:nokey=1
that will give you just
s16
44100
2
256.223107