<?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>dvda &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/tag/dvda/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Fri, 24 Jan 2025 09:32:04 +0000</lastBuildDate>
	<language>en-GB</language>
	<copyright>© Terence Eden. 🄯 CC BY-SA. See https://shkspr.mobi/blog/copyright-and-copyleft/</copyright>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.3</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>dvda &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<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[Terence Eden]]></dc:creator>
		<pubDate>Thu, 24 Jan 2019 17:16:04 +0000</pubDate>
		<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>&lt;p&gt;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.&lt;/p&gt;

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

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

&lt;p&gt;To install, simply run:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-_"&gt;sudo make install
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That will give you two new programs.  To get info about your DVDA, run:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-_"&gt;dvda-debug-info -A /path/to/your/AUDIO_TS
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That will pump out details about each track like so:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-_"&gt;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
&lt;/code&gt;&lt;/pre&gt;

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

&lt;p&gt;To extract the tracks, run:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-_"&gt;dvda2wav -A /path/to/your/AUDIO_TS
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That will spit out the files in WAV format.&lt;/p&gt;

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

&lt;p&gt;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 &lt;a href="https://opus-codec.org/"&gt;Opus Codec&lt;/a&gt; which does excellent quality surround sound at low file sizes.&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-_"&gt;opusenc --bitrate 4096 track-01-01.wav 1.opus
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That's about 2MB/minute/channel and I promise that you won't hear the difference.&lt;/p&gt;

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

&lt;p&gt;If you want to add metadata to a track, it's done like this:&lt;/p&gt;

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

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

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

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

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

&lt;p&gt;Here's a scrappy bash script:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-_"&gt;#!/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
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I hope future me finds these notes useful!&lt;/p&gt;
&lt;img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=31270&amp;amp;HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager"&gt;</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>
	</channel>
</rss>
