Menu

#209 Trim to output sample rate

None
closed-invalid
nobody
None
5
2016-08-06
2016-08-05
Ben Whitman
No

When using the trim command with sample parameters, the trim is done according to the input sample rate. It would be nice to have the option to trim after resampling.

e.g.

sox.exe in_32k.wav -L -r 44.1k -b 16 out.wav trim 0 100s

results in an output file 135 samples long, rather than 100 samples.

Discussion

  • Ulrich Klauer

    Ulrich Klauer - 2016-08-06
    • status: open --> closed-invalid
    • Group: -->
     
  • Ulrich Klauer

    Ulrich Klauer - 2016-08-06

    Even though the resampling effect by default is inserted at the end (if there is a mismatch between the sample rate at that point and the desired output rate), you can manually put it wherever you like. This should do what you want:

    sox in_32k.wav -L -r 44.1k -b 16 out.wav rate trim 0 100s

     

Log in to post a comment.

MongoDB Logo MongoDB