{"id":8614,"date":"2005-02-11T00:49:31","date_gmt":"2005-02-10T22:49:31","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/2005\/02\/11\/converting-flac-to-mp3-on-linux\/"},"modified":"2005-04-17T06:08:47","modified_gmt":"2005-04-17T03:08:47","slug":"converting-flac-to-mp3-on-linux","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2005\/02\/11\/converting-flac-to-mp3-on-linux\/","title":{"rendered":"Converting FLAC to MP3 on Linux"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p>FLAC is <a href=\"http:\/\/flac.sourceforge.net\/\">Free Lossless Audio Codec<\/a>.  A 35 megabyte WAV file converted to FLAC will occupy about 25 megabytes.  This is a good decrease in size, considering the fact that no quality is lost.  But some files aren&#8217;t all about quality and thus will be much better in mp3 or even ogg.  Converting these is really simple.  The key to the convertion is to decode flac files back to wav and than to convert them to whatever else is that you want.<\/p>\n<p>Here is an example script to convert a bunch of flac files in the directory to mp3s.<\/p>\n<pre>for FILE in *.flac\r\ndo\r\n echo Converting $FILE\r\n # Decode FLAC back to WAV\r\n \/usr\/bin\/flac -d \"$FILE\"\r\n # Save the filename without extension\r\n BASE=`basename \"$FILE\" .flac`\r\n # Convert resulting WAV to MP3 with variable bitrate preserving good quality\r\n \/usr\/bin\/lame -h -V 2 \"$BASE\".wav \"$BASE\".mp3\r\ndone\r\n<\/pre>\n<p><code>\/usr\/bin\/flac<\/code> utility is a part of Fedora Linux distribution. <code>\/usr\/bin\/lame<\/code> is a part of <a href=\"http:\/\/lame.sourceforge.net\/\">LAME project<\/a>.  RPMs for Fedora Linux are available from a number of repositories, such as <a href=\"http:\/\/freshrpms.net\">FreshRPMs<\/a>.<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>FLAC is Free Lossless Audio Codec. A 35 megabyte WAV file converted to FLAC will occupy about 25 megabytes. This is a good decrease in size, considering the fact that no quality is lost. But some files aren&#8217;t all about quality and thus will be much better in mp3 or even ogg. Converting these is &hellip; <a href=\"https:\/\/mamchenkov.net\/wordpress\/2005\/02\/11\/converting-flac-to-mp3-on-linux\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Converting FLAC to MP3 on Linux<\/span><\/a><\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_links_to":"","_links_to_target":""},"categories":[1,62],"tags":[],"keyring_services":[],"class_list":["post-8614","post","type-post","status-publish","format-standard","hentry","category-general","category-technology"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":12675,"url":"https:\/\/mamchenkov.net\/wordpress\/2010\/07\/08\/flac2mp3\/","url_meta":{"origin":8614,"position":0},"title":"flac2mp3","author":"Leonid Mamchenkov","date":"July 8, 2010","format":false,"excerpt":"I was going through Fedora Planet stream when I noticed this blog post about converting Flac files to mp3 on Linux. \u00a0 That reminded me of a couple of folders with files that I can't listen to in my car. \u00a0So I thought I'd convert them now, especially that I\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":8890,"url":"https:\/\/mamchenkov.net\/wordpress\/2005\/04\/25\/quote-of-the-day\/","url_meta":{"origin":8614,"position":1},"title":"Quote of the day","author":"Leonid Mamchenkov","date":"April 25, 2005","format":false,"excerpt":"Microsoft .WAV RIFF files. These appear to be very similar to IFF files, but not the same. They are the native sound file format of Windows. (Obviously, Windows was of such incredible importance to the computer industry that it just had to have its own sound file format.) Normally .wav\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":7538,"url":"https:\/\/mamchenkov.net\/wordpress\/2004\/05\/28\/historical-speeches\/","url_meta":{"origin":8614,"position":2},"title":"Historical speeches","author":"Leonid Mamchenkov","date":"May 28, 2004","format":false,"excerpt":"Here is an interesting site - \"Historical speeches\". The interface is in Russian, but there are pictures of well-known people and original titles of their talks. Speeches are in MP3 or WAV format with the appropriate file size indicated nearby. Enjoy. :)","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":9730,"url":"https:\/\/mamchenkov.net\/wordpress\/2005\/12\/03\/castoggsh-make-podcasts-smaller\/","url_meta":{"origin":8614,"position":3},"title":"castogg.sh &#8211; make podcasts smaller","author":"Leonid Mamchenkov","date":"December 3, 2005","format":false,"excerpt":"As you might know, podcasts are like radio shows recorded and distributed digitally (read: mp3 and RSS). Since pretty much anyone can record a show and distribute it over the Internet - everyone and their brother do that. The file sizes of some podcasts are huge. There are shows that\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":7494,"url":"https:\/\/mamchenkov.net\/wordpress\/2004\/05\/10\/vim-for-perl-developers\/","url_meta":{"origin":8614,"position":4},"title":"Vim for Perl developers","author":"Leonid Mamchenkov","date":"May 10, 2004","format":false,"excerpt":"This is my attempt to provide a clear and simple instructions on adopting Vim text editor for programming needs. I am using Perl as the programming language in the examples, but most of this document will apply equally for any other programming language. Update: This post was translated into Portuguese\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":12852,"url":"https:\/\/mamchenkov.net\/wordpress\/2010\/07\/28\/nature-sounds\/","url_meta":{"origin":8614,"position":5},"title":"Nature sounds","author":"Leonid Mamchenkov","date":"July 28, 2010","format":false,"excerpt":"Via Michael's blog post I discovered an excellent web service - free nature sounds. \u00a0Once you get there, you can select up to four different nature sounds and mix them into a single loop, varying volume and stereo balance. \u00a0It's very easy to use and there is a good selection\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2010\/07\/nature_sounds-500x423.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/8614","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=8614"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/8614\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=8614"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=8614"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=8614"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=8614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}