1 2 3 4 5
exec('mediainfo --output=XML ' . $file, $xml); array_shift($xml); $xml = implode($xml); $xml = json_decode(json_encode(new SimpleXMLElement($xml)), true); $bitrate = (int)str_replace(' ', '', $xml['File']['track'][0]['Overall_bit_rate']);