<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<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>audio &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/tag/audio/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Wed, 01 Apr 2026 09:19:29 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>audio &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[Making a better audio shortcode for WordPress]]></title>
		<link>https://shkspr.mobi/blog/2023/10/making-a-better-audio-shortcode-for-wordpress/</link>
					<comments>https://shkspr.mobi/blog/2023/10/making-a-better-audio-shortcode-for-wordpress/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Sat, 14 Oct 2023 11:34:01 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=47901</guid>

					<description><![CDATA[If you use WordPress, you can get a fairly basic embedded audio player by using the audio shortcode:  &#38;lsqb;audio mp3=&#34;/path/to/file.mp3&#34;]   I didn&#039;t particularly like how it was styled so - because WordPress is so hackable - I changed it!  Now my embedded audio looks like this:   	🔊 Location Based QR Codes - Introducing http://xmts.mobi/🎤 edent 	 	 		💾 Download this audio file. 	   It gets a nice…]]></description>
										<content:encoded><![CDATA[<p>If you use WordPress, you can get a fairly basic embedded audio player by using the audio shortcode:</p>

<pre><code class="language-html">&amp;lsqb;audio mp3="/path/to/file.mp3"]
</code></pre>

<p>I didn't particularly like how it was styled so - because WordPress is so hackable - I changed it!</p>

<p>Now my embedded audio looks like this:</p>

<p></p><figure class="audio">
	<figcaption>🔊 Location Based QR Codes - Introducing http://xmts.mobi/<br>🎤 edent</figcaption>
	<img src="https://shkspr.mobi/blog/wp-content/uploads/2023/10/192609-mp3-image.png" alt="">
	<audio controls="" loading="lazy" src="https://shkspr.mobi/blog/wp-content/uploads/2010/11/192609.mp3">
		<p>💾 <a href="https://shkspr.mobi/blog/wp-content/uploads/2010/11/192609.mp3">Download this audio file</a>.</p>
	</audio>
</figure><p></p>

<p>It gets a nice border, a title, displays any attached image, and uses the native HTML5 audio element.</p>

<p>Here's the code to do it. Stick it in your <code>functions.php</code> and add suitable CSS. Shout if you spot any weird bugs.</p>

<pre><code class="language-php">add_filter('wp_audio_shortcode_override', 'edent_audio_shortcode_override', 10, 2);
function edent_audio_shortcode_override( $html, $attr ) {
    $audio_url = "";

    //  The shortcode will have an attribute with the URl to the file:
    //  e.g. [ audio mp3="https://example.com/path/to/file.mp3" ]
    if ( isset( $attr['wav']  ) ) { $audio_url = $attr['wav'];  }
    if ( isset( $attr['mp3']  ) ) { $audio_url = $attr['mp3'];  }
    if ( isset( $attr['m4a']  ) ) { $audio_url = $attr['m4a'];  }
    if ( isset( $attr['ogg']  ) ) { $audio_url = $attr['ogg'];  }
    if ( isset( $attr['opus'] ) ) { $audio_url = $attr['opus']; };
    if ( isset( $attr['src']  ) ) { $audio_url = $attr['src'];  }; //   For raw links without a shortcode

    //  Defaults
    $audio_meta = null;
    $audio_thumb = false;

    //  Get the attachment ID from the media library
    $audio_id = attachment_url_to_postid( $audio_url );
    if ($audio_id &gt; 0) { 
        $audio_meta  = wp_get_attachment_metadata($audio_id); 
        $audio_thumb = get_the_post_thumbnail_url( $audio_id );
    } else {
        //  Is this on our server?
        $upload_dir = wp_upload_dir(); // Get the upload directory info
        $upload_baseurl = $upload_dir['baseurl'];

        // Check if the provided URL belongs to the site
        if (strpos($audio_url, $upload_baseurl) !== false) {
            // URL belongs to the site, get the file path
            $file_path = str_replace($upload_baseurl, $upload_dir['basedir'], $audio_url);
            // Check if the file exists on disk
            if (file_exists($file_path)) {
                require_once ABSPATH . 'wp-admin/includes/media.php';
                $audio_meta  = wp_read_audio_metadata( $file_path );
                $audio_thumb = false;
            }
        }
    }

    //  Get the title of the audio - or use a default
    if ( isset( $audio_meta["title"] ) ) { 
        $audio_title = "🔊 " . htmlspecialchars( $audio_meta["title"], ENT_NOQUOTES | ENT_HTML5 | ENT_SUBSTITUTE, 'UTF-8', /*double_encode*/false ); 
    } else {
        $audio_title = "🔊";
    }

    //  Get the artist of the audio - or use a default
    if ( isset( $audio_meta["artist"] ) ) { 
        $audio_artist = "&lt;br&gt;🎤 " . htmlspecialchars( $audio_meta["artist"], ENT_NOQUOTES | ENT_HTML5 | ENT_SUBSTITUTE, 'UTF-8', /*double_encode*/false ); 
    } else {
        $audio_artist = "";
    }

    //  Set the HTML for the thumbnail
    if ( $audio_thumb ) {
        $audio_thumb_html = "&lt;img src=\"{$audio_thumb}\" class=\"audio-thumb\" alt=\"\"&gt;";
    } else {
        $audio_thumb_html = "";
    }

    $audio_html = &lt;&lt;&lt;EOT
&lt;figure class="audio"&gt;
    &lt;figcaption class="audio"&gt;{$audio_title}{$audio_artist}&lt;/figcaption&gt;
    {$audio_thumb_html}
    &lt;audio class="audio-player" controls src="{$audio_url}"&gt;
        &lt;a href="{$audio_url}"&gt;Download audio&lt;/a&gt;
    &lt;/audio&gt;
&lt;/figure&gt;
EOT;
    return $audio_html;
}
</code></pre>

<h2 id="how-it-works"><a href="https://shkspr.mobi/blog/2023/10/making-a-better-audio-shortcode-for-wordpress/#how-it-works">How it works</a></h2>

<p>I'm indebted to <a href="https://wordpress.stackexchange.com/questions/163324/extending-the-audio-shortcode">this answer on WordPress StackExchange</a> and <a href="https://stackoverflow.com/questions/68702574/wordpress-audio-shortcode-override-metadata">this one onStackOverflow</a>.</p>

<p>There's a whole bunch of metadata available in the audio files.</p>

<p>But to start with, you need to take the URl of the audio source and find its ID in the media library.</p>

<p><code>attachment_url_to_postid( "https://example.com/path/to/file.mp3" );</code></p>

<p>That should give you an ID. And here's how to get all the metadata from that attachment ID: <code>wp_get_attachment_metadata( 1234 )</code></p>

<p>Which spits out:</p>

<pre><code class="language-php">array(25) {
  ["dataformat"]=&gt;  string(3) "mp3"
  ["channels"]=&gt;  int(1)
  ["sample_rate"]=&gt;  int(44100)
  ["bitrate"]=&gt;  float(63731.43187641008)
  ["channelmode"]=&gt;  string(4) "mono"
  ["bitrate_mode"]=&gt;  string(3) "vbr"
  ["codec"]=&gt;  string(4) "LAME"
  ["encoder"]=&gt;  string(8) "LAME3.97"
  ["lossless"]=&gt;  bool(false)
  ["encoder_options"]=&gt;  string(41) "--preset fast medium -b64 --lowpass 17500"
  ["compression_ratio"]=&gt;  float(0.09032232408788277)
  ["fileformat"]=&gt;  string(3) "mp3"
  ["filesize"]=&gt;  int(5714048)
  ["mime_type"]=&gt;  string(10) "audio/mpeg"
  ["length"]=&gt;  int(683)
  ["length_formatted"]=&gt;  string(5) "11:23"
  ["title"]=&gt;  string(55) "Location Based QR Codes - Introducing http://xmts.mobi/"
  ["artist"]=&gt;  string(5) "edent"
  ["copyright_message"]=&gt;  string(5) "edent"
  ["time"]=&gt;  string(4) "0549"
  ["date"]=&gt;  string(4) "0310"
  ["year"]=&gt;  string(4) "2010"
  ["encoded_by"]=&gt;  string(18) "http://audioboo.fm"
  ["image"]=&gt;  array(3) {
    ["mime"]=&gt;    string(9) "image/png"
    ["width"]=&gt;    int(826)
    ["height"]=&gt;    int(1169)
  }
  ["album"]=&gt;  string(0) ""
}
</code></pre>

<p>You'll notice that it doesn't actually have the image data inside. If WordPress noticed there was an embedded image in the audio on upload, it will be attached to it as a featured image. You can get it using: <code>get_the_post_thumbnail( 1234 );</code></p>

<p>Alternative, you can get the binary data for the image using the path to the file: <code>wp_read_audio_metadata("wp-content/uploads/2010/11/1234.mp3");</code></p>

<p>This gives:</p>

<pre><code class="language-php">array(24) {
  ["dataformat"]=&gt;  string(3) "mp3"
  ["channels"]=&gt;  int(1)
  ["sample_rate"]=&gt;  int(44100)
  ["bitrate"]=&gt;  float(63731.43187641008)
  ["channelmode"]=&gt;  string(4) "mono"
  ["bitrate_mode"]=&gt;  string(3) "vbr"
  ["codec"]=&gt;  string(4) "LAME"
  ["encoder"]=&gt;  string(8) "LAME3.97"
  ["lossless"]=&gt;  bool(false)
  ["encoder_options"]=&gt;  string(41) "--preset fast medium -b64 --lowpass 17500"
  ["compression_ratio"]=&gt;  float(0.09032232408788277)
  ["fileformat"]=&gt;  string(3) "mp3"
  ["filesize"]=&gt;  int(5714048)
  ["mime_type"]=&gt;  string(10) "audio/mpeg"
  ["length"]=&gt;  int(683)
  ["length_formatted"]=&gt;  string(5) "11:23"
  ["title"]=&gt;  string(55) "Location Based QR Codes - Introducing http://xmts.mobi/"
  ["artist"]=&gt;  string(5) "edent"
  ["copyright_message"]=&gt;  string(5) "edent"
  ["time"]=&gt;  string(4) "0549"
  ["date"]=&gt;  string(4) "0310"
  ["year"]=&gt;  string(4) "2010"
  ["encoded_by"]=&gt;  string(18) "http://audioboo.fm"
  ["image"]=&gt;  array(4) {
    ["data"]=&gt;    BINARY DATA
    ["mime"]=&gt;    string(9) "image/png"
    ["width"]=&gt;    int(826)
    ["height"]=&gt;    int(1169)
  }
}
</code></pre>

<p>See <a href="https://developer.wordpress.org/reference/functions/wp_read_audio_metadata/"><code>wp_read_audio_metadata()</code></a> for more details. Note, it only works on local files - no reading from remote files.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=47901&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2023/10/making-a-better-audio-shortcode-for-wordpress/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		<enclosure url="https://shkspr.mobi/blog/wp-content/uploads/2010/11/192609.mp3" length="5714048" type="audio/mpeg" />
<enclosure url="https://example.com/path/to/file.mp3" length="1256" type="audio/mpeg" />

			</item>
		<item>
		<title><![CDATA[Why don't video calls have stereo audio?]]></title>
		<link>https://shkspr.mobi/blog/2021/01/why-dont-video-calls-have-stereo-audio/</link>
					<comments>https://shkspr.mobi/blog/2021/01/why-dont-video-calls-have-stereo-audio/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Thu, 21 Jan 2021 12:34:50 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[wfh]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=37897</guid>

					<description><![CDATA[This is probably me being a bit dense. I&#039;m on a video call with two other people. Alice is on the left of my screen, Bob is on the right. Why isn&#039;t the audio in stereo?  (Zoom lets you send stereo audio - but only of you have a stereo microphone. Whereas I&#039;m talking abound individuals sending mono and receiving to stereo.)  Every video conference system I&#039;ve used delivers the audio in mono.…]]></description>
										<content:encoded><![CDATA[<p>This is probably me being a bit dense. I'm on a video call with two other people. Alice is on the left of my screen, Bob is on the right. Why isn't the audio in stereo?</p>

<p>(<small><a href="https://support.zoom.us/hc/en-us/articles/115004830406-Enabling-stereo-audio">Zoom lets you <em>send</em> stereo audio</a> - but only of you have a stereo microphone. Whereas I'm talking abound individuals sending mono and receiving to stereo.</small>)</p>

<p>Every video conference system I've used delivers the audio in mono. That's fine when one person is speaking, but gets really muddy and confusing when multiple people are speaking.  So why not deliver stereo audio? Put Alice in my left ear and Bob in my right.</p>

<p>It would improve the audio quality, make it easier to hear multiple participants, and give a more immersive feel to tedious calls.</p>

<p>Individual audio would also mean that I could control the volume of participants with dodgy mics and reduce the bass on those with boomy voices.  What's not to like?</p>

<p>So, what are the reasons <em>not</em> to do this?</p>

<p>Bandwidth? Opus, the audio codec used by most systems, uses about <a href="https://wiki.xiph.org/Opus_Recommended_Settings#Recommended_Bitrates">16kbps for mono speech</a>. So, call it 32kbps for stereo.</p>

<p>A 720p video call, <a href="https://support.zoom.us/hc/en-us/articles/207347086-Group-HD">according to Zoom</a>, requires 1.5Mbps. Adding another audio stream - or even half a dozen - would add a negligible amount of data. So it can't be that.</p>

<p>Computational complexity? If the client (the web browser) is organising the order of the video on screen, it can organise the audio. There's a <a href="https://developer.mozilla.org/en-US/docs/Web/API/StereoPannerNode">stereo panning API</a> built right in to the browser.</p>

<p>If the server is sending out the video pre-arranged - then is it really a chore to mux a stereo stream rather than mono? Maybe it's a bit of work, but that's nothing compared to re-encoding video.</p>

<p>Patents? I know software patents are ridiculous - but surely stereo audio isn't held by an IP Troll, right?</p>

<p>Do users find it confusing? Maybe. But lots of podcasts have stereo audio with a host in each ear. Every TV show is broadcast in stereo (or better).  I think people could handle it. And, if not, have a big ol' MONO button on screen.</p>

<p>Come on Zoom, Skype, Teams, Meet, Jitsi et al! Give the people what they want! An audio feed for each ear!</p>

<h2 id="except"><a href="https://shkspr.mobi/blog/2021/01/why-dont-video-calls-have-stereo-audio/#except">Except...</a></h2>

<p>Now, I'm being slightly disingenuous here.  There are <em>some</em> video call services which use spatial audio. Here's the <a href="https://www.businessinsider.com/dolby-spinal-tap-dobly-joke-2015-9?r=US&amp;IR=T">Dobly</a> service:</p>

<iframe title="Dolby.io Communications APIs Demo | Featuring Spatial Audio &amp; Noise Suppression" width="620" height="349" src="https://www.youtube.com/embed/RJyVJZv1ZGQ?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen=""></iframe>

<p>The HighFidelity.com service also does spatial audio:</p>

<iframe title="Live Spatial Audio Completely Changes Videoconferencing  🎧" width="620" height="349" src="https://www.youtube.com/embed/Sqnbs48340E?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen=""></iframe>

<p>I think both of those are <em>much</em> more immersive. Far easier to listen to. I'm not sure if I want to put my work conferences though a 5.1 surround sound system just yet - but even basic stereo is a vast improvement on boring mono.</p>

<p>So what's stopping the more mainstream services from offering this?</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=37897&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2021/01/why-dont-video-calls-have-stereo-audio/feed/</wfw:commentRss>
			<slash:comments>12</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Review: Aftershokz Titanium Bone Conducting Headphones ★★★★⯪]]></title>
		<link>https://shkspr.mobi/blog/2020/11/review-aftershokz-titanium-bone-conducting-headphones/</link>
					<comments>https://shkspr.mobi/blog/2020/11/review-aftershokz-titanium-bone-conducting-headphones/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Tue, 10 Nov 2020 12:02:30 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[gadget]]></category>
		<category><![CDATA[review]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=37138</guid>

					<description><![CDATA[Welcome to the world of endless conference calls! My last pair of headphones broke after a few months of constant use, so I decided to treat myself to a new, sturdier pair.  These Aftershokz are SEVENTY QUID! Which is about £40 more than I usual spend on a pair of cans. But these use magic to get the sound into your head. They make your cheekbones vibrate and that sends the music direct to your …]]></description>
										<content:encoded><![CDATA[<p>Welcome to the world of <em>endless</em> conference calls! My <a href="https://shkspr.mobi/blog/2020/07/review-openear-trio-bluetooth-headphones/">last pair of headphones</a> broke after a few months of constant use, so I decided to treat myself to a new, sturdier pair.</p>

<p>These Aftershokz are SEVENTY QUID! Which is about £40 more than I usual spend on a pair of cans. But these use <strong>magic</strong> to get the sound into your head. They make your cheekbones vibrate and that sends the music direct to your eardrums. This means your ears can still receive outside sounds. Handy if you're jogging and don't want to be run over. Or if an Amazon delivery comes while you're deep in a Zoom breakout room.</p>

<p><a href="https://amzn.to/3eyLjQB"><img src="https://shkspr.mobi/blog/wp-content/uploads/2020/11/Product-shot-aftershokz.jpg" alt="Set of black headphones." width="1024" height="480" class="aligncenter size-full wp-image-37141"></a></p>

<p>They are a little bulky - but they don't stick out too much on a video call. You won't look like you're wearing a gaming headset.</p>

<p>The weight is a little more than I would like, certainly heavier than cheaper headphones. But for wearing all day, they'll do.</p>

<p>Tightness is a bit of an issue. The bone conduction works best when pushing gently on your skull. Rather than resting on top of your ears, they gently squeeze your head. It isn't unpleasant, but it takes a bit of getting used to.</p>

<p>So, the killer question, what's audio quality like?</p>

<p>AMAZING! Voices are clear and crisp - when using A2DP. No perceptible lag. The sound appears <em>inside</em> your head.</p>

<p>Plosives are particular weird. The bass <em>literally</em> thumps you about the face whenever anyone says a hard "P" directly into their mic. You can turn the bass down by changing the equaliser settings - hold both buttons simultaneously. It doesn't completely eliminate the bass thump - but it does make it more bearable.</p>

<p>Stereo separation is fine. And the maximum volume is pretty loud. But - and this is deeply weird - you can still hear the outside world.</p>

<p>The box comes with a cloth bag and hard carry-case. You also get a pair of foam earplugs and a basic Micro-USB cable.</p>

<h2 id="pros"><a href="https://shkspr.mobi/blog/2020/11/review-aftershokz-titanium-bone-conducting-headphones/#pros">Pros</a></h2>

<ul>
<li>Works with Linux.  Bluetooth is a fragile technology, but these paired just fine on the latest Pop OS / Ubuntu. When I switched them back on, they paired instantly.</li>
<li>The multifunction button successfully sent play / pause commands to my music app.</li>
<li>Up to 6 hours of call time. If you're spending more time than that per day on calls - speak to your trade union.</li>
<li>Volume controls on the headset. Handy if your phone is in your pocket.</li>
<li>Pairs with multiple devices - so you can have music from your phone and calls from you laptop.</li>
<li>Voice quality is <em>so</em> good that it reveals just how bad some people's microphones are.</li>
<li>People reported my voice quality as "basically fine" - but I tend to <a href="https://shkspr.mobi/blog/2020/06/review-yanmai-usb-microphone/">use an external mic</a>.</li>
</ul>

<h2 id="cons"><a href="https://shkspr.mobi/blog/2020/11/review-aftershokz-titanium-bone-conducting-headphones/#cons">Cons</a></h2>

<ul>
<li>Micro-USB rather than USB-C for charging. That's a shame, I like having the same charger for everything. I used a <a href="https://shkspr.mobi/blog/2020/07/gadget-review-magnetic-charging-cables/">magnetic adapter</a>.</li>
<li>There's a digital assistant called "Audrey". Literally all it does is say whether the device is pairing or what the battery status is. I'm not quite sure that requires a dedicated button.</li>
<li>If you're using the microphones on the headset, it switches to HSP/HFP which drops the incoming audio quality to mobile phone levels. I couldn't find a way to have high quality audio and a microphone.</li>
<li>Microsoft Teams seemed to forcibly switch me to lower quality HSP. This is <a href="https://docs.microsoft.com/en-us/answers/questions/4821/teams-for-linux-bluetooth-headset-mic-not-working.html">a bug with Microsoft's Linux app</a>. Luckily I don't use teams much.</li>
<li>There are two different music equaliser options - the normal one is fine, and the bassy one sounds muddled. I expect it's good if you're out in a noisy environment.</li>
<li>There is quite a lot of sound leakage. Because of the way these headsets work, you'll never get total sound isolation - so don't wear them on the train. Who am I kidding, you're going to be stuck inside forever.</li>
</ul>

<h2 id="verdict"><a href="https://shkspr.mobi/blog/2020/11/review-aftershokz-titanium-bone-conducting-headphones/#verdict">Verdict</a></h2>

<p>These aren't audiophile quality headphones - but that's not what you buy them for.</p>

<p>Once you get used to them, they're great. Pretty comfortable to wear, good battery life, and excellent voice quality - and you can still hear the doorbell ring.</p>

<p>They do take a little bit of getting used to. Bone conduction is a <em>weird</em> but effective way to get audio into your head. Some people's voices are <em>really</em> boomy, and these headphones exaggerate that.</p>

<p>Music playback is adequate for casual listening. If you stick the earplugs in your lugholes, the music quality increases. With the bass up, you can feel your skull gently rattling - it's like having your cheeks assaulted by a particularly rambunctious bumble-bee. And I mean that in a nice way!</p>

<p>If you can spare £70, I think they're brilliant.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=37138&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2020/11/review-aftershokz-titanium-bone-conducting-headphones/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Podcasts on Floppy Disk]]></title>
		<link>https://shkspr.mobi/blog/2020/09/podcasts-on-floppy-disk/</link>
					<comments>https://shkspr.mobi/blog/2020/09/podcasts-on-floppy-disk/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Sat, 05 Sep 2020 11:12:41 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[floppy]]></category>
		<category><![CDATA[opus]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=36490</guid>

					<description><![CDATA[An old 3.5 inch floppy disk holds 1.44 MB of data. According to my calculations, that&#039;s 1,424 KB blocks. For a total of 1,458,176 Bytes. Once formatted as FAT, you end up with 1,457,664 Bytes of storage.  But how much audio can a floppy hold?  (Here I mean wave based audio of human speech. It&#039;s trivial to fit more in using MIDI or speech synthesis.)  I&#039;m going to use &#34;A Podcast Of Unnecessary…]]></description>
										<content:encoded><![CDATA[<p>An old 3.5 inch floppy disk holds <code>1.44</code> MB of data. According to my calculations, that's <code>1,424</code> KB blocks. For a total of <code>1,458,176</code> Bytes. Once formatted as FAT, you end up with <code>1,457,664</code> Bytes of storage.  But how much <em>audio</em> can a floppy hold?</p>

<p>(Here I mean wave based audio of human speech. It's trivial to fit more in using MIDI or speech synthesis.)</p>

<p>I'm going to use "<a href="https://festivalofthespokennerd.com/podcast/">A Podcast Of Unnecessary Detail</a>" to experiment with, as this blogpost also has too much detail.  The podcast is a 39MB MP3, running just over half-an-hour.</p>

<p>Here's the first 40 seconds of the original MP3 file, so you can hear the music, and male and female voices.</p>

<audio controls="" style="width: 100%;">
  <source src="https://shkspr.mobi/blog/wp-content/uploads/2020/09/trim.mp3" type="audio/mp3">
</audio>

<p>That's about 800KB. A floppy can hold about a minute and a half of that quality audio.</p>

<h2 id="squash-it-down"><a href="https://shkspr.mobi/blog/2020/09/podcasts-on-floppy-disk/#squash-it-down">Squash it down</a></h2>

<p>A floppy disk holds about <code>11,000</code> Kilobits.  So, to hold 1,800 seconds (30 minutes) of audio, we need to encode audio at about 6kbps (Kilo<em>bits</em> per second)</p>

<p>By coincidence, the Opus audio format supports <a href="https://opus-codec.org/docs/opus-tools/opusenc.html#Encoding_options">encoding speech at around 6Kbps</a>.</p>

<p>Here's the same sample of the podcast bounced down to mono and encoded at 6Kbps.  The voices are pretty clear, but the music is extremely mushy. (The following files are in .opus format. They should play fine on <a href="https://caniuse.com/#search=opus">Android and most desktop browsers</a>).</p>

<audio controls="" style="width: 100%;">
  <source src="https://shkspr.mobi/blog/wp-content/uploads/2020/09/trim-6.opus" type="audio/ogg">
</audio>

<p>Encoded using <code>opusenc in.wav --downmix-mono --bitrate 6 out.opus</code></p>

<p>But that's still a little too big. The 33 minute podcast weighs in at <code>1,581,781</code> Bytes. Too large for a floppy.</p>

<p>Using the <code>--framesize</code> option, we can set the <a href="https://wiki.xiph.org/index.php?title=Opus_Recommended_Settings&amp;mobileaction=toggle_view_desktop#Framesize_Tweaking">Framesize</a> to 60 milliseconds. Not great for streaming, but we don't care about that, and it makes the files much smaller.</p>

<p>But <code>opusenc</code> has a few more tricks up its sleeve! Using <code>--cvbr</code> we can force the encoder never to go above a bitrate limit.</p>

<p>So, using <code>opusenc in.wav --downmix-mono --bitrate 6 --cvbr --framesize 60 out.opus</code> we can save 33 minutes, 8 seconds, in <code>1,422,676</code> Bytes. Enough space left over on a floppy disk for an image.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2020/09/Podcast-on-a-floppy-disk.jpg" alt="Podcast on a floppy disk." width="1024" height="576" class="alignleft size-full wp-image-36599">

<h2 id="but-wait-theres-more"><a href="https://shkspr.mobi/blog/2020/09/podcasts-on-floppy-disk/#but-wait-theres-more">But wait! There's more!</a></h2>

<p>Surprisingly, the <code>opusenc</code> documentation is not quite telling us the whole story! You can pass any number <em>lower</em> than 6 to <code>opusenc</code> and it will try its best.</p>

<p>In practice, the lowest bitrate it will generate for speech is about 4Kbps.  Here's the same sample:</p>

<audio controls="" style="width: 100%;">
  <source src="https://shkspr.mobi/blog/wp-content/uploads/2020/09/trim-4.opus" type="audio/ogg">
</audio>

<p><code>opusenc in.wav --downmix-mono --bitrate 4 out-4.opus</code></p>

<p>What's the <em>lowest</em> we can go? How low before we lose all meaning?</p>

<p>The absolutely lowest encoding which produced any sound at all was 1.2Kbps. I warn you, this sounds awful!</p>

<audio controls="" style="width: 100%;">
  <source src="https://shkspr.mobi/blog/wp-content/uploads/2020/09/trim-1.2-hard.opus" type="audio/ogg">
</audio>

<p><code>opusenc in.wav --downmix-mono --bitrate 1.2 --hard-cbr out-1.2-hard.opus</code></p>

<p>This uses the <a href="https://opus-codec.org/docs/opus-tools/opusenc.html#Encoding_options"><code>--hard-cbr</code></a> option which forces the encoder to a specific constant bitrate.</p>

<p>About the lowest you can go and still have things even vaguely intelligible was 2Kbps. Again, this sounds horrible, but it is just about possible to understand most of the speech. Even if they do sound like Daleks with low batteries!</p>

<audio controls="" style="width: 100%;">
  <source src="https://shkspr.mobi/blog/wp-content/uploads/2020/09/trim-2-hard.opus" type="audio/ogg">
</audio>

<p><code>opusenc in.wav --downmix-mono --bitrate 2 --hardcbr out-2-hard.opus</code></p>

<p>If you were prepared to have you audio that shitty, you can just about squeeze a full hour of speech onto an old floppy disk.</p>

<p>So, guess what tomorrow's blog post is going to be...?</p>

<h2 id="enjoyed-this-post"><a href="https://shkspr.mobi/blog/2020/09/podcasts-on-floppy-disk/#enjoyed-this-post">Enjoyed this post?</a></h2>

<p>If you like the silly things I do, you can say thanks by:</p>

<ul>
<li><a href="https://ko-fi.com/edent">Buying me a Ko-Fi</a></li>
<li><a href="https://github.com/sponsors/edent">Sponsoring me on GitHub</a></li>
<li><a href="https://www.amazon.co.uk/hz/wishlist/ls/13GFCFR2B2IX4?type=wishlist&amp;linkCode=sl2&amp;tag=shksprblogwish-21">Getting me a present from my Wishlist</a></li>
</ul>

<p>Or, just leave a supportive comment.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=36490&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2020/09/podcasts-on-floppy-disk/feed/</wfw:commentRss>
			<slash:comments>13</slash:comments>
		
		<enclosure url="https://shkspr.mobi/blog/wp-content/uploads/2020/09/trim.mp3" length="800764" type="audio/mpeg" />
<enclosure url="https://shkspr.mobi/blog/wp-content/uploads/2020/09/trim-6.opus" length="32045" type="audio/opus" />
<enclosure url="https://shkspr.mobi/blog/wp-content/uploads/2020/09/trim-4.opus" length="27084" type="audio/opus" />
<enclosure url="https://shkspr.mobi/blog/wp-content/uploads/2020/09/trim-1.2-hard.opus" length="9952" type="audio/opus" />
<enclosure url="https://shkspr.mobi/blog/wp-content/uploads/2020/09/trim-2-hard.opus" length="13954" type="audio/opus" />

			</item>
		<item>
		<title><![CDATA[Inside a £30 record player ★★★★☆]]></title>
		<link>https://shkspr.mobi/blog/2020/08/inside-a-30-record-player/</link>
					<comments>https://shkspr.mobi/blog/2020/08/inside-a-30-record-player/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Sun, 02 Aug 2020 11:58:24 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[gadget]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[vinyl]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=36086</guid>

					<description><![CDATA[I accidentally bought a load of vinyl records. So I decided to buy the cheapest, shittiest, turntable possible.  This is the E1372. Made by Jia Yin King Technologies.   This is sold under a variety of names and costs about £30 including postage from China.  It&#039;s a plastic shell, motor, and ADC (Analogue to Digital Converter), which is powered via USB.  It is the cheapest brand new player I could …]]></description>
										<content:encoded><![CDATA[<p><a href="https://shkspr.mobi/blog/2020/07/building-a-record-wall/">I accidentally bought a load of vinyl records</a>. So I decided to buy the cheapest, shittiest, turntable possible.</p>

<p>This is the E1372. Made by <a href="http://www.jiayinking.com/">Jia Yin King Technologies</a>.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2020/07/Crappy-record-player.jpg" alt="A crappy plastic record player photoshopped so it looks like it is in a rave." width="512" height="488" class="aligncenter size-full wp-image-36013"></p>

<p>This is sold under a variety of names and <a href="https://amzn.to/30ujDph">costs about £30 including postage from China</a>.</p>

<p>It's a plastic shell, motor, and ADC (Analogue to Digital Converter), which is powered via USB.  It is the cheapest brand new player I could find.  Here's a disassembly walkthough, an analysis of how well it works, and some Linux info.</p>

<h2 id="audio-quality"><a href="https://shkspr.mobi/blog/2020/08/inside-a-30-record-player/#audio-quality">Audio Quality</a></h2>

<p>Vinyl is not a great format for high-fidelity audio. The constant rotational velocity design means that the sound quality gets progressively worse towards the centre of the record. Most of my 1960s vinyl is designed to be played on <em>shitty</em> gramophones and through <em>abominable</em> speakers. Early Beatles music was specifically mastered to sound good on crackly AM radios and craptacular Dansette record players.</p>

<p>Anyone who says vinyl is better than a CD is a muppet.</p>

<p>That said, here's the opening of Sgt Pepper - the best goddamned record of all time - piped straight from USB and captured as mono audio wav.</p>

<p></p><figure class="audio">
	<figcaption>🔊</figcaption>
	
	<audio controls="" loading="lazy" src="https://shkspr.mobi/blog/wp-content/uploads/2020/07/sgt-pepper-mono-web.wav">
		<p>💾 <a href="https://shkspr.mobi/blog/wp-content/uploads/2020/07/sgt-pepper-mono-web.wav">Download this audio file</a>.</p>
	</audio>
</figure><p></p>

<p>I've not applied any volume correction, de-noising, or adjustment.  I think it sounds... You know what... That sounds pretty OK to me!</p>

<p>It also outputs stereo.
</p><figure class="audio">
	<figcaption>🔊</figcaption>
	
	<audio controls="" loading="lazy" src="https://shkspr.mobi/blog/wp-content/uploads/2020/07/Here-Comes-The-Sun-stereo-web.wav">
		<p>💾 <a href="https://shkspr.mobi/blog/wp-content/uploads/2020/07/Here-Comes-The-Sun-stereo-web.wav">Download this audio file</a>.</p>
	</audio>
</figure>
Listen to the pan on that!<p></p>

<p>The right channel is consistently louder than the left by a few dB.</p>

<p>I used my phone to measure the RPM - it seemed to be a few percent fast.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2020/07/rpm-graph.jpeg" alt="A graph showing variance in speed." width="680" height="523" class="aligncenter size-full wp-image-36097">
I have cloth-ears, so I can't really tell if music is pitched up.</p>

<h2 id="look-inside"><a href="https://shkspr.mobi/blog/2020/08/inside-a-30-record-player/#look-inside">Look Inside</a></h2>

<p>Flip it on the side, peel off the rubber feet to expose the screws.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2020/07/bottom.jpeg" alt="Bottom of a record player." width="1200" height="675" class="aligncenter size-full wp-image-36088">
Once those four are undone, the bottom slips off, revealing the guts.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2020/07/Inside.jpeg" alt="The guts of the player - it is mostly empty." width="900" height="506" class="aligncenter size-full wp-image-36089">
On the left, a thin switch which opens when the needle arm is sent back.
A motor at the bottom, belt driving the turntable,
And a <em>teeny</em> circuit board.
Wanna take a close up? Course you do!
<img src="https://shkspr.mobi/blog/wp-content/uploads/2020/07/phono.jpeg" alt="Soldered wires on a cirvuit board." width="900" height="467" class="aligncenter size-full wp-image-36090">
That's how the needle / cartridge is wired in. I was kinda hoping it would be socketed as I hate soldering / desoldering.
It uses a common earth, rather than separates.</p>

<p>Let's take a look at the main board.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2020/07/circuit-board.jpeg" alt="A circuit board." width="1200" height="977" class="aligncenter size-full wp-image-36091"></p>

<p>If you're searching for this board, it's labelled as <code>K-2217</code> <code>280-002217-101-10</code>.
Uses a H12000M crystal (I think). The VR151 in the centre adjusts the speed of the motor.</p>

<p>The main brains of the operation is this microchip.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2020/07/chip.jpeg" alt="A microchip." width="459" height="392" class="aligncenter size-full wp-image-36092">
Again, for keyword searchers, this is a JYK 2011C 123D1N942. I think. JYK - JiaYinKing - are the OEM who make all sorts of record players.</p>

<p>I'm <a href="https://twitter.com/noilsoncaio/status/1287025241265516544">told</a> that this is likely to be a <a href="https://www.ti.com/lit/ds/symlink/pcm2900.pdf">PCM2902E</a>. That's a common USB / Amp chip.</p>

<p>The motor is <em>also</em> JYK branded.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2020/07/motor.jpeg" alt="A small motor." width="680" height="459" class="aligncenter size-full wp-image-36093">
It says it is capable of 3 different speeds. 1130, 1520, 2360 RPM. Other models of this player have a 33/45 switch for playing different speeds of records. The ratio 1130:1520 is roughly the same as 33.3:45 I assume 2360 is for 78RPM records?
Keywords: <code>EG-53SD-3F</code></p>

<h2 id="linux-info"><a href="https://shkspr.mobi/blog/2020/08/inside-a-30-record-player/#linux-info">Linux Info</a></h2>

<p>The USB info is <code>2034:0105</code> - that's it.</p>

<p>Pulse detects it as a stereo input device, and Audacity happily recorded audio from it.
To playback through your computer speakers or Bluetooth, set the record player as your audio input and run:</p>

<pre><code class="language-bash">arecord -f cd - | aplay -
</code></pre>

<h2 id="verdict"><a href="https://shkspr.mobi/blog/2020/08/inside-a-30-record-player/#verdict">Verdict</a></h2>

<p><a href="https://amzn.to/30ujDph">For £30 including delivery</a>, it's pretty good! Sure, the sound output isn't audiophile quality, but you get phono output <em>and</em> USB out.  The speed is a bit wobbly, but probably no worse than an original 1960s player.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=36086&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2020/08/inside-a-30-record-player/feed/</wfw:commentRss>
			<slash:comments>10</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Review: OpenEar Trio Bluetooth headphones ★★★⯪☆]]></title>
		<link>https://shkspr.mobi/blog/2020/07/review-openear-trio-bluetooth-headphones/</link>
					<comments>https://shkspr.mobi/blog/2020/07/review-openear-trio-bluetooth-headphones/#respond</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Sat, 25 Jul 2020 11:30:22 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[bluetooth]]></category>
		<category><![CDATA[gadget]]></category>
		<category><![CDATA[review]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=36034</guid>

					<description><![CDATA[This is a curious set of headphones. The OpenEar Trio by Shenzen Alex Technology. They&#039;re completely flat and designed to sit outside the ears.    They&#039;re designed so you can hear your surroundings. If you&#039;re outside exercising, it&#039;s useful to hear cars creeping up on you. If you&#039;re on a conference call, being able to hear the doorbell ringing is essential.    These are super-lightweight. Once…]]></description>
										<content:encoded><![CDATA[<p>This is a curious set of headphones. The <a href="https://web.archive.org/web/20200924201521/https://www.alex-technology.com/openear-trio-directional-audio-headphones-p3.html">OpenEar Trio by Shenzen Alex Technology</a>. They're completely flat and designed to sit <em>outside</em> the ears.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2020/07/Imagepipe_8.jpg" alt="Completely flat earphones." width="512" height="512" class="aligncenter size-full wp-image-36036">

<p>They're designed so you can hear your surroundings. If you're outside exercising, it's useful to hear cars creeping up on you. If you're on a conference call, being able to hear the doorbell ringing is essential.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2020/07/Imagepipe_9.jpg" alt="Flat headphones sat outside my ears." width="512" height="512" class="aligncenter size-full wp-image-36035">

<p>These are super-lightweight. Once on, it's easy to forget you're wearing them. They're a discreet colour - rather than the garish dayglo sports headphones usually are</p>

<p>Like most modern Bluetooth devices, they're dead easy to pair with your laptop or phone. They connect quickly and the battery life seems excellent. They worked without a hitch on Linux.</p>

<p>Sound reproduction was excellent. Perfect stereo separation, no noticeable hiss on quiet passages, and a decent amount of volume.</p>

<p>Because it is open ear, there is a fair bit of sound leakage - so please don't wear them on a crowded bus or train.</p>

<p>The open nature also means you sacrifice bass. It's there, but not <em>very</em> thumpy.</p>

<p>Similarly, the maximum volume isn't excessive. But that's kinda the point - you <em>want</em> to be able to hear what's going on around you.</p>

<p>There's only one button - push to play, hold to toggle power state. You can't skip tracks, or do anything fancy. But then, you should be concentrating on your running, not fiddling with your headset.</p>

<p>Sadly, they're micro-USB. By now, I'd expect these to be USB-C.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2020/07/Imagepipe_7.jpg" alt="A micro USB port." width="512" height="512" class="aligncenter size-full wp-image-36037">
<a href="https://amzn.to/2WGAmVi">£24 from Amazon</a></p>

<p>You do get a little water-resistant flap for covering the port.</p>

<h1 id="verdict"><a href="https://shkspr.mobi/blog/2020/07/review-openear-trio-bluetooth-headphones/#verdict">Verdict</a></h1>

<p>These are great headphones for when you need to hear what's going on around you. Excellent for exercising outside and really good for endless conference calls.</p>

<p><a href="https://amzn.to/2WGAmVi">£24 from Amazon</a></p>

<p><ins datetime="2020-10-29T11:53:31+00:00">Update! They broke after a few months.</ins></p>

<blockquote class="social-embed" id="social-embed-1321774599047155713" lang="en" itemscope="" itemtype="https://schema.org/SocialMediaPosting"><header class="social-embed-header" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><a href="https://twitter.com/edent" class="social-embed-user" itemprop="url"><img class="social-embed-avatar social-embed-avatar-circle" src="data:image/webp;base64,UklGRkgBAABXRUJQVlA4IDwBAACQCACdASowADAAPrVQn0ynJCKiJyto4BaJaQAIIsx4Au9dhDqVA1i1RoRTO7nbdyy03nM5FhvV62goUj37tuxqpfpPeTBZvrJ78w0qAAD+/hVyFHvYXIrMCjny0z7wqsB9/QE08xls/AQdXJFX0adG9lISsm6kV96J5FINBFXzHwfzMCr4N6r3z5/Aa/wfEoVGX3H976she3jyS8RqJv7Jw7bOxoTSPlu4gNbfXYZ9TnbdQ0MNnMObyaRQLIu556jIj03zfJrVgqRM8GPwRoWb1M9AfzFe6Mtg13uEIqrTHmiuBpH+bTVB5EEQ3uby0C//XOAPJOFv4QV8RZDPQd517Khyba8Jlr97j2kIBJD9K3mbOHSHiQDasj6Y3forATbIg4QZHxWnCeqqMkVYfUAivuL0L/68mMnagAAA" alt="" itemprop="image"><div class="social-embed-user-names"><p class="social-embed-user-names-name" itemprop="name">Terence Eden is on Mastodon</p>@edent</div></a><img class="social-embed-logo" alt="" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCmFyaWEtbGFiZWw9IlR3aXR0ZXIiIHJvbGU9ImltZyIKdmlld0JveD0iMCAwIDUxMiA1MTIiPjxwYXRoCmQ9Im0wIDBINTEyVjUxMkgwIgpmaWxsPSIjZmZmIi8+PHBhdGggZmlsbD0iIzFkOWJmMCIgZD0ibTQ1OCAxNDBxLTIzIDEwLTQ1IDEyIDI1LTE1IDM0LTQzLTI0IDE0LTUwIDE5YTc5IDc5IDAgMDAtMTM1IDcycS0xMDEtNy0xNjMtODNhODAgODAgMCAwMDI0IDEwNnEtMTcgMC0zNi0xMHMtMyA2MiA2NCA3OXEtMTkgNS0zNiAxczE1IDUzIDc0IDU1cS01MCA0MC0xMTcgMzNhMjI0IDIyNCAwIDAwMzQ2LTIwMHEyMy0xNiA0MC00MSIvPjwvc3ZnPg=="></header><section class="social-embed-text" itemprop="articleBody">Three months of constant video calls have killed my little headphones!<br><a href="https://shkspr.mobi/blog/2020/07/review-openear-trio-bluetooth-headphones/">shkspr.mobi/blog/2020/07/r…</a><br>Time to replace? Or should I try taping it back together? <a href="https://twitter.com/edent/status/1321774599047155713/photo/1">pic.x.com/cbb4xboyar</a><div class="social-embed-media-grid"><a href="https://pbs.twimg.com/media/Elfi96CWoAAEgjJ.jpg" class="social-embed-media-link"><img class="social-embed-media" alt="A headphone ear bud snapped off. Being held on by a wire. " src="data:image/webp;base64,UklGRvonAABXRUJQVlA4IO4nAADQOAGdASqoAqgCPrVapU6nJS+ppJGZSfAWiWdulp/cvz+9Cxz7RnPKHBXhF/P3MSoVQ7sO20w2jXblfk/5w//k//OLbOT6P/J/NlbssZiwPc7iGL0Kgh+DNP55vw7fuYw+yftqKP/hBqPWP/Bs6RTs8/tlUCRMPyzsqJh+WdlRMPv8VpHvRmCvo/j+HepNDM3ZfBw4/SrcYiv3Zvkb1Q7YyYluCQMd9cqeGbXv9xWcbqNSEjm2Tky8Jy2cB5gE4wHotieRQc/R/eQ575TBHgO+EXKWv7OlPmDnHD+u2C1QLwMN6Y2FjERwKgg/L4FlI3WQgvRx/Lu55jD9AvfhNHoeeO8MUYxx88sw/Yun/5YpAglzMPyzuGOeIvTqc/bIpHsS2kvMYiMejV5goAP/YHtlzReHOm3uttNTm+7N1uLsF+drR23G/xJCwerB8w05jtmNNBtlX0PYJ1fyTd6Z+Ja8VUC+3ckP0qrbboilsDGZ5AKSYGd/FBPgrWF0zMIlHxxGi8fP+4+u/ZL48yp51vwHzCdrODedWVByHuOJMS3PCVdPYeyIJhZUWqZX0WBG9hPJbHzSmtTwFMjxerIziMpYvRHSiAp/SYcfxCcaNwNWoRCpX7TnMfDR2xsvRc5r3xD5/Um0qmy3rcfqoyHDQ70MYRgsgH0n5LFcHtjMDIWZ0iwCRoNzRLaTpEGGXkvixrxECiB5hUpvgC+YF/2yT9npfxkOyqoAzqm/MWphWEMVJ/9CAu4AnT0W3oZ3SGUhfQLYC5xRe5MrdRhSRtwebTN8DfNzjIUECRN8ts3NIm+PsLAQNq/Fxkm18e3ZHhardGx1QJBsFajaPdE4ajmJkX4fPA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3VYLOtUIdF0FOSTgJKBML06bfmPhM4K5sXsGXSUcQInKRnHFFwSXXNPMPMsyXl2PQ/uedSQs6+pbSDGvSYhvwFXOc55Mf7y9U4oweL+KnsTcu3bqrLQuAkbZZANsH4W9lNgELWsPzJ3p0wfebGigmfmQ5Buqg3MBx5STM4ggBt2eNElArKbw4Uv0pPn6LxxzPLfNjgixGV086NmQOFODq55S4QKgJoVk7nIx1nyJfKjPJMNjH2N9bP5Qi4TO1UbdgAg6r376yWugceapRxFUpgym/PfIIhN2iIqm0AJPRb5Wbm7FLOcdEKFtD7PZgkyQrTLdFoGhBpdLCpBFCSNxqyF4KyRX/wwbdFbG7ELNkIKdl9oo/xKpGKTU6MSxDpTm3vqM394SpJd30LpMo5J01HG8FfFzhFaGQIiHYSuV2Ld5LXf5jOH+RBqMAsZS4MuNZsZzf0d5WkDYZY4skpMjoOW8PaJAlMjUYFaUA/6w1hEna1jFO4astlAI1z833LhWY3hGVYVDYFc8X968J/RP20zJy+rSvJ5DQlNfh7FFowKsGW34bP0sy+0wrgcIDjKb3A46SIZAwpNk7WYNocnEx5THFTB5i7XrgydtzMvL1LdjpExcdSf3SkQCQCzml8ho+gtrho4t/BvYXxEkCrKi42eU0z6ohMD4uck0AhTdaYPa3reI2E8sQsohlzBIAFnvMr0lDF0g1FdOWLRbXy3mHZrYnKb2NACTlyezY/gl1ud3hn/R0eJe4vuF3aeAxch8cglBhcl3GwcNEl/pRKpaEhop53zxMly6VcO8JMrkJ4A86So7a7bB4qt+eNNxbDldT6E+zajD+qDYBQAJiNv8CHyf2DcDiyLF7ZvkgFkZrXgoqo4tFvCxLai3V6h+M8W3m2udby6qEASU75U59s9leFAA"></a></div></section><hr class="social-embed-hr"><footer class="social-embed-footer"><a href="https://twitter.com/edent/status/1321774599047155713" aria-label="0 likes" class="social-embed-meta">❤️ 0</a><a href="https://twitter.com/edent/status/1321774599047155713" aria-label="2 replies" class="social-embed-meta">💬 2</a><a href="https://twitter.com/edent/status/1321774599047155713" aria-label="0 retweets" class="social-embed-meta">♻️ 0</a><a href="https://twitter.com/edent/status/1321774599047155713"><time datetime="2020-10-29T11:23:16.000Z" itemprop="datePublished">11:23 - Thu 29 October 2020</time></a></footer></blockquote>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=36034&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2020/07/review-openear-trio-bluetooth-headphones/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Review: Yanmai USB Microphone]]></title>
		<link>https://shkspr.mobi/blog/2020/06/review-yanmai-usb-microphone/</link>
					<comments>https://shkspr.mobi/blog/2020/06/review-yanmai-usb-microphone/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Sun, 21 Jun 2020 11:08:58 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[gadget]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[USB]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=35415</guid>

					<description><![CDATA[We&#039;re in the age of endless conference calls. So I decided to spruce up my audio hardware. Sadly, I don&#039;t have the budget for a professional podcaster&#039;s microphone. Luckily, I was sent this cheapo model to review. And, I&#039;m pleased to say, it&#039;s pretty good!  Comes with a reasonably long USB cord, and a pop-shield.   The mic is suspended in a little elastic harness so it doesn&#039;t pick up vibrations. …]]></description>
										<content:encoded><![CDATA[<p>We're in the age of endless conference calls. So I decided to spruce up my audio hardware. Sadly, I don't have the budget for a professional podcaster's microphone. Luckily, I was sent this cheapo model to review. And, I'm pleased to say, it's pretty good!</p>

<p>Comes with a reasonably long USB cord, and a pop-shield.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2020/06/mic3.jpeg" alt="A microphone with a pop shield." width="1280" height="960" class="aligncenter size-full wp-image-35416"></p>

<p>The mic is suspended in a little elastic harness so it doesn't pick up vibrations.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2020/06/mic2.jpeg" alt="A mic in an elastic harness." width="1280" height="960" class="aligncenter size-full wp-image-35417"></p>

<p>It's fully adjustable - which is nice. And a has a removable spoffle.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2020/06/mic1.jpeg" alt="An upright microphone." width="960" height="1280" class="aligncenter size-full wp-image-35418"></p>

<p>There's no LED to show if it's on, and no mute button. But those are minor downsides.</p>

<h2 id="audio-samples"><a href="https://shkspr.mobi/blog/2020/06/review-yanmai-usb-microphone/#audio-samples">Audio samples</a></h2>

<p>Here's my voice, right up close to the mic, unamplified.
</p><figure class="audio">
	<figcaption>🔊</figcaption>
	
	<audio controls="" loading="lazy" src="https://shkspr.mobi/blog/wp-content/uploads/2020/06/Voicetest.mp3">
		<p>💾 <a href="https://shkspr.mobi/blog/wp-content/uploads/2020/06/Voicetest.mp3">Download this audio file</a>.</p>
	</audio>
</figure><p></p>

<p>I stuck the mic out of the window to capture the birdsong. I've amplified it because the birds were quite far away, so there's a bit of background hiss.
</p><figure class="audio">
	<figcaption>🔊</figcaption>
	
	<audio controls="" loading="lazy" src="https://shkspr.mobi/blog/wp-content/uploads/2020/06/Birdsong.mp3">
		<p>💾 <a href="https://shkspr.mobi/blog/wp-content/uploads/2020/06/Birdsong.mp3">Download this audio file</a>.</p>
	</audio>
</figure><p></p>

<p>I'm impressed with that! I'm sure all you proper audio geek and audiophiles are aghast at its lack of a gold-plated crosstalk suppression matrix. But it does the job for me.</p>

<h2 id="linux-support"><a href="https://shkspr.mobi/blog/2020/06/review-yanmai-usb-microphone/#linux-support">Linux support</a></h2>

<p>Like most audio hardware, it works perfectly on Linux. Shows up as <code>0d8c:0134</code>. PulseAudio picked it up instantly. Worked in native programs like Audacity, and web conference calls.</p>

<p>Now to find a podcast that wants me as a guest!</p>

<h2 id="buy-it"><a href="https://shkspr.mobi/blog/2020/06/review-yanmai-usb-microphone/#buy-it">Buy it</a></h2>

<p><a href="https://amzn.to/30gswEj">Cost £45 from Amazon</a></p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=35415&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2020/06/review-yanmai-usb-microphone/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Wanted - audio output based on screen output for Linux]]></title>
		<link>https://shkspr.mobi/blog/2020/06/wanted-audio-output-based-on-screen-output-for-linux/</link>
					<comments>https://shkspr.mobi/blog/2020/06/wanted-audio-output-based-on-screen-output-for-linux/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Mon, 15 Jun 2020 11:51:10 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[usability]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=35268</guid>

					<description><![CDATA[I think what I&#039;m asking for is impossible...  I have a Linux laptop with built in speakers and an external monitor with speakers. The laptop connects to the screen via HDMI.  I have my Linux desktop set up for dual screens.  If I drag a window from one screen to the other, I want the sound to follow the window.  Is this possible?  A bit more detail  When I have YouTube running on my monitor, I…]]></description>
										<content:encoded><![CDATA[<p>I think what I'm asking for is impossible...</p>

<p>I have a <a href="https://shkspr.mobi/blog/2020/05/review-clevo-n151cu-lafite-iv-system76-darter-pro-entroware-proteus/">Linux laptop</a> with built in speakers and an <a href="https://shkspr.mobi/blog/2020/04/review-iiyama-prolite-b2482hs-b1-24-vertical-monitor/">external monitor</a> with speakers. The laptop connects to the screen via HDMI.  I have my Linux desktop set up for dual screens.</p>

<p>If I drag a window from one screen to the other, I want the sound to follow the window.</p>

<p>Is this possible?</p>

<h2 id="a-bit-more-detail"><a href="https://shkspr.mobi/blog/2020/06/wanted-audio-output-based-on-screen-output-for-linux/#a-bit-more-detail">A bit more detail</a></h2>

<p>When I have YouTube running on my monitor, I want the sound to come from the monitor.</p>

<p>When I have a video conference running on my laptop screen, I want the sound to come from the laptop's speakers.</p>

<p>POP!_OS running Wayland gives me the option to set the default audio output.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2020/06/Screenshot-from-2020-06-04-15-13-44.png" alt="OS displaying a long list of options." width="632" height="584" class="aligncenter size-full wp-image-35272">

<p>Some apps - mostly video conference apps - let me select the audio output of that app. So I can set the output to my headphones or screen or laptop or Bluetooth speakers or the misconfigured Smart TV next door.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2020/06/Screenshot-from-2020-06-04-17-15-21.png" alt="Microsoft Teams lets me choose headset or built in audio device." width="572" height="201" class="aligncenter size-full wp-image-35270">

<img src="https://shkspr.mobi/blog/wp-content/uploads/2020/06/Screenshot-from-2020-06-04-15-15-17.png" alt="Google Meet lets me choose default, HDMI, or headphones." width="821" height="361" class="aligncenter size-full wp-image-35271">

<h2 id="is-this-actually-what-i-want"><a href="https://shkspr.mobi/blog/2020/06/wanted-audio-output-based-on-screen-output-for-linux/#is-this-actually-what-i-want">Is this <em>actually</em> what I want?</a></h2>

<p>My laptop usually has a wired headset and a Bluetooth headset connected - along with the built in speakers.  What I <em>really</em> want is for my webcam to notice what headset I'm wearing and route audio to that. If I'm not wearing headphones, notice which screen I'm looking at and route audio that way.  Except when I'm playing music on one screen and working on a document on a different screen.</p>

<p>Butler.  I want a human butler to surreptitiously readjust the sound output based on my subconscious whims.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=35268&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2020/06/wanted-audio-output-based-on-screen-output-for-linux/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Removing default metadata from .opus files]]></title>
		<link>https://shkspr.mobi/blog/2020/04/removing-default-metadata-from-opus-files/</link>
					<comments>https://shkspr.mobi/blog/2020/04/removing-default-metadata-from-opus-files/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Fri, 24 Apr 2020 11:03:00 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[metadata]]></category>
		<category><![CDATA[ogg]]></category>
		<category><![CDATA[opus]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=34763</guid>

					<description><![CDATA[I&#039;m trying to create some ridiculously tiny audio files. The sort where every single byte matters.  I&#039;ve encoded a small sample. But the opusenc tool automatically adds metadata - even if you don&#039;t specify any.  Using the amazing Mutagen Python library I was able to completely strip out all the metadata!  import mutagen mutagen.File(&#34;example.opus&#34;).delete()   It edits the file immediately - so be …]]></description>
										<content:encoded><![CDATA[<p>I'm trying to create some ridiculously tiny audio files. The sort where every single byte matters.</p>

<p>I've encoded a small sample. But the <code>opusenc</code> tool automatically adds metadata - even if you don't specify any.</p>

<p>Using the amazing <a href="https://mutagen.readthedocs.io/en/latest/">Mutagen Python library</a> I was able to completely strip out <em>all</em> the metadata!</p>

<pre><code class="language-python">import mutagen
mutagen.File("example.opus").delete()
</code></pre>

<p>It edits the file <strong>immediately</strong> - so be careful!</p>

<p>But what is it actually doing? I wanted to understand a bit more - so let's go hex diving!</p>

<h2 id="what-the-user-sees"><a href="https://shkspr.mobi/blog/2020/04/removing-default-metadata-from-opus-files/#what-the-user-sees">What the user sees</a></h2>

<p>Running <code>opusinfo example.opus</code> gives:</p>

<pre><code class="language-_">New logical stream (#1, serial: 03fe3cc9): type opus
Encoded with libopus 1.3.1, libopusenc 0.2.1
User comments section follows...
    ENCODER=opusenc from opus-tools 0.2
    ENCODER_OPTIONS=--bitrate 6 --comp 10 --framesize 60 --padding 0
Opus stream 1:
    ...
Logical stream 1 ended
</code></pre>

<p>There are two "mandatory" comments. The ENCODER and the ENCODER_OPTIONS.
I can't find a way to stop those being generated by <code>opusenc</code>.</p>

<p>The <a href="https://opus-codec.org/docs/opusfile_api-0.7/structOpusTags.html">Opus File API</a> gives some idea about the binary structure of the file.</p>

<p>But the real magic happens in the <a href="https://tools.ietf.org/html/rfc7845.html#section-5.2">Opus Forumat Specification RFC</a>. It details the header format in 32 bit clumps.</p>

<pre><code class="language-_">      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |      'O'      |      'p'      |      'u'      |      's'      |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |      'T'      |      'a'      |      'g'      |      's'      |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                     Vendor String Length                      |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                                                               |
     :                        Vendor String...                       :
     |                                                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                   User Comment List Length                    |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                 User Comment #0 String Length                 |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                                                               |
     :                   User Comment #0 String...                   :
     |                                                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                 User Comment #1 String Length                 |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     :                                                               :

</code></pre>

<p>Let's take a look at our file in binary, jumping straight to the comment section.</p>

<pre><code class="language-_">0000004b: 4f70 7573  Opus
0000004f: 5461 6773  Tags
</code></pre>

<p>Starts as expected. Next is the Vendor String Length</p>

<pre><code class="language-_">00000053: 1f00 0000  ....
</code></pre>

<p>0x1f is 31 bytes. This is a 32 bit, unsigned, <a href="https://en.wikipedia.org/wiki/Endianness">little endian number</a>. Hence it is written as <code>1f00</code> which becomes <code>00001f</code>.</p>

<pre><code class="language-_">00000057: 6c69 626f  libo
0000005b: 7075 7320  pus 
0000005f: 312e 332e  1.3.
00000063: 312c 206c  1, l
00000067: 6962 6f70  ibop
0000006b: 7573 656e  usen
0000006f: 6320 302e  c 0.
00000073: 322e 31    2.1
</code></pre>

<p>According to the spec, no terminating null octet is necessary. So the next bytes are the User Comment List Length.  Continuing on from the previous line:</p>

<pre><code class="language-_">00000073:        02     .
00000077: 0000 00    ...
</code></pre>

<p>There are two comments (again, 32 bit little endian).</p>

<blockquote><p>This field indicates the number of user-supplied comments.  It MAY indicate there are zero user-supplied comments, in which case there are no additional fields in the packet.</p></blockquote>

<p>This means we <em>can</em> have an empty comment section! This is what you get by default:</p>

<pre><code class="language-_">00000077:        23  ...#
0000007b: 0000 00    ...
</code></pre>

<p>First string length is 0x23 = 35 bytes long. Again, little endian.</p>

<pre><code class="language-_">0000007e: 454e 434f  ENCO
00000082: 4445 523d  DER=
00000086: 6f70 7573  opus
0000008a: 656e 6320  enc 
0000008e: 6672 6f6d  from2
00000092: 206f 7075   opu
00000096: 732d 746f  s-to
0000009a: 6f6c 7320  ols 
0000009e: 302e 3240  0.2@
</code></pre>

<p>After exactly 35 bytes, we get our next little endian number 0x40 = 64.</p>

<pre><code class="language-_">000000a1: 4000 0000  @...
000000a5: 454e 434f  ENCO
000000a9: 4445 525f  DER_
000000ad: 4f50 5449  OPTI
000000b1: 4f4e 533d  ONS=
000000b5: 2d2d 6269  --bi
000000b9: 7472 6174  trat
000000bd: 6520 3620  e 6 
000000c1: 2d2d 636f  --co
000000c5: 6d70 2031  mp 1
000000c9: 3020 2d2d  0 --
000000cd: 6672 616d  fram
000000d1: 6573 697a  esiz
000000d5: 6520 3630  e 60
000000d9: 202d 2d70   --p
000000dd: 6164 6469  addi
000000e1: 6e67 2030  ng 0
</code></pre>

<p>And that's the end of the comment section!</p>

<h2 id="manually-editing-the-file"><a href="https://shkspr.mobi/blog/2020/04/removing-default-metadata-from-opus-files/#manually-editing-the-file">Manually editing the file</a></h2>

<p>I started by setting the User Comment List Length to zero, and removing all the subsequent comment data. That didn't work. <code>opusinfo</code> gave the following errors:</p>

<pre><code class="language-_">WARNING: Hole in data (28 bytes) found at approximate offset 1492 bytes. Corrupted Ogg.
WARNING: Hole in data (51 bytes) found at approximate offset 1492 bytes. Corrupted Ogg.
WARNING: sequence number gap in stream 1. Got page 2 when expecting page 1. Indicates missing data.
WARNING: discontinuity in stream (1)
</code></pre>

<p><a href="https://tools.ietf.org/html/rfc7845.html#section-3">Back to the documentation</a>!</p>

<blockquote><p>An Ogg Opus stream is organized as follows (see Figure 1 for an example).</p></blockquote>

<pre><code class="language-_">        Page 0         Pages 1 ... n        Pages (n+1) ...
     +------------+ +---+ +---+ ... +---+ +-----------+ +---------+ +--
     |            | |   | |   |     |   | |           | |         | |
     |+----------+| |+-----------------+| |+-------------------+ +-----
     |||ID Header|| ||  Comment Header || ||Audio Data Packet 1| | ...
     |+----------+| |+-----------------+| |+-------------------+ +-----
     |            | |   | |   |     |   | |           | |         | |
     +------------+ +---+ +---+ ... +---+ +-----------+ +---------+ +--
     ^      ^                           ^
     |      |                           |
     |      |                           Mandatory Page Break
     |      |
     |      ID header is contained on a single page
     |
     'Beginning Of Stream'

    Figure 1: Example Packet Organization for a Logical Ogg Opus Stream
</code></pre>

<blockquote><p>There are two mandatory header packets.  The first packet in the logical Ogg bitstream MUST contain the identification (ID) header, which uniquely identifies a stream as Opus audio.  The format of this header is defined in Section 5.1.  It is placed alone (without any other packet data) on the first page of the logical Ogg bitstream and completes on that page.  This page has its 'beginning of stream' flag set.</p>

<p>The second packet in the logical Ogg bitstream MUST contain the comment header, which contains user-supplied metadata.  The format of this header is defined in Section 5.2.  It MAY span multiple pages, beginning on the second page of the logical stream.  However many pages it spans, the comment header packet MUST finish the page on which it completes.</p></blockquote>

<p>I tried saying there was one comment, with a length of zero and a null comment. That didn't work either.</p>

<p>I think this is because <em>before</em> the start of the comment header there is something describing how long the packet will be.</p>

<h2 id="headers"><a href="https://shkspr.mobi/blog/2020/04/removing-default-metadata-from-opus-files/#headers">Headers</a></h2>

<p>Here are the headers from the original file, and the one stripped by Mutagen.</p>

<h3 id="original-header"><a href="https://shkspr.mobi/blog/2020/04/removing-default-metadata-from-opus-files/#original-header">Original Header</a></h3>

<pre><code class="language-_">00000000: 4f67 6753 0002 0000  OggS....
00000008: 0000 0000 0000 c93c  .......&lt;
00000010: fe03 0000 0000 f90e  ........
00000018: f775 0113 4f70 7573  .u..Opus
00000020: 4865 6164 0101 3801  Head..8.
00000028: 80bb 0000 0000 004f  .......O
00000030: 6767 5300 0000 0000  ggS.....
00000038: 0000 0000 00c9 3cfe  ......&lt;.
00000040: 0301 0000 0035 dfaf  .....5..
00000048: 0601 9a4f 7075 7354  ...OpusT
00000050: 6167 731f 0000 006c  ags....l
00000058: 6962 6f70 7573 2031  ibopus 1
</code></pre>

<h3 id="stripped-header"><a href="https://shkspr.mobi/blog/2020/04/removing-default-metadata-from-opus-files/#stripped-header">Stripped Header</a></h3>

<pre><code class="language-_">00000000: 4f67 6753 0002 0000  OggS....
00000008: 0000 0000 0000 c93c  .......&lt;
00000010: fe03 0000 0000 f90e  ........
00000018: f775 0113 4f70 7573  .u..Opus
00000020: 4865 6164 0101 3801  Head..8.
00000028: 80bb 0000 0000 004f  .......O
00000030: 6767 5300 0000 0000  ggS.....
00000038: 0000 0000 00c9 3cfe  ......&lt;.
00000040: 0301 0000 00ae 941c  ........
00000048: 4e01 2f4f 7075 7354  N./OpusT
00000050: 6167 731f 0000 006c  ags....l
00000058: 6962 6f70 7573 2031  ibopus 1
</code></pre>

<h3 id="the-difference"><a href="https://shkspr.mobi/blog/2020/04/removing-default-metadata-from-opus-files/#the-difference">The Difference</a></h3>

<pre><code class="language-_">Original                                  Stripped
00000040: 0301 0000 0035 dfaf  .....5.. | 00000040: 0301 0000 00ae 941c  ........
00000048: 0601 9a4f 7075 7354  ...OpusT | 00000048: 4e01 2f4f 7075 7354  N./OpusT
</code></pre>

<p>So, something is happening in bytes 45 - 50. But what?</p>

<blockquote><p>A page is a header of 26 bytes, followed by the length of the data, followed by the data. The constructor is givin a file-like object pointing to the start of an Ogg page. After the constructor is finished it is pointing to the start of the next page</p>

<p><a href="https://github.com/quodlibet/mutagen/blob/master/mutagen/ogg.py#L35">Mutagen Source Code</a></p></blockquote>

<p>Unfortunately, my brain freezes up when I see things like</p>

<pre><code class="language-python">header = struct.unpack('&lt;4sBBqIIiB', header_data)
</code></pre>

<p>But the code does point to the <a href="https://wiki.xiph.org/Ogg#Ogg_page_format">Ogg page format specification</a>.</p>

<blockquote><p>The LSb (least significant bit) comes first in the Bytes. Fields with more than one byte length are encoded LSB (least significant byte) first.</p></blockquote>

<pre><code class="language-_">  0                   1                   2                   3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1| Byte
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | capture_pattern: Magic number for page start "OggS"           | 0-3
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | version       | header_type   | granule_position              | 4-7
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               | 8-11
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                               | bitstream_serial_number       | 12-15
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                               | page_sequence_number          | 16-19
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                               | CRC_checksum                  | 20-23
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                               | page_segments | segment_table | 24-27
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | ...                                                           | 28-
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</code></pre>

<p>So, it is the CRC Checksum which is different.  The <a href="https://xiph.org/vorbis/doc/framing.html">Vorbis framing documentation</a> has a brief description of how the CRC is calculated - but the full documentation 404s.</p>

<h2 id="conclusion"><a href="https://shkspr.mobi/blog/2020/04/removing-default-metadata-from-opus-files/#conclusion">Conclusion</a></h2>

<p>Hand editing binary files is for mugs.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=34763&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2020/04/removing-default-metadata-from-opus-files/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Bouncing all my music down to Opus]]></title>
		<link>https://shkspr.mobi/blog/2020/01/bouncing-all-my-music-down-to-opus/</link>
					<comments>https://shkspr.mobi/blog/2020/01/bouncing-all-my-music-down-to-opus/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Sun, 26 Jan 2020 18:00:06 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[opus]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=33686</guid>

					<description><![CDATA[As much as technology marches forward, there are two truths I need to accept.   File transfer speeds are always going to be slower that I can be bothered to wait My ears aren&#039;t going to get any better at hearing   For years, I ripped all of my music as FLAC. I collected ridiculously high-resolution audio files. I devoured disk drive space for surround sound soundtracks.  &#34;One day,&#34; I thought,…]]></description>
										<content:encoded><![CDATA[<p>As much as technology marches forward, there are two truths I need to accept.</p>

<ol>
<li>File transfer speeds are always going to be slower that I can be bothered to wait</li>
<li>My ears aren't going to get any better at hearing</li>
</ol>

<p>For years, I ripped all of my music as FLAC. I collected ridiculously high-resolution audio files. I devoured disk drive space for surround sound soundtracks.</p>

<p>"One day," I thought, "I'll have an amazing audio system to play these back on."</p>

<p>The reality is that I spend most of my time listening to music on <a href="https://shkspr.mobi/blog/2020/01/usb-c-powered-bluetooth-headphones-the-life-q10-from-anker/">£40 bluetooth headphones</a>.  I have a nice 5.1 surround sound system - but it isn't exactly THX certified. And, thanks to the construction of British houses, I can't turn it up to 11 without my neighbours complaining.</p>

<p>Yesterday, as I was waiting for a couple of GB of new music to fly through the aether to my phone, I was struck by a realisation...</p>

<p>I am not an archivist.</p>

<p>I don't need to preserve all my commercially-bought music in the highest resolution possible. It isn't my job to faithfully preserve every ultrasonic decibel. And I am <em>never</em> going to own a set of speakers which will super-charge my old ears.</p>

<p>It's OK to bounce my music down to a <em>more convenient</em> file format.</p>

<h2 id="enter-opus"><a href="https://shkspr.mobi/blog/2020/01/bouncing-all-my-music-down-to-opus/#enter-opus">Enter Opus</a></h2>

<p>I've written before <a href="https://shkspr.mobi/blog/tag/opus/">about the Opus file format</a>. It's the modern and open successor to MP3. It isn't lossless - but I've compared the quality, and I can't hear a damned difference.</p>

<p>Turns out, <a href="https://wiki.hydrogenaud.io/index.php?title=Hydrogenaudio_Listening_Tests">everyone agrees with me</a>.  Even at <a href="https://listening-test.coresv.net/results.htm">extremely low bitrates</a> it is superior to every other format.</p>

<p>Opus plays back natively on Android, it supports all the normal music metadata / IDv3 tags, and <a href="https://people.xiph.org/~xiphmont/demo/opus/demo3.shtml">works perfectly with surround sound</a>. The codec and tools are Open Source and Linux friendly.</p>

<p>And, best of all, it's small!  Even when I encode at the maximum possible bitrate (I'm not a <em>total</em> savage!) an hour of 5.1 audio is about 20% of the size of FLAC.</p>

<p>I know I could buy a bigger disk. But while home storage is relatively cheap, mobile storage is still expensive. Yes, WiFi 6 will make everything better - but I don't <em>need</em> to fling gigabytes through the air to my tin ears.</p>

<p>So, from now on, everything is getting run through:
<code>opusenc --bitrate 1536 in.flac out.opus</code></p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=33686&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2020/01/bouncing-all-my-music-down-to-opus/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[USB-C powered Bluetooth Headphones - the Life Q10 from Anker]]></title>
		<link>https://shkspr.mobi/blog/2020/01/usb-c-powered-bluetooth-headphones-the-life-q10-from-anker/</link>
					<comments>https://shkspr.mobi/blog/2020/01/usb-c-powered-bluetooth-headphones-the-life-q10-from-anker/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Wed, 01 Jan 2020 12:08:17 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[bluetooth]]></category>
		<category><![CDATA[gadget]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[tech]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=33476</guid>

					<description><![CDATA[I&#039;ve been waiting for these for a long time.  Terence Eden is on Mastodon@edent#LazyWeb can anyone find me some Bluetooth headphones which recharge via USB-C.All the C ones I&#039;ve found are wired.❤️ 0💬 3🔁 017:18 - Fri 04 November 2016  Anker, through its sub-brand SoundCore - have released the &#34;Life Q10&#34; headphones. They&#039;re usually about £45 - but Amazon had an instant coupon which took them down to…]]></description>
										<content:encoded><![CDATA[<p>I've been waiting for these for a long time.</p>

<blockquote class="social-embed" id="social-embed-794589697561468928" lang="en" itemscope="" itemtype="https://schema.org/SocialMediaPosting"><header class="social-embed-header" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><a href="https://twitter.com/edent" class="social-embed-user" itemprop="url"><img class="social-embed-avatar social-embed-avatar-circle" src="data:image/webp;base64,UklGRkgBAABXRUJQVlA4IDwBAACQCACdASowADAAPrVQn0ynJCKiJyto4BaJaQAIIsx4Au9dhDqVA1i1RoRTO7nbdyy03nM5FhvV62goUj37tuxqpfpPeTBZvrJ78w0qAAD+/hVyFHvYXIrMCjny0z7wqsB9/QE08xls/AQdXJFX0adG9lISsm6kV96J5FINBFXzHwfzMCr4N6r3z5/Aa/wfEoVGX3H976she3jyS8RqJv7Jw7bOxoTSPlu4gNbfXYZ9TnbdQ0MNnMObyaRQLIu556jIj03zfJrVgqRM8GPwRoWb1M9AfzFe6Mtg13uEIqrTHmiuBpH+bTVB5EEQ3uby0C//XOAPJOFv4QV8RZDPQd517Khyba8Jlr97j2kIBJD9K3mbOHSHiQDasj6Y3forATbIg4QZHxWnCeqqMkVYfUAivuL0L/68mMnagAAA" alt="" itemprop="image"><div class="social-embed-user-names"><p class="social-embed-user-names-name" itemprop="name">Terence Eden is on Mastodon</p>@edent</div></a><img class="social-embed-logo" alt="Twitter" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0Aaria-label%3D%22Twitter%22%20role%3D%22img%22%0AviewBox%3D%220%200%20512%20512%22%3E%3Cpath%0Ad%3D%22m0%200H512V512H0%22%0Afill%3D%22%23fff%22%2F%3E%3Cpath%20fill%3D%22%231d9bf0%22%20d%3D%22m458%20140q-23%2010-45%2012%2025-15%2034-43-24%2014-50%2019a79%2079%200%2000-135%2072q-101-7-163-83a80%2080%200%200024%20106q-17%200-36-10s-3%2062%2064%2079q-19%205-36%201s15%2053%2074%2055q-50%2040-117%2033a224%20224%200%2000346-200q23-16%2040-41%22%2F%3E%3C%2Fsvg%3E"></header><section class="social-embed-text" itemprop="articleBody"><a href="https://twitter.com/hashtag/LazyWeb">#LazyWeb</a> can anyone find me some Bluetooth headphones which recharge via USB-C.<br><br>All the C ones I've found are wired.</section><hr class="social-embed-hr"><footer class="social-embed-footer"><a href="https://twitter.com/edent/status/794589697561468928"><span aria-label="0 likes" class="social-embed-meta">❤️ 0</span><span aria-label="3 replies" class="social-embed-meta">💬 3</span><span aria-label="0 reposts" class="social-embed-meta">🔁 0</span><time datetime="2016-11-04T17:18:41.000Z" itemprop="datePublished">17:18 - Fri 04 November 2016</time></a></footer></blockquote>

<p>Anker, through its sub-brand SoundCore - have released the "Life Q10" headphones. They're <a href="https://amzn.to/2QybTxm">usually about £45</a> - but Amazon had an instant coupon which took them down to £33. Bargain!</p>

<p>They're exactly what I want in over-ear headphones. They're large enough for my flappy ears, USB-C charging, and an optional aux port.  They fold down for storage.  And they're cheap!</p>

<h2 id="what-you-get"><a href="https://shkspr.mobi/blog/2020/01/usb-c-powered-bluetooth-headphones-the-life-q10-from-anker/#what-you-get">What you get</a></h2>

<p>A bog standard USB-A to USB-C cable, about 60cm long. A 100cm long phono cable. And a brief manual. There's no carrying case.</p>

<h2 id="what-works"><a href="https://shkspr.mobi/blog/2020/01/usb-c-powered-bluetooth-headphones-the-life-q10-from-anker/#what-works">What works</a></h2>

<p>Everything! Pared instantly with my Android phone. Clear crisp music. The "Bass Up" function is terrifyingly thumpy. The volume goes loud without too much distortion. Even at a quiet volume, things are legible.</p>

<p>Bluetooth controls are instant to respond - play, pause, track skip, and volume.  I don't use a voice assistant - but it apparently supports that.  USB-C charging is stupidly fast.  Promising 5 hours listening for 5 minutes of charging. The manual indicates that it will fully charge in 2 hours - giving you a ridiculous 60 hours of listening.</p>

<p>The battery came partly charged, and a few minutes of power gave it a substantial boost according to the Bluetooth battery monitor. I've not managed to listen to 60 minutes of music on it, but a good couple of hours of podcasts has only dropped the battery a few percentage points.</p>

<p>Call audio quality was fine. Even on an HD voice call, you're still limited to a fairly low bandwidth connection.</p>

<p>The cans are tight enough not to let out too much sound, but loose enough to be comfortable on a long conference call. There's no noise-cancellation, but outside noises don't intrude once the volume is up.</p>

<p>They play a daft little tune when you turn them on or off. It also speaks the battery level which is useful.</p>

<p>If you plug in the 3.5mm aux cable, you can use them as passive headphones. You don't need to power them on. In fact, the power button is disabled while the cable is plugged in.</p>

<p>But, it's not all sunshine and roses. For under £50 you can't expect miracles.</p>

<h2 id="bugs"><a href="https://shkspr.mobi/blog/2020/01/usb-c-powered-bluetooth-headphones-the-life-q10-from-anker/#bugs">Bugs</a></h2>

<p>Here's a list of the minor annoyances I've found.</p>

<p>Press the bass-boost button once, and a posh English voice says "Bass up". But press it again and a tinny American voice says "Normal". Indicates a lack of testing and quality assurance.</p>

<p>There's a slight background hiss. You'll only notice it when the music has stopped. It doesn't interfere with your listening - and is no worse than other devices.</p>

<p>Can't play while charging. This was a weird one, they charge quickly enough for it not to be a major concern.</p>

<p>Doesn't do USB Audio. The C port is <em>just</em> for charging. To be fair, it doesn’t claim otherwise.</p>

<p>The box says "High-Res Audio" - that's, politely, an exaggeration. It supports the AAC codec. There's no <a href="https://blog.son-video.com/en/2019/08/bluetooth-hd-aptx-sbc-aac-ldac-what-you-need-to-know-in-2019/">aptX or lossless codecs</a>. It's better than the bare minimum SBC, but that's about it. Listen to the music, not the headphones right?</p>

<h2 id="firmware-upgrades"><a href="https://shkspr.mobi/blog/2020/01/usb-c-powered-bluetooth-headphones-the-life-q10-from-anker/#firmware-upgrades">Firmware upgrades</a></h2>

<p>Rather prominently, the Amazon listing says "This product is not currently compatible with iPhone 11 series, but is being upgraded."</p>

<p><code>lsusb</code> doesn't show anything. I would have expected <em>something</em> to show up for firmware updates. Sadly, the <a href="https://www.soundcore.com/uk/update-firmware">SoundCore website lists no firmware updates for anything</a>.</p>

<p>Which leads us on to the last problem: the Q10 <strong>doesn't exist</strong>.</p>

<p>There's nothing on the SoundCore pages about it. Nothing on Anker. The headphones physically exist - but they seem completely unsupported by the manufacturer. That's not a huge problem, I guess. But a bit odd.</p>

<h2 id="verdict"><a href="https://shkspr.mobi/blog/2020/01/usb-c-powered-bluetooth-headphones-the-life-q10-from-anker/#verdict">Verdict</a></h2>

<p>I bought these because they were the only reasonably priced headphones to support USB-C charging. Now my phone, eReader, games console, and laptop all take the same charger.</p>

<p>For forty-odd quid, these are stunning. Great sound quality, comfortable, long lasting. Only marred by weird support decisions by Anker / SoundCore.</p>

<p><a href="https://amzn.to/2QybTxm">Buy the Q10 now on Amazon UK</a>.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=33476&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2020/01/usb-c-powered-bluetooth-headphones-the-life-q10-from-anker/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[HOWTO: Split WAV and CUE files on Linux]]></title>
		<link>https://shkspr.mobi/blog/2019/02/howto-split-wav-and-cue-files-on-linux/</link>
					<comments>https://shkspr.mobi/blog/2019/02/howto-split-wav-and-cue-files-on-linux/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Mon, 04 Feb 2019 20:48:18 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mkv]]></category>
		<category><![CDATA[mkvmerge]]></category>
		<category><![CDATA[surround sound]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=31357</guid>

					<description><![CDATA[Mostly notes to myself, as a follow-up to this older post.  This is a 3-step process.  Add the file to an MKV  Use MKVmerge:  mkvmerge &#34;audio.wav&#34; --chapters &#34;audio.cue&#34; -o &#34;audio.mkv&#34;   You can see that chapter names have been added to the .mkv if you run ffmpeg -i or mkvinfo.  Split the MKV by chapter  This generates one file per chapter:  mkvmerge -D -S &#34;audio.mkv&#34; --split chapters:all -o…]]></description>
										<content:encoded><![CDATA[<p>Mostly notes to myself, as a follow-up to <a href="https://shkspr.mobi/blog/2015/07/splitting-a-surround-sound-audio-file-in-ubuntu/">this older post</a>.  This is a 3-step process.</p>

<h2 id="add-the-file-to-an-mkv"><a href="https://shkspr.mobi/blog/2019/02/howto-split-wav-and-cue-files-on-linux/#add-the-file-to-an-mkv">Add the file to an MKV</a></h2>

<p>Use <a href="https://mkvtoolnix.download/">MKVmerge</a>:</p>

<pre><code class="language-_">mkvmerge "audio.wav" --chapters "audio.cue" -o "audio.mkv"
</code></pre>

<p>You can see that chapter names have been added to the .mkv if you run <code>ffmpeg -i</code> or <code>mkvinfo</code>.</p>

<h2 id="split-the-mkv-by-chapter"><a href="https://shkspr.mobi/blog/2019/02/howto-split-wav-and-cue-files-on-linux/#split-the-mkv-by-chapter">Split the MKV by chapter</a></h2>

<p>This generates one file per chapter:</p>

<pre><code class="language-_">mkvmerge -D -S "audio.mkv" --split chapters:all -o "split-%02d.mkv"
</code></pre>

<p>The <code>-D</code> switch means no video will be copied. <code>-S</code> means no subtitles.</p>

<h2 id="extract-the-audio"><a href="https://shkspr.mobi/blog/2019/02/howto-split-wav-and-cue-files-on-linux/#extract-the-audio">Extract the audio</a></h2>

<p>This quickly pulls out the audio, raw, without changing anything.</p>

<pre><code class="language-_">mkvextract split-01.mkv tracks "0:output"
</code></pre>

<p>The raw audio is placed in a file called <code>output</code></p>

<p>You can also do this with:</p>

<pre><code class="language-_">ffmpeg -i "split-01.mkv" -acodec copy "whatever.wav"
</code></pre>

<p>Replace <code>.wav</code> with <code>.ac3</code> or <code>.flac</code> or whatever the audio format is.
You can transcode the audio to something else. I recommend <a href="https://opus-codec.org/">Opus</a></p>

<pre><code class="language-_">ffmpeg -i "split-01.mkv" -af aformat=channel_layouts="7.1|5.1|stereo" -b:a 1536k "whatever.opus"
</code></pre>

<p>There is a <a href="https://trac.ffmpeg.org/ticket/5718">bug with the surround sound mapping in ffmpeg</a>.</p>

<h2 id="rename-it"><a href="https://shkspr.mobi/blog/2019/02/howto-split-wav-and-cue-files-on-linux/#rename-it">Rename it</a></h2>

<p>This is bit convoluted. <code>ffprobe</code> can get the chapter name:</p>

<pre><code class="language-_">ffprobe -i "split-01.mkv" -show_chapters -loglevel error
</code></pre>

<p>The use of <code>-loglevel error</code> means you only get the data, rather than the debug cruft.</p>

<p>In order to get the title, we get <code>ffprobe</code> to spit out JSON and then get <code>jq</code> to interpret it:</p>

<pre><code class="language-_">ffprobe -i "split-01.mkv" -print_format json -show_chapters -loglevel error | jq ".chapters[0].tags.title" -r
</code></pre>

<h2 id="all-in-one-script-to-extract-the-audio-and-rename-it"><a href="https://shkspr.mobi/blog/2019/02/howto-split-wav-and-cue-files-on-linux/#all-in-one-script-to-extract-the-audio-and-rename-it">All in one script to extract the audio <em>and</em> rename it</a></h2>

<pre><code class="language-_">#!/bin/bash
AUDIO="audio.wav"
CUE="audio.cue"
MKV="audio.mkv"

# What's the audio format?
FORMAT=$(ffprobe -v error -select_streams a:0 -show_entries stream=codec_name -of default=noprint_wrappers=1:nokey=1 "$AUDIO")

# Create the MKV
mkvmerge "$AUDIO" --chapters "$CUE" -o "$MKV"

# How many chapters are there?
JSON=$(ffprobe -i "$MKV" -print_format json -show_chapters -loglevel error)
COUNT=$(echo $JSON | jq ".chapters | length" )

# Split the MKV into chapters
mkvmerge -D -S "$MKV" --split chapters:all -o "split-%02d.mkv"

# Loop through all the created .mkv files
COUNTER=1
while [ $COUNTER -le $COUNT ]; do

  # Zero pad the counter
  printf -v ZEROTRACK "%02d" $COUNTER

  # Get the chapter name
  JSON=$(ffprobe -i "split-$ZEROTRACK.mkv" -print_format json -show_chapters -loglevel error)
  TITLE=$(echo $JSON | jq ".chapters[0].tags.title" -r)
  FILENAME="[$ZEROTRACK] $TITLE.$FORMAT"

  # Raw Audio
  mkvextract "split-$ZEROTRACK.mkv" tracks "0:$FILENAME"
  # Transcode. Optional
  #ffmpeg -i "split-$ZEROTRACK.mkv" "$FILENAME.opus"

  let COUNTER=COUNTER+1 
done

# Delete the generated MKVs. Optional
#rm *.mkv
</code></pre>

<p>Note, there is <a href="https://gitlab.com/mbunkus/mkvtoolnix/issues/2498">no single command in MKVtools to do this</a></p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=31357&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2019/02/howto-split-wav-and-cue-files-on-linux/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Extracting DVD-Audio on Linux, the modern(ish) way]]></title>
		<link>https://shkspr.mobi/blog/2019/01/extracting-dvd-audio-on-linux-the-modernish-way/</link>
					<comments>https://shkspr.mobi/blog/2019/01/extracting-dvd-audio-on-linux-the-modernish-way/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Thu, 24 Jan 2019 17:16:04 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[dvd]]></category>
		<category><![CDATA[dvda]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[opus]]></category>
		<category><![CDATA[ripping]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=31270</guid>

					<description><![CDATA[DVD-Audio (henceforce DVDA) is an unloved and mostly forgotten audio format. Nevertheless, there&#039;s a large back-catalogue of music which is still trapped on ancient discs encoded in the proprietary MLP format.  A few years ago I wrote about how to extract the audio using the obsolete Windows program DVD-Audio Explorer.  I wanted to be able to run the extraction via the command line, which means…]]></description>
										<content:encoded><![CDATA[<p>DVD-Audio (henceforce DVDA) is an unloved and mostly forgotten audio format. Nevertheless, there's a large back-catalogue of music which is still trapped on ancient discs encoded in the proprietary MLP format.</p>

<p>A few years ago <a href="https://shkspr.mobi/blog/2014/08/dealing-with-quadrophonic-dvd-a-files-in-linux/">I wrote about how to extract the audio using the obsolete Windows program DVD-Audio Explorer</a>.  I wanted to be able to run the extraction via the command line, which means trying to find a native Linux app.  I tried <a href="http://audiotools.sourceforge.net/">Python AudioTools</a> but I got lost in an endless maze of incompatible dependencies.</p>

<p>So I went with <a href="https://github.com/tuffy/libdvd-audio">Brian "tuffy" Langenberger's <code>libDVD-Audio</code></a>.</p>

<p>To install, simply run:</p>

<pre><code class="language-_">sudo make install
</code></pre>

<p>That will give you two new programs.  To get info about your DVDA, run:</p>

<pre><code class="language-_">dvda-debug-info -A /path/to/your/AUDIO_TS
</code></pre>

<p>That will pump out details about each track like so:</p>

<pre><code class="language-_">Title  Track  Length  PTS Length  First Sector  Last Sector
    1      1    3:30    13450000             0        86547
    1      2    4:11    12500000         73144       122600
    1      3    2:11    16010000        370601       233337
</code></pre>

<h2 id="extract"><a href="https://shkspr.mobi/blog/2019/01/extracting-dvd-audio-on-linux-the-modernish-way/#extract">Extract</a></h2>

<p>To extract the tracks, run:</p>

<pre><code class="language-_">dvda2wav -A /path/to/your/AUDIO_TS
</code></pre>

<p>That will spit out the files in WAV format.</p>

<h2 id="encode"><a href="https://shkspr.mobi/blog/2019/01/extracting-dvd-audio-on-linux-the-modernish-way/#encode">Encode</a></h2>

<p>WAV is pretty large - about 20MB per minute per channel.  Converting to FLAC (the Free Lossless Audio Codec) gets you down to about 10MB.  I just go straight for the modern <a href="https://opus-codec.org/">Opus Codec</a> which does excellent quality surround sound at low file sizes.</p>

<pre><code class="language-_">opusenc --bitrate 4096 track-01-01.wav 1.opus
</code></pre>

<p>That's about 2MB/minute/channel and I promise that you won't hear the difference.</p>

<h2 id="metadata"><a href="https://shkspr.mobi/blog/2019/01/extracting-dvd-audio-on-linux-the-modernish-way/#metadata">Metadata</a></h2>

<p>If you want to add metadata to a track, it's done like this:</p>

<pre><code class="language-_">opusenc --bitrate 4096 in.wav out.opus --title "Yesterday" --artist "The Beatles" --tracknumber "02"
</code></pre>

<p>Older versions of Opusenc, oddly, don't have a native way to express track numbers, so you'll need to do it manually using <code>--comment "tracknumber=02"</code></p>

<p><ins datetime="2019-07-30T08:08:18+00:00">Newer versions can use <code>--tracknumber</code> to add track numbers.</ins></p>

<h3 id="automating"><a href="https://shkspr.mobi/blog/2019/01/extracting-dvd-audio-on-linux-the-modernish-way/#automating">Automating</a></h3>

<p>You can make it slightly easier to add the metadata if you give the files predictable names.  For example: <code>01-Yesterday-The Beatles.wav</code></p>

<p>Here's a scrappy bash script:</p>

<pre><code class="language-_">#!/bin/bash
for FILE in *.wav
do
    FILENAME="${FILE%.*}"

    TRACK=$(echo  $FILENAME | cut -d'-' -f 1)
    TITLE=$(echo  $FILENAME | cut -d'-' -f 2)
    ARTIST=$(echo $FILENAME | cut -d'-' -f 3)

    OUTPUT="[$TRACK] $ARTIST - $TITLE.opus"

    opusenc --bitrate 4096 "$FILE" "$OUTPUT" --title "$TITLE" --artist "$ARTIST" --tracknumber "$TRACK"
done
</code></pre>

<p>I hope future me finds these notes useful!</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=31270&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2019/01/extracting-dvd-audio-on-linux-the-modernish-way/feed/</wfw:commentRss>
			<slash:comments>8</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[HDCP is ridiculously annoying - DRM sucks for consumers]]></title>
		<link>https://shkspr.mobi/blog/2019/01/hdcp-is-ridiculously-annoying-drm-sucks-for-consumers/</link>
					<comments>https://shkspr.mobi/blog/2019/01/hdcp-is-ridiculously-annoying-drm-sucks-for-consumers/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Sun, 13 Jan 2019 14:51:56 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[av]]></category>
		<category><![CDATA[drm]]></category>
		<category><![CDATA[hdmi]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[tv]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=31179</guid>

					<description><![CDATA[I decided to treat myself to an upgraded home cinema experience. But mandatory copy-protection has meant I&#039;ve spend the weekend trying and failing to get things working, rather than watching glorious 4K HDR 10 bit movies.  Here&#039;s the problem:    Why am I getting the error &#34;This content can not be displayed because your TV does not support HDCP 2.2.&#34;?  I have four pieces of kit in the mix, all of…]]></description>
										<content:encoded><![CDATA[<p>I decided to treat myself to an upgraded home cinema experience. But mandatory copy-protection has meant I've spend the weekend trying and failing to get things working, rather than watching glorious 4K HDR 10 bit movies.</p>

<p>Here's the problem:</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2019/01/TV-showing-error.jpg" alt="TV showing error message." width="1024" height="588" class="aligncenter size-full wp-image-31185">

<p>Why am I getting the error "This content can not be displayed because your TV does not support <a href="https://en.wikipedia.org/wiki/High-bandwidth_Digital_Content_Protection">HDCP 2.2</a>."?</p>

<p>I have four pieces of kit in the mix, all of which claim to support HDCP's Digital Restrictions Management:</p>

<ul>
<li><a href="https://amzn.to/2AHOBOH">Amazon Fire TV Stick</a> - the new 4K version</li>
<li><a href="https://shkspr.mobi/blog/2018/11/telnet-control-of-toshiba-smart-tvs/">Toshiba 49U6863</a> - a 4K TV</li>
<li><a href="https://amzn.to/2AGKiTG">Denon AVR-X2500H</a> - a 4K surround sound amp</li>
<li><a href="https://amzn.to/2CkWSrT">HDMI 2.0 cable</a> - an 18Gbps rated cable</li>
</ul>

<p>Easy, right? No!</p>

<p>Here's what <em>does</em> work:
<code>Fire -&gt; TV</code> 
If I plug the Fire Stick directly into the TV, it works! I get 4K HDR. So I'm confident the TV <em>does</em> support HDCP.</p>

<p>Here's what does <em>not</em> work:</p>

<p><code>Fire -&gt; Denon -&gt; HDMI cable -&gt; TV</code>
Causes the Denon to display the "your TV does not support HDCP 2.2." error message when 4K content is played.</p>

<h2 id="is-it-the-cable"><a href="https://shkspr.mobi/blog/2019/01/hdcp-is-ridiculously-annoying-drm-sucks-for-consumers/#is-it-the-cable">Is it the cable?</a></h2>

<p>The HDMI cable claims to support 4K video. The <a href="https://web.archive.org/web/20181222213335/http://www.theaav.com/uploads/2/6/0/1/26016310/denon_hdmi_diagnostics_and_troubleshooting_eng_im_v00.pdf">Denon has a built in cable tester</a> which confirms that the cable meets the "4K (6G)" specification.</p>

<p>The cable is short - under 2 meters - so shouldn't run into any latency issues.</p>

<h2 id="is-it-the-tvs-config"><a href="https://shkspr.mobi/blog/2019/01/hdcp-is-ridiculously-annoying-drm-sucks-for-consumers/#is-it-the-tvs-config">Is it the TV's config?</a></h2>

<p>I don't think so. There is an HDMI Full Range settings, which I have enabled.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2019/01/HDMI-Full-Range-fs8.png" alt="HDMI Full Range While watching from a HDMI source, this feature will be visible. You can use this feature to enhance blackness in the picture." width="1087" height="133" class="aligncenter size-full wp-image-31182">

<p>I've set the HDMI input to "Advanced".
<img src="https://shkspr.mobi/blog/wp-content/uploads/2019/01/Enhanced-fs8.png" alt="Regular and Enhanced options are affecting the colour settings of the selected HDMI source. To be able to watch 4K or HDR/HLG (optional) images from an HDMI source related source setting should be set as Enhanced if the connected device is compatible with HDMI 2.0 and subsequent versions." width="1067" height="228" class="aligncenter size-full wp-image-31181"></p>

<p>The Fire seems to think the TV is compatible, and lets me switch to 4K, even when it is going through the Denon.</p>

<p>To be clear, <code>Fire -&gt; Denon -&gt; HDMI cable -&gt; TV (Enhanced)</code> does not show an error on the Fire but shows an error on the Denon about HDCP..</p>

<h2 id="is-it-the-signal-pathway"><a href="https://shkspr.mobi/blog/2019/01/hdcp-is-ridiculously-annoying-drm-sucks-for-consumers/#is-it-the-signal-pathway">Is it the signal pathway?</a></h2>

<p>Despite Denon's marketing material claiming that every port can do 4K HDR, <a href="https://denon-uk.custhelp.com/app/answers/detail/a_id/4377/~/hdr-passthrough-not-working">their support pages tell a different story</a>!</p>

<p><a href="https://denon-uk.custhelp.com/app/answers/detail/a_id/4377/~/hdr-passthrough-not-working"><img src="https://shkspr.mobi/blog/wp-content/uploads/2019/01/DenonCP45-fs8.png" alt="Diagram showing which ports are best." width="1024" height="343" class="aligncenter size-full wp-image-31180"></a></p>

<p>I've tried plugging the Fire stick into the closest HDMI port - but it made no difference.</p>

<h2 id="is-it-the-amps-settings"><a href="https://shkspr.mobi/blog/2019/01/hdcp-is-ridiculously-annoying-drm-sucks-for-consumers/#is-it-the-amps-settings">Is it the amp's settings?</a></h2>

<p>There are dozens of permutations of settings, but I think I've narrowed it down to the essentials.</p>

<p>I've <a href="http://manuals.denon.com/AVRX2500H/EU/EN/GFNFSYafailgul.php">turned off all video processing</a> and set the amp to <a href="http://manuals.denon.com/AVRX2500H/EU/EN/GFNFSYmlxuhedk.php">"bypass" all video processing from the HDMI video path</a>.</p>

<p>I think this is where the problem lies - the <a href="http://manuals.denon.com/AVRX2500H/EU/EN/DRDZSYzvebvotm.php">4K Signal Format</a> setting.</p>

<p>If I set it to "Standard", I can watch 4K video <em>without</em> HDR.</p>

<p>As soon as I set it to "Enhanced", the Denon shows the HDCP error.</p>

<p>The Denon shows the TV as accepting 4K HDR.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2019/01/HDMI-output-info.jpg" alt="TV screen showing it accepts 4K." width="1024" height="552" class="aligncenter size-full wp-image-31189"></p>

<h2 id="can-you-strip-the-drm"><a href="https://shkspr.mobi/blog/2019/01/hdcp-is-ridiculously-annoying-drm-sucks-for-consumers/#can-you-strip-the-drm">Can you strip the DRM?</a></h2>

<p>Possibly. Devices like <a href="https://www.hdfury.eu/">Dr HDMI's HD Fury</a> claim they can fix these problems. But I'm loathe to spend another €90 to fix a problem not of my own making.</p>

<h2 id="conclusion"><a href="https://shkspr.mobi/blog/2019/01/hdcp-is-ridiculously-annoying-drm-sucks-for-consumers/#conclusion">Conclusion?</a></h2>

<p>I have no clue! Either the Fire or the Denon are doing the HDCP handshake incorrectly. Or, perhaps, the TV doesn't handshake when connected to an amp.</p>

<p>You'd think it would be simple to pass a digital signal from one device to another, via a 3rd - but the paranoia of DRM means paying customers have to put up with all manner of user-hostile limitations.</p>

<h2 id="next-steps"><a href="https://shkspr.mobi/blog/2019/01/hdcp-is-ridiculously-annoying-drm-sucks-for-consumers/#next-steps">Next steps?</a></h2>

<ul>
<li>Both the TV and Amp were purchased from RicherSounds - so I might give them a call to see if they've any ideas.</li>
<li>Amazon support don't think it is a problem with the Fire but will pass my comments onto their engineering team.</li>
<li>I've contacted Toshiba - but they outsource their manufacturing to Vestel, so who knows if I'll ever get an answer.</li>
<li>Denon have promised to contact me in 48 hours.</li>
</ul>

<h2 id="is-it-my-fault-for-being-a-media-snob"><a href="https://shkspr.mobi/blog/2019/01/hdcp-is-ridiculously-annoying-drm-sucks-for-consumers/#is-it-my-fault-for-being-a-media-snob">Is it my fault for being a media snob?</a></h2>

<p>Well, probably. I should spend less time watching the picture quality, and more time watching the show.</p>

<p>But I'm an innocent customer. I've spent good money to watch high-def media and I'm being stymied because of DRM.</p>

<p>I'd love there to be an <a href="https://hackaday.io/project/20469-modular-open-source-av-receiver">open source AV amp</a> so I could actually be in control of what I watch.</p>

<p>If you've got any smart ideas for how to fix this - please drop me a comment!</p>

<h2 id="update"><a href="https://shkspr.mobi/blog/2019/01/hdcp-is-ridiculously-annoying-drm-sucks-for-consumers/#update"><ins datetime="2019-01-28">Update</ins></a></h2>

<p>I returned the Denon thinking it was faulty and got the <a href="https://amzn.to/2UknBfm">Pioneer VSX-933</a>. Sadly, it also has the same error!
<img src="https://shkspr.mobi/blog/wp-content/uploads/2019/01/HDCP-and-Pioneer.jpg" alt="Error message &quot;This content cannot be dispayed on your TV. Please make sure HDMI connection on your HDCP 2.2.&quot;" width="1024" height="567" class="aligncenter size-full wp-image-31324">
So, next steps are to find another 4K HDR source to see if that works, or... I dunno!</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=31179&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2019/01/hdcp-is-ridiculously-annoying-drm-sucks-for-consumers/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Convert Surround Sound WAV albums to individual opus files]]></title>
		<link>https://shkspr.mobi/blog/2018/03/convert-surround-sound-wav-albums-to-individual-opus-files/</link>
					<comments>https://shkspr.mobi/blog/2018/03/convert-surround-sound-wav-albums-to-individual-opus-files/#respond</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Sun, 18 Mar 2018 18:38:16 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[flac]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[opus]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=29185</guid>

					<description><![CDATA[As ever, notes to myself.  This is a method to take a .wav and .cue and transform it into individual files. In this case, .opus.  Transform to .flac  FLAC is a good intermediary file format, especially for surround sound files.  avconv -i file.wav out.flac  Transform to .opus  An optional step if you want smaller files. Maximum quality for 6 channel audio.  opusenc --bitrate 4096 out.flac…]]></description>
										<content:encoded><![CDATA[<p>As ever, notes to myself.  This is a method to take a <code>.wav</code> and <code>.cue</code> and transform it into individual files. In this case, <code>.opus</code>.</p>

<h3 id="transform-to-flac"><a href="https://shkspr.mobi/blog/2018/03/convert-surround-sound-wav-albums-to-individual-opus-files/#transform-to-flac">Transform to <code>.flac</code></a></h3>

<p>FLAC is a good intermediary file format, especially for surround sound files.</p>

<p><code>avconv -i file.wav out.flac</code></p>

<h3 id="transform-to-opus"><a href="https://shkspr.mobi/blog/2018/03/convert-surround-sound-wav-albums-to-individual-opus-files/#transform-to-opus">Transform to <code>.opus</code></a></h3>

<p>An optional step if you want smaller files.
Maximum quality for 6 channel audio.</p>

<p><code>opusenc --bitrate 4096 out.flac out.opus</code></p>

<h3 id="create-an-mkv"><a href="https://shkspr.mobi/blog/2018/03/convert-surround-sound-wav-albums-to-individual-opus-files/#create-an-mkv">Create an <code>.mkv</code></a></h3>

<p>Add to an MKV with all the chapter information.</p>

<p><code>mkvmerge -o test.mkv --chapters file.cue out.opus</code></p>

<h3 id="split-to-individual-files"><a href="https://shkspr.mobi/blog/2018/03/convert-surround-sound-wav-albums-to-individual-opus-files/#split-to-individual-files">Split to individual files</a></h3>

<p>Individual MKVs</p>

<p><code>mkvmerge test.mkv --split chapters:all -o track.mkv</code></p>

<h3 id="extract-the-audio"><a href="https://shkspr.mobi/blog/2018/03/convert-surround-sound-wav-albums-to-individual-opus-files/#extract-the-audio">Extract the Audio</a></h3>

<p>One at a time:</p>

<p><code>mkvextract tracks "track-001.mkv" 0:"individual.opus"</code></p>

<h2 id="all-in-one-bash-script"><a href="https://shkspr.mobi/blog/2018/03/convert-surround-sound-wav-albums-to-individual-opus-files/#all-in-one-bash-script">All-In-One  bash script</a></h2>

<pre><code class="language-bash">#!/bin/bash
json=$(ffprobe -i "file.mkv" -print_format json -show_chapters -loglevel error)
count=$(echo $json | jq ".chapters | length" )

mkvmerge test.mkv -D -S --split chapters:all -o "%02d.mkv"

COUNTER=1
while [ $COUNTER -le $count ]; do

  printf -v zerotrack "%02d" $COUNTER

  json=$(ffprobe -i "$zerotrack.mkv" -print_format json -show_chapters -loglevel error)
  title=$(echo $json | jq ".chapters[0].tags.title" -r)
  filename="[$zerotrack] $title"

  mkvextract tracks "$zerotrack.mkv" 0:"$filename.opus"
  let COUNTER=COUNTER+1 
done
</code></pre>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=29185&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2018/03/convert-surround-sound-wav-albums-to-individual-opus-files/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Deconstructing The Sounds Behind The Lightsaber Dream Sequence]]></title>
		<link>https://shkspr.mobi/blog/2016/04/deconstructing-the-sounds-behind-the-lightsaber-dream-sequence/</link>
					<comments>https://shkspr.mobi/blog/2016/04/deconstructing-the-sounds-behind-the-lightsaber-dream-sequence/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Fri, 01 Apr 2016 15:08:51 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[audacity]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[Star Wars]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=22662</guid>

					<description><![CDATA[Just a bit of fun for a Friday afternoon - and spoilers ahoy!  Star Wars VII contains the most magnificence dream sequence. When Rey lays her hand on a lightsaber for the first time, the world dissolves as a cacophony of audio hallucinations plague her.  It&#039;s a short sequence - lasting just under a minute - but the sound design is beautiful.  After seeing the fabulous Path of a Lightsaber video I …]]></description>
										<content:encoded><![CDATA[<p>Just a bit of fun for a Friday afternoon - and spoilers ahoy!</p>

<p>Star Wars VII contains the most magnificence dream sequence. When Rey lays her hand on a lightsaber for the first time, the world dissolves as a cacophony of audio hallucinations plague her.  It's a short sequence - lasting just under a minute - but the sound design is beautiful.</p>

<p>After seeing the fabulous <a href="http://www.slashfilm.com/path-of-a-lightsaber/">Path of a Lightsaber video</a> I thought I'd have a go at deconstructing all the voices which went into creating such a mesmerising piece.</p>

<p>I've isolated, as far as I can, all the different people - ducking out the background noise and boosting the spoken words where possible.</p>

<p>The original surround-sound audio is presented here in stereo - it's well worth listening to with a set of headphones to aid clarity.</p>

<p></p><figure class="audio">
	<figcaption>🔊 Force Awakens Dream Sequence Deconstructed</figcaption>
	
	<audio controls="" loading="lazy" src="https://shkspr.mobi/blog/wp-content/uploads/2016/04/DeconstructedForceAwakens.mp3">
		<p>💾 <a href="https://shkspr.mobi/blog/wp-content/uploads/2016/04/DeconstructedForceAwakens.mp3">Download this audio file</a>.</p>
	</audio>
</figure><p></p>

<p>Plenty of Obi-Wan - both Ewan McGregor and <a href="https://www.youtube.com/watch?v=XRPtmsYGyfM">a digitally reconstructed Alec Guinness</a>? Quite a lot of Yoda too.
I didn't hear any Jake Lloyd or Hayden Christensen - which is a shame - although we do get some of Vader's heavy breathing.  Listening back I also expected to find some of the villains in there. Unless my ears deceive me, there's no Kylo, Palpatine, or Snoke. A curious ommission, I thought.</p>

<p>I used Audacity to clear up the audio, isolating the sounds from each channel where possible.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2016/04/Force-Awakens-Dream-Sequence-Surround-Sound-.png" alt="Force Awakens Dream Sequence Surround Sound-" width="1024" height="501" class="aligncenter size-full wp-image-22681">

<p>As you can see, there's a lot of stuff happening in the surround channels, which makes that part of the film incredibly immersive.  It's interesting to see just how each element is placed in the sound field to build up a coherent landscape of voices coming at you from all directions.  When paired with the tremendous special effects, it produces one of the stand-out scenes of the movie.</p>

<p>Later on this month, I hope to show you how the <a href="https://shkspr.mobi/blog/2013/11/creating-animated-gifs-from-3d-movies-hsbs-to-gif/">movie cheats with its 3D effects to give an enhanced feeling of depth</a>.</p>

<p>Thanks for listening!</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=22662&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2016/04/deconstructing-the-sounds-behind-the-lightsaber-dream-sequence/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		<enclosure url="https://shkspr.mobi/blog/wp-content/uploads/2016/04/DeconstructedForceAwakens.mp3" length="742114" type="audio/mpeg" />

			</item>
		<item>
		<title><![CDATA[Exporting Multitrack Surround Files in Audacity]]></title>
		<link>https://shkspr.mobi/blog/2015/07/exporting-multitrack-surround-files-in-audacity/</link>
					<comments>https://shkspr.mobi/blog/2015/07/exporting-multitrack-surround-files-in-audacity/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Tue, 28 Jul 2015 12:13:24 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[audacity]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[HowTo]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=21225</guid>

					<description><![CDATA[Notes to myself!  Suppose you want to create a surround sound file using Audacity.  The app is a little obtuse, so this may clear up some confusion.  When exporting, Audacity defaults to mixing down to stereo.  You must adjust these settings: Edit → Preferences → Import/Export → Use Custom Mix    Lay out your audio.  Keep each track as mono.  You can have as many tracks as you like and then downm…]]></description>
										<content:encoded><![CDATA[<p>Notes to myself!</p>

<p>Suppose you want to create a surround sound file using Audacity.  The app is a little obtuse, so this may clear up some confusion.</p>

<p>When exporting, Audacity defaults to mixing down to stereo.  You must adjust these settings:
<code>Edit → Preferences → Import/Export → Use Custom Mix</code></p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2015/07/Multi-Track-Audacity-fs8.png" alt="Multi Track Audacity-fs8" width="704" height="402" class="aligncenter size-full wp-image-21228">

<p>Lay out your audio.  Keep each track as mono.  You can have as many tracks as you like and then downmix them later.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2015/07/Multitrack-Audacity-Tracks-fs8.png" alt="Multitrack Audacity Tracks-fs8" width="1680" height="1027" class="aligncenter size-full wp-image-21227"></p>

<p><code>File → Export</code>
If you choose a surround compatible format, like .ogg, you will be able to assign each track (on the left) to an output channel on the right.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2015/07/Multitracks-Audacity-Export-fs8.png" alt="Multitracks Audacity Export-fs8" width="640" height="480" class="aligncenter size-full wp-image-21226"></p>

<p>The channels don't have names - which is <em>really</em> unhelpful.  Here's how they <a href="https://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-810004.3.9">map according to the OGG Specification</a>.</p>

<pre>1 Left
2 Centre
3 Right
4 Surround Left
5 Surround Right
</pre>

<p>If you want to test it for yourself, <a href="https://shkspr.mobi/blog/wp-content/uploads/2015/07/count.ogg">here's a simple multitrack ogg</a>.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=21225&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2015/07/exporting-multitrack-surround-files-in-audacity/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Splitting a Surround Sound Audio File in Ubuntu]]></title>
		<link>https://shkspr.mobi/blog/2015/07/splitting-a-surround-sound-audio-file-in-ubuntu/</link>
					<comments>https://shkspr.mobi/blog/2015/07/splitting-a-surround-sound-audio-file-in-ubuntu/#respond</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Wed, 15 Jul 2015 21:22:25 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[avconv]]></category>
		<category><![CDATA[dts]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[surround sound]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=21171</guid>

					<description><![CDATA[See this update for a better way to do this.  Being mostly notes to myself and following on from my post on Quadrophonic files.  I have:       A DTS album stored as a .WAV     A .cue file with chapter markings   I want:       The single large file to be split into individual chapters with one file per chapter.     Each file to be multitrack (that is, to stay in surround sound)   It turns out,…]]></description>
										<content:encoded><![CDATA[<p><ins datetime="2019-02-04T20:49:45+00:00"><a href="https://shkspr.mobi/blog/2019/02/howto-split-wav-and-cue-files-on-linux/">See this update for a better way to do this.</a></ins></p>

<p>Being mostly notes to myself and following on from <a href="https://shkspr.mobi/blog/2014/08/dealing-with-quadrophonic-dvd-a-files-in-linux/">my post on Quadrophonic files</a>.</p>

<p>I have:</p>

<ul>
    <li>A <a href="https://web.archive.org/web/20150708071611/https://diatonis.com/surround_sound_music.html">DTS album stored as a .WAV</a></li>
    <li>A .cue file with chapter markings</li>
</ul>

<p>I want:</p>

<ul>
    <li>The single large file to be split into individual chapters with one file per chapter.</li>
    <li>Each file to be multitrack (that is, to stay in surround sound)</li>
</ul>

<p>It turns out, that there is no simple way to do this.  There are tools to <a href="https://bytebin.wordpress.com/2009/11/20/split-flac-by-cue-file-in-linux/">split <em>stereo</em> wav files by their cue sheet</a>, but nothing for 5.1 files.</p>

<p>So, here's how I did it.  This process uses <a href="https://www.bunkus.org/videotools/mkvtoolnix/downloads.html">mkvtools</a> and <a href="https://stackoverflow.com/questions/9477115/what-are-the-differences-and-similarities-between-ffmpeg-libav-and-avconv">avconv</a>.</p>

<h2 id="the-easy-but-fairly-manual-way"><a href="https://shkspr.mobi/blog/2015/07/splitting-a-surround-sound-audio-file-in-ubuntu/#the-easy-but-fairly-manual-way">The Easy (But Fairly Manual) Way!</a></h2>

<p>I can't find an automated way to do this from a cuesheet - so here's what you need to do.</p>

<p>A typical cue looks like</p>

<pre>  TRACK 01 AUDIO
    TITLE "Alice"
    PERFORMER "Bob"
    INDEX 01 00:00:00
  TRACK 02 AUDIO
    TITLE "Carol"
    PERFORMER "Bob"
    INDEX 01 04:38:14
  TRACK 03 AUDIO
    TITLE "Dolly"
    PERFORMER "Bob"
    INDEX 01 08:39:09
...
</pre>

<p>Track 2 starts at 4 minutes, 38.14 seconds into the file.  It finishes at (8m 39.09s - 4m 38.14s) = 4m 0.95s.</p>

<pre>avconv -f dts -i original.wav -ss 00:04:38.014 -t 00:04:0.95 -acodec copy track2.wav</pre>

<p>That is, avconv forced to use DTS, starting at 4.38.014 and finishing after 4m .95s, copying the codec into a new file.</p>

<h2 id="calculating-offsets"><a href="https://shkspr.mobi/blog/2015/07/splitting-a-surround-sound-audio-file-in-ubuntu/#calculating-offsets">Calculating Offsets</a></h2>

<p>It's hard to manually calculate all the timings.  One quick(ish) way to get them is by using <code><a href="http://manpages.ubuntu.com/manpages/quantal/man1/cueconvert.1.html">cueconvert</a></code>.</p>

<pre>cueconvert -i cue -o toc cue.cue cue.toc</pre>

<p>If you open the newly created .toc file, you should see something like:</p>

<pre>FILE "track1.wav" 0 04:38:14
FILE "track2.wav" 04:38:14 04:00:70
FILE "track3" 08:39:09 04:38:57
...
</pre>

<p>You can then use those timings as your -ss and -t values - remember to add the extra leading "00:".</p>

<h2 id="limitations"><a href="https://shkspr.mobi/blog/2015/07/splitting-a-surround-sound-audio-file-in-ubuntu/#limitations">Limitations</a></h2>

<ol>
    <li>The files aren't tagged / named correctly.</li>
    <li>It's a pain to calculate the timings correctly.</li>
</ol>

<h2 id="the-hard-but-somewhat-automated-way"><a href="https://shkspr.mobi/blog/2015/07/splitting-a-surround-sound-audio-file-in-ubuntu/#the-hard-but-somewhat-automated-way">The Hard (But Somewhat Automated) Way!</a></h2>

<h2 id="convert-the-wav-to-mkv"><a href="https://shkspr.mobi/blog/2015/07/splitting-a-surround-sound-audio-file-in-ubuntu/#convert-the-wav-to-mkv">Convert the .WAV to .MKV</a></h2>

<pre>avconv -i whatever.wav -acodec copy output.mkv</pre>

<p>In some cases, avconv will think your 5.1 recording is stereo. Fix it by forcing the codec it detects.</p>

<pre>avconv -f dts -i whatever.wav -acodec copy output.mkv</pre>

<h2 id="create-a-chapters-file"><a href="https://shkspr.mobi/blog/2015/07/splitting-a-surround-sound-audio-file-in-ubuntu/#create-a-chapters-file">Create a Chapters File</a></h2>

<p>MKVmerge require a <a href="http://savvyadmin.com/adding-chapters-to-videos-using-mkv-containers/">specific format of chapter file</a> which is different from a normal .cue file.  Creating this will be a manual process.</p>

<pre>CHAPTER01=00:00:00.000
CHAPTER01NAME=Chapter 01
CHAPTER02=00:05:06.03
CHAPTER02NAME=Chapter 02
CHAPTER03=00:10:12.000
...
</pre>

<p>Save that as <code>chapters.txt</code>.</p>

<h2 id="add-the-chapters-to-the-mkv"><a href="https://shkspr.mobi/blog/2015/07/splitting-a-surround-sound-audio-file-in-ubuntu/#add-the-chapters-to-the-mkv">Add The Chapters to the .MKV</a></h2>

<p>A single command for this one:</p>

<pre>mkvmerge output.mkv --chapters chapters.txt -o withchapters.mkv</pre>

<h2 id="split-the-mkv"><a href="https://shkspr.mobi/blog/2015/07/splitting-a-surround-sound-audio-file-in-ubuntu/#split-the-mkv">Split The MKV</a></h2>

<p>There are <a href="http://superuser.com/questions/795373/split-mkv-based-on-chapters">a couple of ways to do this</a>, I use:</p>

<pre>mkvmerge withchapters.mkv --split chapters:all -o track.mkv</pre>

<p>You'll now have track-001.mkv, track-002.mkv etc.</p>

<h2 id="limitations"><a href="https://shkspr.mobi/blog/2015/07/splitting-a-surround-sound-audio-file-in-ubuntu/#limitations">Limitations</a></h2>

<p>At this point, we have two moderately annoying problems.</p>

<ol>
    <li>The files aren't tagged / named correctly.</li>
    <li>The DTS audio can't be extracted properly!</li>
</ol>

<p>That last one is rather a showstopper!  For some reason, the .MKV files play back their audio properly.  When trying to extract or convert it, all sorts of stream errors occur.</p>

<h2 id="todo"><a href="https://shkspr.mobi/blog/2015/07/splitting-a-surround-sound-audio-file-in-ubuntu/#todo">TODO</a></h2>

<p>Either write a patch for avconv to get it to split by .cue - or write a small Python script to do everything automagically!</p>

<p>Any suggestions for a better way to do this? Stick them in the comments box.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=21171&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2015/07/splitting-a-surround-sound-audio-file-in-ubuntu/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Dealing With Quadrophonic / DVD-A Files In Linux]]></title>
		<link>https://shkspr.mobi/blog/2014/08/dealing-with-quadrophonic-dvd-a-files-in-linux/</link>
					<comments>https://shkspr.mobi/blog/2014/08/dealing-with-quadrophonic-dvd-a-files-in-linux/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Wed, 13 Aug 2014 17:44:10 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[dvd]]></category>
		<category><![CDATA[ripping]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=10744</guid>

					<description><![CDATA[These are mostly notes to myself.  These all comply with the UK&#039;s new copyright laws.  Check your local laws, kiddies!  DVD-Audio (called DVD-A or DVDA) never really took off.  It&#039;s hard to find the discs and compatible hardware.  Nevertheless, I want to listen to these high-resolution audio tracks under Linux.  In these examples, I&#039;m using Ubuntu - but any modern system should cope.  Ripping…]]></description>
										<content:encoded><![CDATA[<p>These are mostly notes to myself.  These all comply with the <a href="http://www.wired.co.uk/news/archive/2014-03/28/copyright-reform">UK's new copyright laws</a>.  Check your local laws, kiddies!</p>

<p>DVD-Audio (called DVD-A or DVDA) never really took off.  It's hard to find the discs and compatible hardware.  Nevertheless, I want to listen to these high-resolution audio tracks under Linux.  In these examples, I'm using Ubuntu - but any modern system should cope.</p>

<h2 id="ripping-dvd-a"><a href="https://shkspr.mobi/blog/2014/08/dealing-with-quadrophonic-dvd-a-files-in-linux/#ripping-dvd-a">Ripping DVD-A</a></h2>

<p>In theory, <a href="http://dvd-audio.sourceforge.net/">DVD Audio Tools</a> should work.  In practice, I found no guide to compiling the software and the pre-built binaries just didn't work. If anyone knows how to get this working, I'd be grateful if you could let me know.</p>

<p>In practice, I had to use <a href="https://www.winehq.org/">WINE</a> and <a href="http://www.videohelp.com/tools/DVD-Audio-Explorer">DVD-Audio Explorer</a> (DVDAE).</p>

<p>You can either point DVDAE at your DVD drive, or manually extract the AUDIO_TS folder to your hard disc.</p>

<p>Open up any of the .IFO files, you'll get a list of the tracks available. Select the ones you want to extract and hit save.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2014/08/dvdae-fs8.png" alt="dvdae-fs8" width="878" height="600" class="aligncenter size-full wp-image-10745">

<p>After a few moments, the tracks will be ripped onto your computer.</p>

<h2 id="playing-mlp-files"><a href="https://shkspr.mobi/blog/2014/08/dealing-with-quadrophonic-dvd-a-files-in-linux/#playing-mlp-files">Playing .MLP Files</a></h2>

<p>If you're using VLC or similar, you should be able to play the files.  If you're using XBMC / Kali / OpenElec, you'll need to add the following to "/storage/.xbmc/userdata/advancedsettings.xml"</p>

<pre>&lt;advancedsettings&gt;
  &lt;audio&gt;
    &lt;defaultplayer&gt;dvdplayer&lt;/defaultplayer&gt;
  &lt;/audio&gt;
  &lt;musicextensions&gt;
    &lt;add&gt;.mlp&lt;/add&gt;
    &lt;remove&gt;&lt;/remove&gt;
  &lt;/musicextensions&gt;
&lt;/advancedsettings&gt;
</pre>

<h2 id="converting-mlp-files"><a href="https://shkspr.mobi/blog/2014/08/dealing-with-quadrophonic-dvd-a-files-in-linux/#converting-mlp-files">Converting .MLP Files</a></h2>

<p>FFmpag / avconv will quite happily convert .mlp files into flac / ogg / anything else you like.</p>

<pre>avconv -i track.mlp trac.flac
</pre>

<p>Is sufficient to convert the file.</p>

<p>There is one small problem.  <a href="https://superuser.com/questions/790331/converting-32-bit-mlp-to-32-bit-flac">FLAC does <strong>not</strong> support 32 bit files</a>.  While the documentation for avconv suggests that using "-sample_fmt s32" will work, it will either silently drop back down to 16 bit or simply not work.</p>

<p>Quite how much sonic information you will lose by going <a href="https://people.xiph.org/~xiphmont/demo/neil-young.html">from 32bit to 16bit is up for debate</a>.  Basically, unless you really do have amazing hearing, professionally calibrated studio equipment, and no ambient noise. Even then, most of what you're losing is noise.</p>

<p>On the other hand, disk space is relatively cheap.  A typical .MLP file will be reduced by 50% - 60% when converted to FLAC based on my tests.</p>

<p>One thing I did find was that some equipment would get the order of the FLAC channels mixed up, or upconvert the sound to 5.1.  Have a play with your equipment and see what works.</p>

<h2 id="dts-wav-files"><a href="https://shkspr.mobi/blog/2014/08/dealing-with-quadrophonic-dvd-a-files-in-linux/#dts-wav-files">DTS WAV Files</a></h2>

<p>Some surround music is available as DTS (yup, just like on DVDs).  It's encoded as a straight .WAV - the idea being that you digitally stream the WAV to your equipment, your HiFi detects that is actually a DTS bitstream and plays glorious surround sound.  If any part of this goes wrong, you'll hear static.  Not nice.</p>

<p>Sometimes, avconv won't automatically detect the DTS encoding</p>

<pre>avconv -i dts.wav
Input #0, wav, from 'dts.wav':
  Duration: 00:04:08.70, bitrate: 1411 kb/s
    Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
</pre>

<p>in which case, just force it to see the DTS - you can ignore any errors</p>

<pre>avconv -f dts -i dts.wav
[dca @ 0x19dc840] Not a valid DCA frame
[dts @ 0x19d27c0] max_analyze_duration reached
[dts @ 0x19d27c0] Estimating duration from bitrate, this may be inaccurate
Input #0, dts, from 'dts.wav':
  Duration: 00:04:08.70, start: 0.000000, bitrate: 1411 kb/s
    Stream #0.0: Audio: dca (DTS), 44100 Hz, 5.1, s16, 1411 kb/s
</pre>

<p>You can then convert to any other format you like.</p>

<h2 id="from-dvd"><a href="https://shkspr.mobi/blog/2014/08/dealing-with-quadrophonic-dvd-a-files-in-linux/#from-dvd">From DVD</a></h2>

<p>Most DVD-A discs also contain a slightly lower quality copy which can be played as a normal DVD. Sweet!</p>

<p>I use <a href="http://makemkv.com/">MakeMKV</a> to extract the regular DVD portion.  I've written <a href="https://shkspr.mobi/blog/2012/02/command-line-backup-for-dvds/">a brief tutorial about using it on the command line</a>.</p>

<p>Once you have your .mkv you have two choices.  Either leave it as it is - you get the benefit of chapter markers at the cost of a higher file size due to the video content.  Or rip the audio straight out.</p>

<pre>avconv -i whatever.mkv -acodec copy audio.ac3</pre>

<p>Generally, a much smaller filesize than the .mlp - have a listen to see if you can notice the loss of fidelity.  Annoyingly, converting AC3 to FLAC will <em>increase</em> the file size.</p>

<p>Incidentally, if you want to rip, say, the 2nd audio track - if you've got multiple audio tracks on a disc:</p>

<pre>avconv -i whatever.mkv -map 0:2 test.flac</pre>

<p>For some reason, neither MakeMKVcon nor avconv can extract PCM audio from DVDs.  For this, we have to use mplayer:</p>

<pre>mplayer -vc null -vo null -ao pcm:fast -ao pcm:file=audio.wav dvd://1 -dvd-device /full/path/to/VIDEO_TS/</pre>

<p>Takes a little while, but gets the job done.  Naturally, the .wav can be converted to flac.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=10744&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2014/08/dealing-with-quadrophonic-dvd-a-files-in-linux/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[The Future of AudioBoo is Uncertain - A Reply to @Documentally]]></title>
		<link>https://shkspr.mobi/blog/2013/04/the-future-of-audioboo-is-uncertain-a-reply-to-documentally/</link>
					<comments>https://shkspr.mobi/blog/2013/04/the-future-of-audioboo-is-uncertain-a-reply-to-documentally/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Wed, 10 Apr 2013 09:33:43 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[audioboo]]></category>
		<category><![CDATA[decentralised]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=7984</guid>

					<description><![CDATA[My good friend Documentally has written up his thoughts on the future of AudioBoo.  Here is my reply, appropriately enough, in audio format.   	🔊 The Future of AudioBoo is Uncertain🎤 Terence Eden 	 	 		💾 Download this audio file. 	   You may be interested in my other posts on the subject - Preparing for the Collapse of Digital Civilization and I Don&#039;t Want To Be Part of Your Fucking Ecosystem  (So…]]></description>
										<content:encoded><![CDATA[<p>My good friend <a href="http://documentally.com/2013/04/10/the-future-of-audioboo-is-uncertain">Documentally has written up his thoughts on the future of AudioBoo</a>.</p>

<p>Here is my reply, appropriately enough, in audio format.</p>

<p></p><figure class="audio">
	<figcaption>🔊 The Future of AudioBoo is Uncertain<br>🎤 Terence Eden</figcaption>
	
	<audio controls="" loading="lazy" src="https://shkspr.mobi/blog/wp-content/uploads/2013/04/AudioBoo-Future.mp3">
		<p>💾 <a href="https://shkspr.mobi/blog/wp-content/uploads/2013/04/AudioBoo-Future.mp3">Download this audio file</a>.</p>
	</audio>
</figure><p></p>

<p>You may be interested in my other posts on the subject - <a href="https://shkspr.mobi/blog/2013/03/preparing-for-the-collapse-of-digital-civilization/">Preparing for the Collapse of Digital Civilization</a> and <a href="https://shkspr.mobi/blog/2012/11/i-dont-want-to-be-part-of-your-fucking-ecosystem/">I Don't Want To Be Part of Your Fucking Ecosystem</a></p>

<p>(So, yes, still trying to find a decent WordPress plugin which will take multiple files and display only one player. Also need to find a less manual way of uploading and converting. Hey, it's not bad for 10 minutes work, ok!)</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=7984&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2013/04/the-future-of-audioboo-is-uncertain-a-reply-to-documentally/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
	</channel>
</rss>
