Skip to content

Commit

Permalink
Get the correct bit depth on FLAC (simon-r#23)
Browse files Browse the repository at this point in the history
Recent ffprobe give the correct bit depth on 24 bit FLAC:
  Stream #0:0: Audio: flac, 192000 Hz, stereo, s32 (24 bit)
  • Loading branch information
drizzt committed Apr 25, 2020
1 parent c190963 commit e78b6dd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dr14tmeter/read_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,11 +362,15 @@ def __read_stream_info(self, data_txt, track):
track['channel'] = re.search(
"^\s*([\S][\s|\S]*[\S])\s*$", fmt[2], re_flags).group(1)

m = re.search("(\d+)", fmt[3], re_flags)
m = re.search("\((\d+) bit\)", fmt[3], re_flags)
if m != None:
track['bit'] = m.group(1)
else:
track['bit'] = "16"
m = re.search("(\d+)", fmt[3], re_flags)
if m != None:
track['bit'] = m.group(1)
else:
track['bit'] = "16"

def album_len(self):
return len(self._tracks)
Expand Down

0 comments on commit e78b6dd

Please sign in to comment.