{"id":1174,"date":"2011-08-25T15:15:01","date_gmt":"2011-08-25T13:15:01","guid":{"rendered":"http:\/\/raftaman.net\/?p=1174"},"modified":"2021-05-15T11:46:39","modified_gmt":"2021-05-15T09:46:39","slug":"split-flac-file-into-tracks-using-a-cuesheet","status":"publish","type":"post","link":"https:\/\/possiblelossofprecision.net\/?p=1174","title":{"rendered":"Split flac file into tracks using a cuesheet"},"content":{"rendered":"<p><code>shnsplit<\/code> (part of the &#8220;multi-purpose WAVE data processing and reporting utility&#8221; <code>shntool<\/code> package) provides a simple method to split flac files into individual tracks specified in a cuesheet.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n$ shnsplit -o flac -f CUESHEET.cue -t %n.%t FLACFILE.flac\r\n<\/pre>\n<p>With the custom output format module, you can even transcode the tracks directly to another format, e.g. mp3, if your mobile music player doesn&#8217;t support flac.<\/p>\n<p><a href=\"http:\/\/snippets.dzone.com\/posts\/show\/7261\">snippets.dzone.com<\/a> provides an exemplary script for this.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n#!\/bin\/sh\r\nset -e\r\nENCODE=&quot;cust ext=mp3 lame -b 192 - %f&quot;\r\nFORMAT=&quot;%n.%t&quot;\r\n\r\nFLACFILE=$1\r\nCUEFILE=$2\r\necho $FLACFILE - $CUEFILE\r\nif &#x5B; -z &quot;$FLACFILE&quot; ]; then\r\n    echo &quot;usage: flac2mp3 FLAC_FILE &#x5B;CUE_FILE]&quot;\r\n    exit 1\r\nelif &#x5B; -z &quot;$CUEFILE&quot; ]; then\r\n    DIRECTORY=$(dirname &quot;$FLACFILE&quot;)\r\n    BASENAME=$(basename &quot;$FLACFILE&quot; &quot;.flac&quot;)\r\n    CUEFILE=&quot;$DIRECTORY\/$BASENAME.cue&quot;\r\nfi\r\n\r\nshnsplit -O always -o &quot;$ENCODE&quot; -f &quot;$CUEFILE&quot; -t &quot;$FORMAT&quot; &quot;$FLACFILE&quot;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>shnsplit (part of the &#8220;multi-purpose WAVE data processing and reporting utility&#8221; shntool package) provides a simple method to split flac files into individual tracks specified in a cuesheet. $ shnsplit -o flac -f CUESHEET.cue -t %n.%t FLACFILE.flac With the custom output format module, you can even transcode the tracks directly to another format, e.g. mp3, if your mobile music player&#8230; <a href=\"https:\/\/possiblelossofprecision.net\/?p=1174\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[44],"class_list":["post-1174","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-mp3"],"_links":{"self":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/1174","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1174"}],"version-history":[{"count":4,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/1174\/revisions"}],"predecessor-version":[{"id":1178,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/1174\/revisions\/1178"}],"wp:attachment":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1174"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}