From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS6130 216.105.38.0/24 X-Spam-Status: No, score=-3.6 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 8CE371F463 for ; Mon, 16 Dec 2019 17:45:12 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1iguQb-0004Kw-IW; Mon, 16 Dec 2019 17:45:05 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1iguQa-0004Kh-46 for sox-users@lists.sourceforge.net; Mon, 16 Dec 2019 17:45:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version :Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=sZQrom12FT4iw/wa2zIV4gw74axA9oxSUIpPVHuDb9E=; b=YfCOaoXtXoR9hTrpK/cQEccHGr FxxTpyfvqZYm/NuZfApXauPkORiXFnngY6iKY5tjXgJZbk1foSdT04AExldsK710XJZRQ1Tw9tEIS wfotgfyKeLSCJwI+P6P7OOEOXqZ8B9/GzXY5Ika1BzF3UrnHhT1p6uQ7Tb34e1lUj13I=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=sZQrom12FT4iw/wa2zIV4gw74axA9oxSUIpPVHuDb9E=; b=kO7Wtp2+DyTqBnK51MYWMJxbN5 qbEXK80qMorOCQA3bD3QFtaFZGCD6Erzw+VQ3HefkwTW9QP3irBxOPrecGm3OPc0brsbDrueTj6+y UYloT1er3H8+JeYjn7K0qCu4qFZzu/0aW+RPFVa+G/uRTlUFqgCQcVVjh9OyA0EPPpUg=; Received: from unicorn.mansr.com ([81.2.72.234]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1iguQY-006qs8-RW for sox-users@lists.sourceforge.net; Mon, 16 Dec 2019 17:45:04 +0000 Received: by unicorn.mansr.com (Postfix, from userid 51770) id 1EFC41800C; Mon, 16 Dec 2019 17:44:50 +0000 (GMT) From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= To: Martin Ratinaud References: Date: Mon, 16 Dec 2019 17:44:50 +0000 In-Reply-To: (Martin Ratinaud's message of "Mon, 16 Dec 2019 17:36:40 +0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 X-Headers-End: 1iguQY-006qs8-RW Subject: Re: Wav to Mp3 leads to an mp3 file that has a longer duration X-BeenThere: sox-users@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sox-users@lists.sourceforge.net Cc: sox-users@lists.sourceforge.net Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: sox-users-bounces@lists.sourceforge.net Martin Ratinaud writes: > Ok, thanks. > > But would it be possible to > - add silence samples at the end of the wav file so that is is a multiple > of 1152 > - convert it to an mp3 > - and get the exact same number of samples with no change between wav > duration and mp3 duration > > Because I just test with a wav file that is 8640000 samples =3D 7500 * 11= 52 > and when I convert it to an mp3, I get 8641152 samples Apparently the LAME encoder is adding an extra frame for some reason. MP3 is weird like this. If you need the number of samples to be exact, you'll have to switch a more modern codec. -- = M=E5ns Rullg=E5rd _______________________________________________ Sox-users mailing list Sox-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-users