windows batch scripting and gen. sox questions

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

windows batch scripting and gen. sox questions

atomman
hi - i'm new to SoX and have very little knowledge of windows batch
scripting, so i'm looking for help with both

the goal is to batch process a directory of misc. mp3 music files and
just make some general improvements so they sound as good as reasonably
possible without re-encoding them

what i would like to do for all files is:

* trim existing beginning and ending silence (start and end ONLY,
duration unknown)
* pad ~1 sec. silence to beginning and end
* prevent clipping and add ~3db of headroom for further processing
* normalize the volume so all the files sound generally the same to the
human ear
* any other suggestions ???

sox resides in a different directory than where i want to place the
batch scripts, so i need some help in calling it and then processing the
files - i would be fine with overwriting the existing files so i don't
have to create the "output" directory

so sox is in "c:\program files (x86)\SoX\" and my mp3's are in
"e:\music\working\", along with the batch script

the sox\ directory was added to my path variable

the example batch script doesn't seem to do me much good in this
instance, but maybe it can offer a starting point...

cd %~dp0
mkdir output
FOR %%A IN (%*) DO sox %%A "output/%%~nxA" silence loudness gain -n -3
pad 1 1
pause

however is looks like "silence" is not going to work for me since i want
to trim all silence at only the beginning and end without having to
specify a duration (i can use mp3DirectCut instead, as it can batch
"crop" begin/end silence of unknown duration), but it looks like sox
will work for everything else - i'm just not sure how to use it or which
functions i really need

------------------------------------------------------------------------------
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: windows batch scripting and gen. sox questions

Fmiser
> atomman wrote:
>
> hi - i'm new to SoX and have very little knowledge of windows
> batch scripting, so i'm looking for help with both
>
> the goal is to batch process a directory of misc. mp3 music files
> and just make some general improvements so they sound as good as
> reasonably possible without re-encoding them

If you use SoX, they _will_ be re-encoded.  Internally SoX converts
all formats to "raw", processes them, the converts to the output
format.

Regarding batch files - I'm pretty useless. *smiles*

--    fm


------------------------------------------------------------------------------
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: windows batch scripting and gen. sox questions

James Darnley
In reply to this post by atomman
On 2014-11-07 22:29, atomman wrote:
> hi - i'm new to SoX and have very little knowledge of windows batch
> scripting, so i'm looking for help with both

If you are looking for a good reference/guide on using Windows' command
prompt, I would suggest the various pages under http://ss64.com/nt/
particularly the syntax link at the top.




------------------------------------------------------------------------------

_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users

signature.asc (616 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: windows batch scripting and gen. sox questions

atomman
In reply to this post by atomman
if i understand the difference between 'lossy' and 'lossless', doesn't
it indicate in the manual that sox is non-destructive when it can be? ...

Audio file conversion with SoX is lossless when it can be, i.e. when not
using lossy compression, when not reducing the sampling rate or number
of channels, and when the number of bits used in the destination format
is not less than in the source format.

----- Original Message -----
Subject: Re: [SoX-users] windows batch scripting and gen. sox questions
Date: Fri, 7 Nov 2014 20:04:05 -0600
From: fmiser <[hidden email]>

> atomman wrote:
>
> hi - i'm new to SoX and have very little knowledge of windows
> batch scripting, so i'm looking for help with both
>
> the goal is to batch process a directory of misc. mp3 music files
> and just make some general improvements so they sound as good as
> reasonably possible without re-encoding them

If you use SoX, they _will_ be re-encoded.  Internally SoX converts
all formats to "raw", processes them, the converts to the output
format.

Regarding batch files - I'm pretty useless. *smiles*

--    fm


------------------------------------------------------------------------------
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: windows batch scripting and gen. sox questions

Jan Stary
On Nov 08 07:29:06, [hidden email] wrote:
> if i understand the difference between 'lossy' and 'lossless', doesn't
> it indicate in the manual that sox is non-destructive when it can be? ...
>
> Audio file conversion with SoX is lossless when it can be, i.e.
> when not using lossy compression,
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> when not reducing the sampling rate or number
> of channels, and when the number of bits used in the destination format
> is not less than in the source format.

mp3 is a lossy compression


------------------------------------------------------------------------------
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users