{"id":223,"date":"2009-06-01T13:38:54","date_gmt":"2009-06-01T18:38:54","guid":{"rendered":"http:\/\/muthii.com\/blog\/?p=223"},"modified":"2009-06-05T11:28:31","modified_gmt":"2009-06-05T16:28:31","slug":"convert-wmamp3-to-ogg","status":"publish","type":"post","link":"https:\/\/muthii.com\/blog\/?p=223","title":{"rendered":"Convert wma\/mp3 to ogg"},"content":{"rendered":"<p>Had a few wma&#8217;s I needed to convert to a different format as I was having trouble streaming them over the net with my internet jukebox. I decided to go with ogg since I don&#8217;t have a decent hardware setup, GUI converters did not give me the best output. I tried both <a href=\"http:\/\/oggconvert.tristanb.net\/\">oggconvert<\/a> and <a href=\"http:\/\/soundconverter.berlios.de\/\">soundconverter<\/a> both are great apps, but my hardware didn&#8217;t do them justice, but the command line came to my rescue. To convert the wma&#8217;s to ogg I used this cmd<\/p>\n<pre>find -name '*wma' -exec ffmpeg -i {} -acodec vorbis -ab 128k {}.ogg \\;<\/pre>\n<p> This will convert all wma&#8217;s in the folder and subdirectories to ogg and you don&#8217;t have to take out empty spaces in the file names, it handles them ok.<br \/>\nAll the new files have a name &#8220;track name.wma.ogg&#8221; to rename them to &#8220;track name.ogg&#8221; I was given this handy scripts by my friends at LinuxQuestions.org. <\/p>\n<pre>for file in *.wma.ogg; do mv \"${file}\" \"${file%.wma.ogg}.ogg\"; done<\/pre>\n<p> and<\/p>\n<pre>for file in *.wma.ogg; do mv \"${file}\" \"${file\/.wma.ogg\/.ogg}\"; done<\/pre>\n<p> This last one is a  more general solution that keeps the first part, and the last part, regardless of the extensions used <\/p>\n<pre>for file in <span style=\"color: #ff00ff;\">*.wma.ogg<\/span>; do mv \"${file}\" \"${file%%.*}.${file##*.}\"; done<\/pre>\n<p> just change your <span style=\"color: #ff00ff;\">variable<\/span> to suit whatever you are working with.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Had a few wma&#8217;s I needed to convert to a different format as I was having trouble streaming them over the net with my internet jukebox. I decided to go with ogg since I don&#8217;t have a decent hardware setup, GUI converters did not give me the best output. I tried both oggconvert and soundconverter &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/muthii.com\/blog\/?p=223\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Convert wma\/mp3 to ogg&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,83,46],"tags":[84,85,86],"_links":{"self":[{"href":"https:\/\/muthii.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/223"}],"collection":[{"href":"https:\/\/muthii.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/muthii.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/muthii.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/muthii.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=223"}],"version-history":[{"count":4,"href":"https:\/\/muthii.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/223\/revisions"}],"predecessor-version":[{"id":231,"href":"https:\/\/muthii.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/223\/revisions\/231"}],"wp:attachment":[{"href":"https:\/\/muthii.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/muthii.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/muthii.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}