<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Abraxas &#187; MP3</title>
	<atom:link href="http://www.effinger.org/blog/tag/mp3/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.effinger.org/blog</link>
	<description>a personal knowledge base</description>
	<lastBuildDate>Sun, 06 Jun 2010 17:41:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>MP3-Dateien auf Fehler testen</title>
		<link>http://www.effinger.org/blog/2008/11/02/mp3-dateien-auf-fehler-testen/</link>
		<comments>http://www.effinger.org/blog/2008/11/02/mp3-dateien-auf-fehler-testen/#comments</comments>
		<pubDate>Sat, 01 Nov 2008 22:35:13 +0000</pubDate>
		<dc:creator>Markus Effinger</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[MP3]]></category>
		<category><![CDATA[Multimedia]]></category>

		<guid isPermaLink="false">http://www.effinger.org/blog/?p=96</guid>
		<description><![CDATA[<p>Nachdem ich meine Daten von einer Festplatte retten konnte, bei der aber teilweise allerdings schon Sektoren überschrieben worden waren, wollte ich die geretteten MP3s auf Fehler testen. Dazu fand ich drei Programme &#8211; mp3check, checkmp3 und mp3val. Unter Ubuntu lassen sich diese mit</p>

sudo apt-get install mp3check checkmp3 mp3val

<p>installieren.
Ich wollte nun alle mp3s finden, bei denen [...]]]></description>
			<content:encoded><![CDATA[<p>Nachdem ich meine Daten von einer Festplatte retten konnte, bei der aber teilweise allerdings schon Sektoren überschrieben worden waren, wollte ich die geretteten MP3s auf Fehler testen. Dazu fand ich drei Programme &#8211; <a href="http://jo.ath.cx/soft/mp3check/index.html">mp3check</a>, <a href="http://mp3check.sourceforge.net/">checkmp3</a> und <a href="http://mp3val.sourceforge.net/">mp3val</a>. Unter Ubuntu lassen sich diese mit</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> mp3check checkmp3 mp3val</pre></div></div>

<p>installieren.<br />
Ich wollte nun alle mp3s finden, bei denen keines der Programme einen Fehler meldete. Mit checkmp3 habe ich zunächst alle Dateien prüfen lassen und das Resultat in die Datei checkmp3.log schreiben lassen:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>mp3s <span style="color: #660033;">-type</span> f <span style="color: #660033;">-name</span> <span style="color: #ff0000;">'*.mp3'</span> <span style="color: #660033;">-print0</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">xargs</span> <span style="color: #660033;">-0</span> <span style="color: #660033;">-r</span> <span style="color: #660033;">-n</span> <span style="color: #000000;">1</span> <span style="color: #660033;">-i</span> <span style="color: #c20cb9; font-weight: bold;">sh</span> <span style="color: #660033;">-c</span> <span style="color: #ff0000;">'checkmp3 -p -a -e &quot;{}&quot; 2&gt;/dev/null | grep FILE_NAME | tee -a checkmp3.log || /bin/true'</span></pre></div></div>

<p>Anschließend kann man mit</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> checkmp3.log <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-v</span> <span style="color: #ff0000;">'BAD_FRAMES 0'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #660033;">-F</span> <span style="color: #ff0000;">'\t'</span> <span style="color: #ff0000;">'{print $1}'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/FILE_NAME //g'</span> <span style="color: #000000; font-weight: bold;">&gt;</span> checkmp3_bad_frames.log</pre></div></div>

<p>diejenigen Dateien filtern und in die Datei checkmp3_bad_frames.log schreiben, die fehlerhafte Frames aufweisen.<br />
Analog bin ich mit mp3check und mp3val verfahren und habe die fehlerhaften Dateien in mp3check.log bzw. mp3val.log schreiben lassen:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>mp3s <span style="color: #660033;">-type</span> f <span style="color: #660033;">-name</span> <span style="color: #ff0000;">'*.mp3'</span> <span style="color: #660033;">-print0</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">xargs</span> <span style="color: #660033;">-0</span> mp3check <span style="color: #660033;">-e</span> <span style="color: #660033;">-g</span> mp3check.log <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null
<span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>mp3s <span style="color: #660033;">-type</span> f <span style="color: #660033;">-name</span> <span style="color: #ff0000;">'*.mp3'</span> <span style="color: #660033;">-print0</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">xargs</span> <span style="color: #660033;">-0</span> mp3val <span style="color: #660033;">-si</span> -lmp3val.log</pre></div></div>

<p>Analog zu checkmp3.log habe ich mittels</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #660033;">-F</span> <span style="color: #ff0000;">'&quot;'</span> <span style="color: #ff0000;">'!/No supported tags in the file/ {print $2}'</span> mp3val.log <span style="color: #000000; font-weight: bold;">&gt;</span> mp3val_filenames.log</pre></div></div>

<p>aus der mp3val.log noch die Dateinamen herausgefiltert und in mp3val_filenames.log gespeichert. Für MP3-Dateien ohne Tags wird von mp3val eine Warnung ausgegeben, deswegen habe ich die Dateien ohne MP3-Tag herausgefiltert.<br />
Nachdem man nun 3 Dateien mit fehlerhaften Dateiennamen hat, wollte ich diese konsolidieren und als Resultat die Datei failed_mp3s erhalten. Das habe ich so geschafft:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> mp3val_filenames.log mp3check.log checkmp3_bad_frames.log <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">uniq</span> <span style="color: #000000; font-weight: bold;">&gt;</span> failed_mp3s</pre></div></div>

<p>Durch ein</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>mp3s <span style="color: #660033;">-type</span> f <span style="color: #660033;">-name</span> <span style="color: #ff0000;">'*.mp3'</span> <span style="color: #000000; font-weight: bold;">&gt;</span> mp3files</pre></div></div>

<p>erzeugt man eine Datei mit allen MP3s, die überprüft wurden und durch ein</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> mp3files failed_mp3s <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">uniq</span> <span style="color: #660033;">-u</span> <span style="color: #000000; font-weight: bold;">&gt;</span> correct_mp3s</pre></div></div>

<p>erhält man schließlich mit der Datei correct_mp3s eine Liste derjenigen Dateien, die von keinem der Testprogramme als fehlerhaft erkannt wurden.<br />
Wenn man die fehlerfreien Dateien nun in ein Verzeichnis kopieren möchte kann man das am einfachsten mit</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>mp3s
<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>correct_mp3s <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/\/path\/to\/mp3s/./g'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tr</span> <span style="color: #ff0000;">'\n'</span> <span style="color: #ff0000;">'\00'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cpio</span> <span style="color: #660033;">-0</span> <span style="color: #660033;">-p</span> <span style="color: #660033;">-d</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>healthy_mp3s<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>erledigen.<br />
Mit dem <a href="http://checkmate.linuxonly.nl">Checkmate Tool mpck</a> kann man übrigens auch noch fehlerhafte MP3-Dateien finden und auf bonzoli.com ist ebenfalls eine <a href="http://bonzoli.com/?p=18">Anleitung zur &#8220;Reinigung&#8221; der MP3-Sammlung</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.effinger.org/blog/2008/11/02/mp3-dateien-auf-fehler-testen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Encspot für Linux</title>
		<link>http://www.effinger.org/blog/2008/10/09/encspot-fur-linux/</link>
		<comments>http://www.effinger.org/blog/2008/10/09/encspot-fur-linux/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 17:03:48 +0000</pubDate>
		<dc:creator>Markus Effinger</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Encspot]]></category>
		<category><![CDATA[MP3]]></category>
		<category><![CDATA[Multimedia]]></category>

		<guid isPermaLink="false">http://www.effinger.org/blog/?p=21</guid>
		<description><![CDATA[<p>Encspot ist ein Programm, mit dem man feststellen kann, mit welchem MP3-Encoder eine MP3-Datei erstellt wurde. Es ist sinnvoll, um indirekt die Qualität der MP3-Datei zu beurteilen. Insbesondere Dateien, die mit dem MP3-Encoder von Xing erstellt wurden weisen eine schlechtere Qualität als die mit LAME erstellten auf. Vor einigen Jahren wurde deshalb von GuerillaSoft die [...]]]></description>
			<content:encoded><![CDATA[<p>Encspot ist ein Programm, mit dem man feststellen kann, mit welchem MP3-Encoder eine MP3-Datei erstellt wurde. Es ist sinnvoll, um indirekt die Qualität der MP3-Datei zu beurteilen. Insbesondere Dateien, die mit dem MP3-Encoder von Xing erstellt wurden weisen eine schlechtere Qualität als die mit <a href="http://lame.sourceforge.net/">LAME</a> erstellten auf. Vor einigen Jahren wurde deshalb von GuerillaSoft die Software EncSpot entwickelt, die ermitteln sollte, welcher Encoder eingesetzt wurde. Das Programm war zunächst nur für Windows verfügbar. Mittlerweile habe ich eine Linux-Version bei <a title="Home" href="http://hype.sourceforge.jp/d/">daemon&#8217;s horn</a> unter <a href="http://hype.sourceforge.jp/f/dists/sarge/backports/">http://hype.sourceforge.jp/f/dists/sarge/backports/</a> gefunden.</p>
<p>Damit die Dateien auch noch in ferner Zukunft verfügbar sind, habe ich sie auch nochmal bei mir auf dem Server abgelegt:</p>
<p><a href="http://www.effinger.org/fileadmin/downloads/blog/encspot_2.01-1_dh.0.diff.gz">encspot_2.01-1_dh.0.diff.gz</a></p>
<p><a href="http://www.effinger.org/fileadmin/downloads/blog/encspot_2.01-1_dh.0.dsc">encspot_2.01-1_dh.0.dsc</a></p>
<p><a href="http://www.effinger.org/fileadmin/downloads/blog/encspot_2.01-1_dh.0_i386.deb">encspot_2.01-1_dh.0_i386.deb</a></p>
<p><a href="http://www.effinger.org/fileadmin/downloads/blog/encspot_2.01.orig.tar.gz">encspot_2.01.orig.tar.gz</a></p>
<p><a href="http://www.effinger.org/fileadmin/downloads/blog/EncSpot_Console_2.01.zip">EncSpot_Console_2.01 (für Windows).zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.effinger.org/blog/2008/10/09/encspot-fur-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
