Welcome Guest, please login or register.

AudioBook Bay Forum » Help » How-to Guides » Work out bitrate

Pages: [1]   Go Down
  Print  
Author Topic: Work out bitrate  (Read 1069 times)
Gweilo
Global Moderator
Legendary Member
******
Offline Offline

Posts: 6997



View Profile
« on: May 16, 2019, 12:24:58 AM »

For most audio files, the correct bitrate is in the file header, and various utilities can just read and give you that info.

e.g. MediaInfo
But some files have none or incorrect info.

e.g. one has
Code:
Complete name : G:\Torrents\x\x.mp3  Format : MPEG Audio 
Format : MPEG Audio  File size : 127 MiB
File size : 127 MiB  Overall bit rate mode : Variable
Overall bit rate mode : Variable
-- i.e., no duration or bitrate.

You can fix that, e.g. for MP3s by just opening and resaving the file using MP3DirectCut, which rewrites the header correctly but does not reencode the audio.

Now MediaInfo says:
Code:
Complete name : G:\Torrents\x\x2.mp3  Format : MPEG Audio 
Format : MPEG Audio  File size : 127 MiB
File size : 127 MiB  Duration : 6h 9mn
Duration : 6h 9mn  Overall bit rate mode : Constant
Overall bit rate mode : Constant  Overall bit rate : 48.0 Kbps


Or you can calculate it from 1st principles:
bitrate == number of bits per second.

b=F*8/t

b = bitrate in kb/sec
F = filesize in bytes (8 bits = 1 byte, thus the 8)
t = duration in seconds.

The file above is 132,926,231 bytes
duration is 6h9min = 369*60 sec  (you can read the time from audioplayers like e.g. VLC)
so b = 48031 = 48kbps
« Last Edit: May 16, 2019, 01:44:57 AM by Gweilo » Logged
Pages: [1]   Go Up
  Print  
 
Jump to: