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 04D601F463 for ; Thu, 12 Dec 2019 17:05:49 +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 1ifRuG-0006Kk-Da; Thu, 12 Dec 2019 17:05:40 +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 1ifRuC-0006KX-T3 for sox-users@lists.sourceforge.net; Thu, 12 Dec 2019 17:05:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Message-ID:References:In-Reply-To:Subject:To:From: Date:Content-Transfer-Encoding:Content-Type:MIME-Version:Sender:Reply-To:Cc: 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=LMQEzFD2/MBlKJjjT1TrwfAcwn4M9LDO9kEx1LlVOsA=; b=kNHaSOEwTYqnKV+vWkaYGY1vnw feTiaQaSl9T8Pip9wbA4UQSnwhE6LdHV5ccqsQ4VqBliso26YqW8TruDF9q65sKwAnLQ/MM6WN00x nZub+724CLzuc/SIkjKY1aYHouWYVf/kADjxIVjK+et0lrHN8seS0Et2BXkLFbGxcn0E=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Message-ID:References:In-Reply-To:Subject:To:From:Date: Content-Transfer-Encoding:Content-Type:MIME-Version:Sender:Reply-To:Cc: 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=LMQEzFD2/MBlKJjjT1TrwfAcwn4M9LDO9kEx1LlVOsA=; b=mEeNmj/7MRU9B9Q2M8cvBEE7ja p7FyOg1BRLw30I4o7fa7EmnP3akUqexDhuQIq5SfL0V0IEtoaroldihXpT5XsONEapVYwhm6qPNLE uh08qiRRn2sGNzuIVsNUxjXKF/o9/U874TEftR0RvkC+W/DdBWD0zeDZrkmZ3lKLoSjM=; Received: from b-painless.mh.aa.net.uk ([81.187.30.52]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1ifRuA-002tGI-Mx for sox-users@lists.sourceforge.net; Thu, 12 Dec 2019 17:05:36 +0000 Received: from webmailtest.aa.net.uk ([2001:8b0:0:30::66]) by b-painless.mh.aa.net.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ifRu4-0004K3-D4 for sox-users@lists.sourceforge.net; Thu, 12 Dec 2019 17:05:28 +0000 Received: from cpc132346-sgyl43-2-0-cust166.know.cable.virginm.net ([82.42.23.167]) by webmailtest.aa.net.uk with HTTP (HTTP/1.1 POST); Thu, 12 Dec 2019 17:05:19 +0000 MIME-Version: 1.0 Date: Thu, 12 Dec 2019 17:05:19 +0000 From: Jeremy Nicoll - ml sox users To: sox-users@lists.sourceforge.net In-Reply-To: References: <6b2ed34b929889fb655800973e7e030e@wingsandbeaks.org.uk> Message-ID: X-Sender: jn.ml.sxu.88@wingsandbeaks.org.uk User-Agent: Roundcube Webmail/1.3.8 X-Headers-End: 1ifRuA-002tGI-Mx 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: sox-users-bounces@lists.sourceforge.net On 2019-12-12 04:18, Martin Ratinaud wrote: > Hi Jeremy and thanks for the quick answer (and sorry for the not very > precise report) OK. First, I'm not sure if anything I say will help; I can't search for bugs inside sox, and I cannot repair them. But I asked for those details because other more-knowledgeable people might also have wanted to know. Next, I use sox on Windows 8.1; I was never able to make any of its mp3 actions work. It would always complain that there were missing DLLs. (I was using pre-built binaries.) I tried asking about that here, but no-one helped. I tried placing DLLs in the folder in which I have sox.exe and also in folders in PATH, and none of those solved the problem. If your sox needs to call lame (or use lame-enc.dlls) I wonder if there is any way you can identify if the right dlls are being found? Eventually I worked around it by installing lame.exe and its DLLs. I then did all the initial manipulation of my recordings - .wav files - in sox (which seemed to work) then explicitly called lame.exe to generate .mp3 files from it. I did all of that from scripts; none of the scripts ever eg issued sox ... or lame ... but instead always issued "C:\path\tothe\versionofsox\sox.exe" ... and "C:\path\tothe\versionoflame\lame.exe" ... so I was always certain which .exe files wre being used. (And in future would be able to try newer versions of sox and compare them.) I also prefer to issue commands with defaults explicitly specified, so that I knew where the processing parameters I wanted had come from. In my mp3 conversions, my scripts typically issued commands like "C:\Dropbox\Programs--ALL-\~open-source lame 64b-V3-99-5\lame.exe" --cbr -b 128 -q 0 --verbose --id3v2-only --ta "Name of choir" --tl "Name of album" --tg Classical --ty 2015 --tt "Track name" --tn 11 "C:\Dropbox\....\20150615_S_11_xyz.wav" "C:\Users\....\Album\MP3s-128\20150615_S_11_xyz.mp3" (where all of that was on one long line, but it's spread out here so you can see each element). I still think it's possible that you're not executing the command you think you are. I don't now anything about Macs though. If SOX_OPTS is null, are there any other mechanisms that might be interfering? Eg when you issue sox could that be aliased to something else that codes some defaults? Also, your sox --version should have produced a result that told you the version number, but apparently doesn't. I wonder if the build is broken somehow. Here, I get C:\>"C:\Dropbox\Programs--ALL-\~open-source sox V14-4-2\sox.exe" --version C:\Dropbox\Programs--ALL-\~open-source sox V14-4-2\sox.exe: SoX v14.4.2 ... and note it shows "SoX v14.4.2". I also wondered if the "soxi" you are executing really is the same executable as your "sox"? They are meant to be copies of the same file, with different names... Have you tried the command on other files? Does converting a .wav to .mp3 always produce a longer file, or only sometimes, or only with one file? In several instances you show commands where the input file is described as 16-bit, but the output as 24-bit... and then soxi says the created file is really 16-bit. I wonder if the info message that describes an output file as 24-bit is really just telling you what you've asked for, rather than what will be generated? (Or, sox is internally processsing the input file to create a 24-bit one, and only at the final stage when lame gets involved does the resolution drop?) I am puzzled by the statement that sox is using mp3 encoding defaults sox INFO mp3: using MP3 encoding defaults because I couldn't find anything in the sox documentation that says what they are. Maybe those are lame defaults? But that precedes the info that it's creating a 24-bit output file which suggests that "24 bit output" is defined somewhere as a default. I wonder where? It's also odd that if sox really was trying to produce a 24-bit output file it doesn't produce the warning that you got later. That is, when you had sox -V3 vocals.wav -b 24 vocals-V3.mp3 it produced a WARN message saying sox WARN formats: mp3 can't encode to 24-bit but on your earlier calls of sox, with no -V parameter, sox is meant to have defaulted to -V2 and produced errors and warnings. So either it really was trying to produce 24-bit audio on the earlier uses, but didn't produce the WARN message even though it is meant to, or earlier it wasn't trying to produce 24-bit files (so there was no warning) even though it said it was... With your trim attempt, I have no idea why it didn't work. Your description is wrong though: it says it did remove 1147 samples, but for some reason failed to trim the other 397. I can't replicate your commands because, as I said, mp3 processing doesn't work for me with sox under W8.1. I hope someone else comes along and tries this, preferably on another Mac. -- Jeremy Nicoll - my opinions are my own _______________________________________________ Sox-users mailing list Sox-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-users