From owner-freebsd-multimedia@FreeBSD.ORG Wed Aug 5 09:51:19 2009 Return-Path: Delivered-To: freebsd-multimedia@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60F4B106564A for ; Wed, 5 Aug 2009 09:51:19 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-ew0-f206.google.com (mail-ew0-f206.google.com [209.85.219.206]) by mx1.freebsd.org (Postfix) with ESMTP id E932C8FC0A for ; Wed, 5 Aug 2009 09:51:18 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: by ewy2 with SMTP id 2so4315743ewy.43 for ; Wed, 05 Aug 2009 02:51:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=xkzrgZ6geaVRnDRwo1qt6yYsRmm96Pu69YJp87EuP+c=; b=LeCfeUH9cfD3DPdKrk8R9PwcNrI8uu+5w/Jwk/jG03t5t9BliLRV5sq91qOU3ZsPsH ab2VEQwWTN85JZ4JSs7qundBHfZhdMeQkSkikl1shfdvI/djw9e6dexfwpLxgIC/9gjT V3e/Y70R6aUbWv+CRCscOLdW7ho0c1KLLDv9M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=OIKB6XQnV+TMvt2cpiavx/DKHdborcutFokPTtyOkn/9pIrTgmyVYPqDtGL9N+GSTN WrLU4KkL5yVZkIhq9ZesoW52ZxcndZBSp2VvkWQKML80StSOBHjs1B/8Z3CsQV+2/a++ jad16BrDSkJVSNhhnh/8g+FKbnc82K21dUkik= MIME-Version: 1.0 Received: by 10.216.72.83 with SMTP id s61mr1642536wed.79.1249465877956; Wed, 05 Aug 2009 02:51:17 -0700 (PDT) Date: Wed, 5 Aug 2009 09:51:17 +0000 Message-ID: From: "b. f." To: freebsd-multimedia@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: Re: mp3 VBR histogram? X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Aug 2009 09:51:19 -0000 >does anyone know anything that can produce the sort of ASCII histogram >that lame produces while encoding in VBR, from an existing .mp3 file? > >I'm interested in analysing the bitrate distribution of frames of a VBR >live stream, though I don't mind saving it to a disk file if necessary. Any application that can sweep through an mp3 and read the frame headers should have code that you can adapt for this purpose, and there are many such pieces of software in Ports (every mp3 decoder, and many utilities). If you want something ready-made, and efficiency isn't of paramount importance, you could use, for example, audio/mp3plot or audio/mp3stat on files. I've dumped frame bitrates of mp3 files before from the command-line using audio/mp3_check and something like: mp3_check -avv sample.mp3 | awk '/BitRate/ { print $2 }' - audio/py-mad, a python interface to audio/libmad, has some example code for reading mp3 streams, and could also be used for this purpose. b.