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.5 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 994381F464 for ; Wed, 18 Dec 2019 07:43:48 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1ihTzh-0007gK-C7; Wed, 18 Dec 2019 07:43:41 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ihTzg-0007gD-9t for sox-users@lists.sourceforge.net; Wed, 18 Dec 2019 07:43:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Sender:Reply-To:Cc: 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=ZQVXH0jLeGqxMPmnkQDd9wX+DyiyU4xRQrYAlBuVRSM=; b=nTRMAhypqN0DZwIwhD9QU4Nex crjJNJYD73ct/w58BH4C7G4S2K8uRquq4+Xag84kQA/vDWd76ItbeHY7c97YtQQ2k9oqfglW/oZuy 29EeeVsJy5UMFZ4H1cL/IwEEM0fwVRD8LSrfy9Ga4k+40EIOFesaN02K/Ket/aTEzixO8=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Sender:Reply-To:Cc: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=ZQVXH0jLeGqxMPmnkQDd9wX+DyiyU4xRQrYAlBuVRSM=; b=H9DyH0MDvwvt8BDVKETT2UoMQe CCOJxeINDwsednZ8e2sMvnswOHBQ/h6pKzkdmZXYrncSFscr9Uw+etuqURdB8NNECkNTKQt8qyl9z tOCogREofX8OJQm2RiI5OcZaXnZnUNg3hs722j+Se1bKFLuZE7C34iybWSMwY+1wB7QI=; Received: from mail-lj1-f182.google.com ([209.85.208.182]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1ihTze-005GnD-Pq for sox-users@lists.sourceforge.net; Wed, 18 Dec 2019 07:43:40 +0000 Received: by mail-lj1-f182.google.com with SMTP id k8so999007ljh.5 for ; Tue, 17 Dec 2019 23:43:38 -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; bh=ZQVXH0jLeGqxMPmnkQDd9wX+DyiyU4xRQrYAlBuVRSM=; b=YKi8X4ke/f2MyIYgYdmIcDuO1Yc1kl5sulN1zc1okOquiIX68ViuTMwTMpxpB51oQs sdXbyHBsYeLTJGtzdqE/QrlNwmbFR7ULqcJlR6RcD41CbalmtqZo3PWGsOy745gO0mLc 1pGtCJ4FCmrvXHffsM82+6EG5VNgJToN3CUCx1PvtiltWc3pxzDppVkXzS5gGzF/HKzC tOLb+lcnp9GmvwK89LllRF5MNDr8zfLxCAKavrprRphw6xDO/Eb2bm3GK68rEvdflRcQ 655PG0aj0oFHqoQiwf4HlFodXXieuzt2tddkvfQ2LDtImZfKXxftbVMtn4oXTiQRI6s+ TNDw== 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; bh=ZQVXH0jLeGqxMPmnkQDd9wX+DyiyU4xRQrYAlBuVRSM=; b=trLaeVPUKQjMIOeC+g5AUVzFRIDuFEdemMowqI94Kvieds4QwPU0e92M3sKDqtct+X CSbZP67smNG0WxPB6GkS43k3fSR4XEcpBRsa+6XuAfayJSMCQZuX5E44/ogqAqH7N31Y VdA4Foaj5Q2D+6n2Ow9+Czcv25LSVy0nDNZ/wEz9amLc2U+zjFK1t9CsvtiN5eIEl47c 0vbHeKs4EZlsOlmz6K0ijPOo+Am4S7YuiPB/p7XGbV9UEHQr13LJEeYlYnOaNgat0cmq nwNsfIQMM1fUlojOVCRoEUjVhm9479FTzktzR4VlZndHL7qtx0xwUrKLHHnqubfYL7mn ID1w== X-Gm-Message-State: APjAAAW7mY3a/A0erO1YuHr+HfuTJKNtIULKBb6/YluODaY1jRc8eqEH leXJsXmx7BU38nEOT+N6Q0vXUMFEiKg9cDaWO5EEFOq7 X-Google-Smtp-Source: APXvYqyru1JJ3Vw3+XJ0+WoNpt4zRdY1sntOb9WzXPnzHGvRahazsaccozzUbJ+deCzStiAXuxWQ3m7Ao+I3CEppgVk= X-Received: by 2002:a2e:2e14:: with SMTP id u20mr726144lju.120.1576655011635; Tue, 17 Dec 2019 23:43:31 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Mikko Olkkonen Date: Wed, 18 Dec 2019 09:43:20 +0200 Message-ID: To: sox-users@lists.sourceforge.net X-Headers-End: 1ihTze-005GnD-Pq 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 Content-Type: multipart/mixed; boundary="===============0504868250995396379==" Errors-To: sox-users-bounces@lists.sourceforge.net --===============0504868250995396379== Content-Type: multipart/alternative; boundary="000000000000e6e6b10599f599c2" --000000000000e6e6b10599f599c2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable If those are your requirements why dont you just stick to mp3? If your additional requirements would be that 1) audio quality perception remains OK and 2) number of samples remains intact then I believe that solution is nonexisting. You must relax either compression or quality requirement. My reasoning is as follows: you have a lot of samples in the original audio. If you have all those samples (in any reasonable format) in the output file you have large file again i.e. dont have much compression. In other words, if you want compression you must do more drastic processing e.g. transform the signal from "time domain" to "frequency domain" like mp3 does as far as I know. After such compression there is no any meaningful concept of a "sample" anymore. Thus you can not require that number of samples matches. The fact that sox reports number of samples for mp3 does not change this fact (maybe it should not report number of samples but some concept of a block mp3 uses). I believe that additional difficulty (e.g. the discrepancy you observed when you trimmed your signal) arises from aspects discussed in the sox manual section "Accuracy". regards, Mikko On Wed, Dec 18, 2019 at 6:02 AM Martin Ratinaud wrote: > Ok and what would be one that > - compresses the file a lot > - is readable on the web > > Thanks > ----------------------------------------------------------------------- > *Martin RATINAUD* > ----------------------------------------------------------------------- > > > On Tue, Dec 17, 2019 at 2:50 PM M=C3=A5ns Rullg=C3=A5rd = wrote: > >> Martin Ratinaud writes: >> >> > Thanks for the tip! >> > >> > What codec should I use then ? >> >> Depends on your needs. Obviously, you have to use a codec supported by >> whatever is going to read the file. >> >> -- >> M=C3=A5ns Rullg=C3=A5rd >> > _______________________________________________ > Sox-users mailing list > Sox-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sox-users > --000000000000e6e6b10599f599c2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
If those are your requirements why dont you just stic= k to mp3? If your additional requirements would be that 1) audio quality pe= rception remains OK and 2) number of samples remains intact then I believe = that solution is nonexisting. You must relax either compression or quality = requirement. My reasoning is as follows: you have a lot of samples in the o= riginal audio. If you have all those samples (in any reasonable format) in = the output file you have large file again i.e. dont have much compression. = In other words, if you want compression you must do more drastic processing= e.g. transform the signal from "time domain" to "frequency = domain" like mp3 does as far as I know. After such compression there i= s no any meaningful concept of a "sample" anymore. Thus you can n= ot require that number of samples matches. The fact that sox reports number= of samples for mp3 does not change this fact (maybe it should not report n= umber of samples but some concept of a block mp3 uses). I believe that addi= tional difficulty (e.g. the discrepancy you observed when you trimmed your = signal) arises from aspects discussed in the sox manual section "Accur= acy". regards, Mikko

=


Martin Ratinaud <martinratinaud@gmail.com> writes:

> Thanks for the tip!
>
> What codec should I use then ?

Depends on your needs.=C2=A0 Obviously, you have to use a codec supported b= y
whatever is going to read the file.

--
M=C3=A5ns Rullg=C3=A5rd
_______________________________________________
Sox-users mailing list
Sox-us= ers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/s= ox-users
--000000000000e6e6b10599f599c2-- --===============0504868250995396379== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============0504868250995396379== 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 --===============0504868250995396379==--