<p>That is excellent. Something I've done many times myself and forgot to troubleshoot....</p>
<div class="gmail_quote">On Sep 20, 2011 7:17 AM, "Lorenzo Sutton" <<a href="mailto:lsutton@libero.it">lsutton@libero.it</a>> wrote:<br type="attribution">> Well... Sorry to answer my self. I was in such a hurry I wasn't paying <br>
> enough attention to the various switches:<br>> <br>> On 20/09/2011 15:29, Lorenzo Sutton wrote:<br>>> I have a sox + lame pipe of this kind:[1][2]<br>>><br>>> sox sin.mp3 -t wav - trim 10 20 fade t 2 10 2 | lame - -r out.mp3<br>
> <br>> Indeed the -t wav in sox will produce a wave file, and thus with a <br>> header, while -r in lame expects raw. So change -t wav to -t raw or <br>> remove the -r in lame solves the problem:<br>> <br>
> sox sin.mp3 -t wav - trim 10 20 fade t 2 10 2 | lame - out.mp3<br>> <br>> or<br>> <br>> sox sin.mp3 -t raw - trim 10 20 fade t 2 10 2 | lame - -r out.mp3<br>> <br>> So "the click is the header"...<br>
> <br>> Sorry again for posting in a rush :)<br>> Lorenzo.<br>> <br>>><br>>> Everything is fine but the final mp3 file[3] always has an annoying<br>>> click at the beginning. This has somewhat to do with the pipe as it<br>
>> doesn't happen if I create a wave file from sox. Nor does it happen if I<br>>> use sox only:<br>>><br>>> sox sin.mp3 out2.mp3 trim 10 15 fade t 2 10 2<br>>><br>>> Yet the latter needs sox compiled with mp3 support, which is less<br>
>> portable than the above.<br>>><br>>> I'm not sure how to look into this so any suggestion is welcome.<br>>><br>>> Lorenzo<br>>><br>>> [1] No I can't use better, non-evil formats this time<br>
>> [2] No, I haven't the uncompressed source, so I can only use the mp3 as<br>>> input: life sucks.<br>>> [3] Here: BUT ATTENTION!! There is a click at the beginning so turn<br>>> volume right down: <a href="http://lorenzosu.altervista.org/temp/dump/out.mp3">http://lorenzosu.altervista.org/temp/dump/out.mp3</a> The<br>
>> source file here:<br>>> <a href="http://lorenzosu.altervista.org/temp/dump/sin.mp3">http://lorenzosu.altervista.org/temp/dump/sin.mp3</a><br>>> _______________________________________________<br>>> Linux-audio-user mailing list<br>
>> <a href="mailto:Linux-audio-user@lists.linuxaudio.org">Linux-audio-user@lists.linuxaudio.org</a><br>>> <a href="http://lists.linuxaudio.org/listinfo/linux-audio-user">http://lists.linuxaudio.org/listinfo/linux-audio-user</a><br>
>><br>> <br>> _______________________________________________<br>> Linux-audio-user mailing list<br>> <a href="mailto:Linux-audio-user@lists.linuxaudio.org">Linux-audio-user@lists.linuxaudio.org</a><br>> <a href="http://lists.linuxaudio.org/listinfo/linux-audio-user">http://lists.linuxaudio.org/listinfo/linux-audio-user</a><br>
</div>