Is there a way to trim off N samples from audio file using SoX / FFmpeg or the likes of?
Using SoX trim :
sox in.wav out.wav trim 0s 1000s
Trims first 1000 samples with 0 samples offset.
's' here means 'sample', not 'second'. To trim by 'seconds' you should remove 's'
To trim specified range of sample(s):
sox in.wav out.wav trim 5000s 100s
Trims 100 samples, from 5000 to 5100 (5000s - samples offset, 100s - number of samples to trim after offset)
sox in.wav out.wav trim 123456788s 1s
Trims 123456789-nd sample (123456788s - samples offset, 1s - number of samples to trim after offset)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With