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