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.4 required=3.0 tests=AWL,BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,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 49C591F463 for ; Mon, 16 Dec 2019 12:03:45 +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 1igp64-0005Gy-EG; Mon, 16 Dec 2019 12:03:32 +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 1igp62-0005GX-T5 for sox-users@lists.sourceforge.net; Mon, 16 Dec 2019 12:03:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Sender:Reply-To:Content-Transfer-Encoding :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=iX/EvmhQg4wurf8tFSRIubuNM6jXR6pA2StvsehdSjI=; b=Do/eZ6cnC90dtRt1Y8TA/ItFKV FXA263JYAKE8nZreoSd1Ws35gMdAGl/su4/zGpuLSQlBwGzMfYqXfMf6xo4zlBxp+IPIu7D0YcEXh X3JPDXvBy13Rt6mPJly6/JTodxKCocLACpenma3KVOYKKp6VmMucF9/P6gmZt7OD3IkE=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Sender:Reply-To:Content-Transfer-Encoding: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=iX/EvmhQg4wurf8tFSRIubuNM6jXR6pA2StvsehdSjI=; b=OwLyF7qutr+36BpeHAT4a3JU61 BXYNWs4Fo6Kl0zzz59KKWuxlviEXO0CguTkP0njUsUw1SJPaYjYQFVSsjpMTMWk1JaJXisBqdhQI0 6bt7whyAUsRG9t8rR7fiI9KFO7FdsYXVHf7OIe3YtoQzcGAH6zEUMr2kMzXAVOo6Ix80=; Received: from mail-qk1-f169.google.com ([209.85.222.169]) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1igp61-006kEs-Ai for sox-users@lists.sourceforge.net; Mon, 16 Dec 2019 12:03:30 +0000 Received: by mail-qk1-f169.google.com with SMTP id a203so3948750qkc.3 for ; Mon, 16 Dec 2019 04:03:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iX/EvmhQg4wurf8tFSRIubuNM6jXR6pA2StvsehdSjI=; b=VpXsRJamLbljvyMiVidUM3GK4lGHiELPC99Xk79C1DFKq3h2EC/kb0iTT097TZDhF6 uY2I9UY7EOL8F592dFk27X6gG2Y3z/eFtIVnGhMe/u99tb/o5V/pe0j7Nc/sdByDFBWy 9HV2FfyAA/w8kCV4Wh/vsliXZ3qkrSz3wLDR/UR0+g4y/ZEjG4KsiS2bl0tWOtCU9EH+ 5Jtbs6X3Bsx5XkMspfJHMfPLX/0uOC5ADeQXURmoooc2B1QU/06Js8N9pVGZP3iOFnlX Gee4drNN55Cj/gMyrdlyblVPOZlY1PZDrKACBwi6t9gKHHWPOZXkx5V2od53bJNwzoIv yHgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iX/EvmhQg4wurf8tFSRIubuNM6jXR6pA2StvsehdSjI=; b=SHGdlhQsdeScWCHuOdlDD4saePCmzlqSx7kTSAgLOw9C2l3JmlQE/baBGX1Bguop4G vFRToXptN1mT/+5do2Wb0E7HtC6lPxxlrsnKYMCPsvg6/wZW1x1+QvoE1b4TcJL89AUC eFfvLWvNX+vPDb+QR2F13E4ZQHCwFwQ+AZkrnWGz+HED5zW6vvbRGddxJ6vxFe4crFAA 6shw24xC4vHrWObn36CViOdATds4FIlJtlRv7DLzPOhABAH2YF+Uwde/iGGLKkDqiy8y 41VWjYVttBpdWvJJKCYPrF1YTN5j81qWUnnpefDW69GtVZ0wyVGj12NdRxpV9KjVK4pp f+Ww== X-Gm-Message-State: APjAAAV1ZSvRqDt7RhqaCETgOCreawdhnjqDoENpYTyQSt+fZ4lhoNqs XIRZtEDq8AcYivT0lcwTaiU7elwCVbYvPlr7Ow== X-Google-Smtp-Source: APXvYqyG/QxNqxVWBh6xip1qWwvcMX/V5tg4lVfdwo0h7yK3CwnP8uwR6Af13RswLlH8Q7+vh1IUPahutl0uTDHCypk= X-Received: by 2002:ae9:c011:: with SMTP id u17mr26056346qkk.480.1576497803142; Mon, 16 Dec 2019 04:03:23 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Martin Ratinaud Date: Mon, 16 Dec 2019 16:02:56 +0400 Message-ID: To: =?UTF-8?B?TcOlbnMgUnVsbGfDpXJk?= X-Headers-End: 1igp61-006kEs-Ai 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: multipart/mixed; boundary="===============5261637560118693014==" Errors-To: sox-users-bounces@lists.sourceforge.net --===============5261637560118693014== Content-Type: multipart/alternative; boundary="0000000000008babc30599d0ffc0" --0000000000008babc30599d0ffc0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi M=C3=A5ns and thanks very much Though it seems the resulting file is 7939544 samples and 7939544 / 1152 =3D 6891.965277777777 So it's not a multiple of 1152 unless I'm missing something ? Cheers ----------------------------------------------------------------------- *Martin RATINAUD* ----------------------------------------------------------------------- On Mon, Dec 16, 2019 at 3:48 PM M=C3=A5ns Rullg=C3=A5rd wr= ote: > Martin Ratinaud writes: > > > Hi all, > > > > I'm converting a file called vocals.wav to vocals.mp3 > > vocals.wav > > < > https://drive.google.com/file/d/1he1eCJag1G8iGkgL932jy_mXuLT_khGM/view?us= p=3Ddrive_web > > > > For this I'm using this command > > > > ``` > > sox vocals.wav vocals.mp3 > > ``` > > and here is the result of the corresponding files > > > > - original file > > ``` > > soxi /Users/martin/Downloads/split-test/vocals.wav > > > > Input File : '/Users/martin/Downloads/split-test/vocals.wav' > > Channels : 2 > > Sample Rate : 44100 > > Precision : 16-bit > > Duration : 00:03:00.00 =3D 7938000 samples =3D 13500 CDDA sectors > > File Size : 31.8M > > Bit Rate : 1.41M > > Sample Encoding: 16-bit Signed Integer PCM > > ``` > > > > - converted file > > ``` > > soxi /Users/martin/Downloads/split-test/vocals.mp3 > > > > Input File : '/Users/martin/Downloads/split-test/vocals.mp3' > > Channels : 2 > > Sample Rate : 44100 > > Precision : 16-bit > > Duration : 00:03:00.04 =3D 7939544 samples =3D 13502.6 CDDA secto= rs > > File Size : 2.88M > > Bit Rate : 128k > > Sample Encoding: MPEG audio (layer I, II or III) > > ``` > > > > You can see that the duration is not the same which is weird and the > number > > of samples also changed. > > In fact, 1544 samples have been added to the beginning of the file > > > > If I try to launch `sox -V vocals.mp3 vocals-trimmed.mp3 trim 1544s` it > > does not work > > MP3 files have to have a multiple of 1152 samples. This can't be > avoided. If the input isn't such a multiple, it will be padded by the > encoder. > > -- > M=C3=A5ns Rullg=C3=A5rd > --0000000000008babc30599d0ffc0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi=C2=A0M=C3=A5ns and thanks very much

= Though it seems the resulting file is 7939544 samples

<= div>and 7939544 / 1152 =3D=C2=A06891.965277777777

= So it's not a multiple of 1152 unless I'm missing something ?
=

Cheers

-----------------------------------------------= ------------------------
Martin RATINAUD
--------------------------= ---------------------------------------------

<= /div>
O= n Mon, Dec 16, 2019 at 3:48 PM M=C3=A5ns Rullg=C3=A5rd <mans@mansr.com> wrote:
Martin Ratinaud <martinratinaud@gmail.com> wr= ites:

> Hi all,
>
> I'm converting a file called vocals.wav to vocals.mp3
>=C2=A0 vocals.wav
> <https= ://drive.google.com/file/d/1he1eCJag1G8iGkgL932jy_mXuLT_khGM/view?usp=3Ddri= ve_web>
> For this I'm using this command
>
> ```
> sox vocals.wav vocals.mp3
> ```
> and here is the result of the corresponding files
>
> - original file
> ```
> soxi /Users/martin/Downloads/split-test/vocals.wav
>
> Input File=C2=A0 =C2=A0 =C2=A0: '/Users/martin/Downloads/split-tes= t/vocals.wav'
> Channels=C2=A0 =C2=A0 =C2=A0 =C2=A0: 2
> Sample Rate=C2=A0 =C2=A0 : 44100
> Precision=C2=A0 =C2=A0 =C2=A0 : 16-bit
> Duration=C2=A0 =C2=A0 =C2=A0 =C2=A0: 00:03:00.00 =3D 7938000 samples = =3D 13500 CDDA sectors
> File Size=C2=A0 =C2=A0 =C2=A0 : 31.8M
> Bit Rate=C2=A0 =C2=A0 =C2=A0 =C2=A0: 1.41M
> Sample Encoding: 16-bit Signed Integer PCM
> ```
>
> - converted file
> ```
> soxi /Users/martin/Downloads/split-test/vocals.mp3
>
> Input File=C2=A0 =C2=A0 =C2=A0: '/Users/martin/Downloads/split-tes= t/vocals.mp3'
> Channels=C2=A0 =C2=A0 =C2=A0 =C2=A0: 2
> Sample Rate=C2=A0 =C2=A0 : 44100
> Precision=C2=A0 =C2=A0 =C2=A0 : 16-bit
> Duration=C2=A0 =C2=A0 =C2=A0 =C2=A0: 00:03:00.04 =3D 7939544 samples = =3D 13502.6 CDDA sectors
> File Size=C2=A0 =C2=A0 =C2=A0 : 2.88M
> Bit Rate=C2=A0 =C2=A0 =C2=A0 =C2=A0: 128k
> Sample Encoding: MPEG audio (layer I, II or III)
> ```
>
> You can see that the duration is not the same which is weird and the n= umber
> of samples also changed.
> In fact, 1544 samples have been added to the beginning of the file
>
> If I try to launch `sox -V vocals.mp3 vocals-trimmed.mp3 trim 1544s` i= t
> does not work

MP3 files have to have a multiple of 1152 samples.=C2=A0 This can't be<= br> avoided.=C2=A0 If the input isn't such a multiple, it will be padded by= the
encoder.

--
M=C3=A5ns Rullg=C3=A5rd
--0000000000008babc30599d0ffc0-- --===============5261637560118693014== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============5261637560118693014== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Sox-users mailing list Sox-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-users --===============5261637560118693014==--