<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: A better way to losslessly join MP3 files</title>
	<atom:link href="http://lyncd.com/2011/03/lossless-combine-mp3s/feed/" rel="self" type="application/rss+xml" />
	<link>http://lyncd.com/2011/03/lossless-combine-mp3s/</link>
	<description></description>
	<lastBuildDate>Wed, 16 May 2012 13:42:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Martin Grønholdt</title>
		<link>http://lyncd.com/2011/03/lossless-combine-mp3s/comment-page-1/#comment-3700</link>
		<dc:creator>Martin Grønholdt</dc:creator>
		<pubDate>Fri, 14 Oct 2011 10:34:32 +0000</pubDate>
		<guid isPermaLink="false">http://lyncd.com/?p=345#comment-3700</guid>
		<description>This was a very helpful resource, a quick and easy sollution to my question. It doesn&#039;t get any better!

Thank you.</description>
		<content:encoded><![CDATA[<p>This was a very helpful resource, a quick and easy sollution to my question. It doesn&#8217;t get any better!</p>
<p>Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NssY</title>
		<link>http://lyncd.com/2011/03/lossless-combine-mp3s/comment-page-1/#comment-3699</link>
		<dc:creator>NssY</dc:creator>
		<pubDate>Fri, 14 Oct 2011 04:13:47 +0000</pubDate>
		<guid isPermaLink="false">http://lyncd.com/?p=345#comment-3699</guid>
		<description>Thanks for This Post.
&lt;b&gt;mp3wrap&lt;/b&gt; command works very well instead of &lt;b&gt;mp3cat&lt;/b&gt; (which I couldn&#039;t find) and avoids &lt;b&gt;cat&lt;/b&gt; command;

Thanks @CSLATE for the script.
Here is my modified script to handle everything.

&lt;blockquote&gt;Save as &lt;b&gt;mp3merge&lt;/b&gt;&lt;/blockquote&gt;
&lt;code&gt;
#!/bin/bash
# Author: http://lyncd.com/2011/03/lossless-combine-mp3s/
# Purpose: Merge Multiple MP3 Files
# Date: 14-Oct-2011

if [ $# -gt 2 ]; then
&#160;&#160;output=$1
&#160;&#160;shift
&#160;&#160;first_part=$1
else
&#160;&#160;echo &quot;You need to enter at least 3 files as arguments.&quot;
&#160;&#160;echo &quot;The first argument is the output file.&quot;
&#160;&#160;echo &quot;The rest of the arguments are the files to be merged.&quot;
&#160;&#160;echo &quot;E.g.&quot;
&#160;&#160;echo -e &quot;-&gt;33[1;36mmp3merge final_output.mp3 \part1.mp3 part2.mp3 part3.mp333[0m&quot;
&#160;&#160;exit 1
fi

check_prereqs(){
&#160;&#160;x=0
&#160;&#160;# Check for mp3cat
&#160;&#160;[[ ! -x `which mp3wrap` ]] &amp;&amp; \
&#160;&#160;echo -e &quot;33[1;31mPlese install mp3wrap33[0m&quot; &amp;&amp; x=1
&#160;&#160;
&#160;&#160;# Check for id3cp
&#160;&#160;[[ ! -x `which id3cp` ]] &amp;&amp; \
&#160;&#160;echo -e &quot;33[1;31mPlease install libid3-tools33[0m&quot; &amp;&amp; x=1
&#160;&#160;
&#160;&#160;# Check for vbrfix
&#160;&#160;[[ ! -x `which vbrfix` ]] &amp;&amp; \
&#160;&#160;echo -e &quot;33[1;31mPlease install vbrfix33[0m&quot; &amp;&amp; x=1
&#160;&#160;
&#160;&#160;# Exit if id3cp or vbrfix is missing   
&#160;&#160;[[ $x -eq 1 ]] &amp;&amp; echo &#039;-&gt; Exiting&#039; &amp;&amp; exit $x
}
# Main
check_prereqs
mp3wrap -v tmp.mp3 &quot;$@&quot;

# mp3wrap prefers to rename tmp.mp3 to tmp_MP3WRAP.mp3 (this is annoying)
id3cp $first_part tmp_MP3WRAP.mp3

# vbrfix --XingFrameCrcProtectIfCan tmp.mp3 &quot;$output&quot; &amp;&amp; rm tmp.mp3

# In Ubuntu/Debian the option &#039;--XingFrameCrcProtectIfCan&#039; is meaningless
vbrfix tmp_MP3WRAP.mp3 &quot;$output&quot; 

# Figure out how vbrfix faired 
if [ $? -eq 255 ]; then
&#160;&#160;# file is not Not VBR (we move our tmp_MP3WRAP.mp3 to $output)
&#160;&#160;mv tmp_MP3WRAP.mp3 &quot;$output&quot; 
elif [ $? -eq 0 ]; then
&#160;&#160;rm tmp_MP3WRAP.mp3
fi
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Thanks for This Post.<br />
<b>mp3wrap</b> command works very well instead of <b>mp3cat</b> (which I couldn&#8217;t find) and avoids <b>cat</b> command;</p>
<p>Thanks @CSLATE for the script.<br />
Here is my modified script to handle everything.</p>
<blockquote><p>Save as <b>mp3merge</b></p></blockquote>
<p><code><br />
#!/bin/bash<br />
# Author: <a href="http://lyncd.com/2011/03/lossless-combine-mp3s/" rel="nofollow">http://lyncd.com/2011/03/lossless-combine-mp3s/</a><br />
# Purpose: Merge Multiple MP3 Files<br />
# Date: 14-Oct-2011</p>
<p>if [ $# -gt 2 ]; then<br />
&nbsp;&nbsp;output=$1<br />
&nbsp;&nbsp;shift<br />
&nbsp;&nbsp;first_part=$1<br />
else<br />
&nbsp;&nbsp;echo "You need to enter at least 3 files as arguments."<br />
&nbsp;&nbsp;echo "The first argument is the output file."<br />
&nbsp;&nbsp;echo "The rest of the arguments are the files to be merged."<br />
&nbsp;&nbsp;echo "E.g."<br />
&nbsp;&nbsp;echo -e "-&gt;33[1;36mmp3merge final_output.mp3 \part1.mp3 part2.mp3 part3.mp333[0m"<br />
&nbsp;&nbsp;exit 1<br />
fi</p>
<p>check_prereqs(){<br />
&nbsp;&nbsp;x=0<br />
&nbsp;&nbsp;# Check for mp3cat<br />
&nbsp;&nbsp;[[ ! -x `which mp3wrap` ]] &amp;&amp; \<br />
&nbsp;&nbsp;echo -e "33[1;31mPlese install mp3wrap33[0m" &amp;&amp; x=1<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;# Check for id3cp<br />
&nbsp;&nbsp;[[ ! -x `which id3cp` ]] &amp;&amp; \<br />
&nbsp;&nbsp;echo -e "33[1;31mPlease install libid3-tools33[0m" &amp;&amp; x=1<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;# Check for vbrfix<br />
&nbsp;&nbsp;[[ ! -x `which vbrfix` ]] &amp;&amp; \<br />
&nbsp;&nbsp;echo -e "33[1;31mPlease install vbrfix33[0m" &amp;&amp; x=1<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;# Exit if id3cp or vbrfix is missing<br />
&nbsp;&nbsp;[[ $x -eq 1 ]] &amp;&amp; echo '-&gt; Exiting' &amp;&amp; exit $x<br />
}<br />
# Main<br />
check_prereqs<br />
mp3wrap -v tmp.mp3 "$@"</p>
<p># mp3wrap prefers to rename tmp.mp3 to tmp_MP3WRAP.mp3 (this is annoying)<br />
id3cp $first_part tmp_MP3WRAP.mp3</p>
<p># vbrfix --XingFrameCrcProtectIfCan tmp.mp3 "$output" &amp;&amp; rm tmp.mp3</p>
<p># In Ubuntu/Debian the option '--XingFrameCrcProtectIfCan' is meaningless<br />
vbrfix tmp_MP3WRAP.mp3 "$output" </p>
<p># Figure out how vbrfix faired<br />
if [ $? -eq 255 ]; then<br />
&nbsp;&nbsp;# file is not Not VBR (we move our tmp_MP3WRAP.mp3 to $output)<br />
&nbsp;&nbsp;mv tmp_MP3WRAP.mp3 "$output"<br />
elif [ $? -eq 0 ]; then<br />
&nbsp;&nbsp;rm tmp_MP3WRAP.mp3<br />
fi<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Join mp3 files: &#124; eotmsnotes</title>
		<link>http://lyncd.com/2011/03/lossless-combine-mp3s/comment-page-1/#comment-3676</link>
		<dc:creator>Join mp3 files: &#124; eotmsnotes</dc:creator>
		<pubDate>Wed, 21 Sep 2011 02:24:14 +0000</pubDate>
		<guid isPermaLink="false">http://lyncd.com/?p=345#comment-3676</guid>
		<description>[...] http://lyncd.com/2011/03/lossless-combine-mp3s/ includes vbr header fixup utility http://mp3val.sourceforge.net/ check/fix mpeg audio files integrity. [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://lyncd.com/2011/03/lossless-combine-mp3s/" rel="nofollow">http://lyncd.com/2011/03/lossless-combine-mp3s/</a> includes vbr header fixup utility <a href="http://mp3val.sourceforge.net/" rel="nofollow">http://mp3val.sourceforge.net/</a> check/fix mpeg audio files integrity. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CSlate</title>
		<link>http://lyncd.com/2011/03/lossless-combine-mp3s/comment-page-1/#comment-3657</link>
		<dc:creator>CSlate</dc:creator>
		<pubDate>Tue, 06 Sep 2011 08:45:57 +0000</pubDate>
		<guid isPermaLink="false">http://lyncd.com/?p=345#comment-3657</guid>
		<description>Lol, I told you I am bad at bash scripts.
change the line 
vbrfix --XingFrameCrcProtectIfCan tmp.mp3 $output &amp;&amp; rm tmp.mp3
vbrfix --XingFrameCrcProtectIfCan tmp.mp3 &quot;$output&quot; &amp;&amp; rm tmp.mp3

I missed the double quotes from $output :).</description>
		<content:encoded><![CDATA[<p>Lol, I told you I am bad at bash scripts.<br />
change the line<br />
vbrfix &#8211;XingFrameCrcProtectIfCan tmp.mp3 $output &amp;&amp; rm tmp.mp3<br />
vbrfix &#8211;XingFrameCrcProtectIfCan tmp.mp3 &#8220;$output&#8221; &amp;&amp; rm tmp.mp3</p>
<p>I missed the double quotes from $output :).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CSlate</title>
		<link>http://lyncd.com/2011/03/lossless-combine-mp3s/comment-page-1/#comment-3655</link>
		<dc:creator>CSlate</dc:creator>
		<pubDate>Mon, 05 Sep 2011 19:05:10 +0000</pubDate>
		<guid isPermaLink="false">http://lyncd.com/?p=345#comment-3655</guid>
		<description>Thanks for this. I turned it into a full script.
This saved me a lot of hassle.. Thanks to Simon for the code aswell, it made making the script easier(I&#039;m rubbish at bash lol). Sadly though Simon&#039;s script didn&#039;t work for me.

On my PC the command is VbrfixConsole, but I left it as vbrfix in the script. I used a rpm from rpmseek.com, so maybe that&#039;s why.

Save as &quot;mp3merge&quot;
&lt;code&gt;
#!/bin/bash

if [ $# -gt 2 ]; then
        output=$1
        shift
        first_part=$1

        cat &quot;$@&quot; &#124; mp3cat - - &gt; tmp.mp3
        id3cp $first_part tmp.mp3
        vbrfix --XingFrameCrcProtectIfCan tmp.mp3 $output &amp;&amp; rm tmp.mp3
else
        echo &quot;You need to enter 3 files as arguments.&quot;
        echo &quot;The first argument is the output file.&quot;
        echo &quot;The rest of the arguments are the files to be merged.&quot;
        echo &quot;E.g.&quot;
        echo -e &quot;\tmp3merge final_output.mp3  part1.mp3 part2.mp3 part3.mp3&quot;
fi
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Thanks for this. I turned it into a full script.<br />
This saved me a lot of hassle.. Thanks to Simon for the code aswell, it made making the script easier(I&#8217;m rubbish at bash lol). Sadly though Simon&#8217;s script didn&#8217;t work for me.</p>
<p>On my PC the command is VbrfixConsole, but I left it as vbrfix in the script. I used a rpm from rpmseek.com, so maybe that&#8217;s why.</p>
<p>Save as &#8220;mp3merge&#8221;<br />
<code><br />
#!/bin/bash</p>
<p>if [ $# -gt 2 ]; then<br />
        output=$1<br />
        shift<br />
        first_part=$1</p>
<p>        cat "$@" | mp3cat - - &gt; tmp.mp3<br />
        id3cp $first_part tmp.mp3<br />
        vbrfix --XingFrameCrcProtectIfCan tmp.mp3 $output &amp;&amp; rm tmp.mp3<br />
else<br />
        echo "You need to enter 3 files as arguments."<br />
        echo "The first argument is the output file."<br />
        echo "The rest of the arguments are the files to be merged."<br />
        echo "E.g."<br />
        echo -e "\tmp3merge final_output.mp3  part1.mp3 part2.mp3 part3.mp3"<br />
fi<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: simon</title>
		<link>http://lyncd.com/2011/03/lossless-combine-mp3s/comment-page-1/#comment-3483</link>
		<dc:creator>simon</dc:creator>
		<pubDate>Mon, 23 May 2011 11:09:46 +0000</pubDate>
		<guid isPermaLink="false">http://lyncd.com/?p=345#comment-3483</guid>
		<description>just fyi, `vbrfix` will remove non-mp3 data frames for you too, so there&#039;s actually no need to invoke `mp3cat` (this is handy for me, as on my Debian system `mp3cat` is the only bit I had to compile from source).

From the wrapper script I created:

cat &quot;$@&quot; &gt; tmp.mp3
vbrfix -ri1 -ri2 -always tmp.mp3 &quot;$output&quot; &amp;&amp; rm tmp.mp3
id3cp &quot;$1&quot; &quot;$output&quot;

:)</description>
		<content:encoded><![CDATA[<p>just fyi, `vbrfix` will remove non-mp3 data frames for you too, so there&#8217;s actually no need to invoke `mp3cat` (this is handy for me, as on my Debian system `mp3cat` is the only bit I had to compile from source).</p>
<p>From the wrapper script I created:</p>
<p>cat &#8220;$@&#8221; &gt; tmp.mp3<br />
vbrfix -ri1 -ri2 -always tmp.mp3 &#8220;$output&#8221; &amp;&amp; rm tmp.mp3<br />
id3cp &#8220;$1&#8243; &#8220;$output&#8221;</p>
<p>:)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A better way to losslessly join MP3 files</title>
		<link>http://lyncd.com/2011/03/lossless-combine-mp3s/comment-page-1/#comment-3318</link>
		<dc:creator>A better way to losslessly join MP3 files</dc:creator>
		<pubDate>Thu, 17 Mar 2011 09:27:00 +0000</pubDate>
		<guid isPermaLink="false">http://lyncd.com/?p=345#comment-3318</guid>
		<description>[...] 3 separate utilities. The good news is, I think I&#8217;ve found the one true method. The bad... [full post]    sticks     lyncd   codemp3unix            0        0        0        0        0       [16 Mar [...]</description>
		<content:encoded><![CDATA[<p>[...] 3 separate utilities. The good news is, I think I&#8217;ve found the one true method. The bad&#8230; [full post]    sticks     lyncd   codemp3unix            0        0        0        0        0       [16 Mar [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

