{"id":2196,"date":"2021-11-18T14:44:26","date_gmt":"2021-11-18T21:44:26","guid":{"rendered":"https:\/\/www.itayemi.com\/blog\/?p=2196"},"modified":"2021-11-19T14:41:27","modified_gmt":"2021-11-19T21:41:27","slug":"converting-wma-mp3-and-swf-mp4-using-ffmpeg","status":"publish","type":"post","link":"https:\/\/www.itayemi.com\/blog\/2021\/11\/18\/converting-wma-mp3-and-swf-mp4-using-ffmpeg\/","title":{"rendered":"Converting WMA\/MP3 and SWF\/MP4 using FFMPEG"},"content":{"rendered":"\n<p>Using Apple MAC OSX to convert WMA to MP3<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>in terminal app, install brew, run:  ruby -e &#8220;$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/master\/install)&#8221; &lt; \/dev\/null 2&gt; \/dev\/null<\/li><li>in terminal app, run &#8220;brew install ffmpeg&#8221;<\/li><li>then you can run a command such as &#8220;ffmpeg -i input.wma -q:a 0 output.mp3&#8221; to convert a file called input.wma to output.mp3<\/li><li>if you have all the WMA files in the same directory\/folder, you can create a script that will convert them all in one go<\/li><li>save the 6 lines below into a text file in the same directory as the WMA files e.g., called the file my_converter<\/li><li>make the script executable with the command &#8220;chmod 700 my_converter&#8221;<\/li><li>run the script with the command &#8220;.\/my_converter&#8221; (without the double-quotes)<\/li><li>you can change the 128k to something like 192k or smaller\/bigger depending on the quality you want to MP3 to have<\/li><li>the 44100 frequency can also be increased to something like 48000 if you want<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Below is the script (assumes all the source files are in the same directory)<\/li><\/ul>\n\n\n\n<p>#!\/bin\/bash<br>echo WMA to mp3 converter! Work begins!<br>for FILE in *.wma; do<br>   echo -e &#8220;Processing file &#8216;$FILE'&#8221;;<br>   ffmpeg -i &#8220;${FILE}&#8221; -vn -ab 128k -ar 44100 -y &#8220;${FILE%.wma}.mp3&#8221;;<br>done;<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Convert Flash SWF to MP4 using Linux<\/strong><\/p>\n\n\n\n<p>&#8211; Install ffmpeg (CentOS 7)<br>$ sudo yum install epel-release<br>$ sudo yum localinstall &#8211;nogpgcheck https:\/\/download1.rpmfusion.org\/free\/el\/rpmfusion-free-release-7.noarch.rpm<br>$ sudo yum install ffmpeg ffmpeg-devel<\/p>\n\n\n\n<p>&#8211; Below is the script (assumes all the source files are in the same directory)<\/p>\n\n\n\n<p><s>#!\/bin\/bash<br>echo SWF to MP4 converter! Work begins!<br>for FILE in *.swf; do<br>   echo -e &#8220;Processing file &#8216;$FILE'&#8221;;<br>   ffmpeg -i &#8220;${FILE}&#8221; &#8220;${FILE}.mp4&#8221;;<br>done;<\/s><\/p>\n\n\n\n<p>NOTE: the conversion didn&#8217;t work out.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>&#8211; Then I found some reference to using SWFtools and Gnash<\/p>\n\n\n\n<p>git clone git:\/\/git.sv.gnu.org\/gnash.git<br>sudo yum install -y agg-devel boost-devel SDL-devel GConf2-devel expat expat-devel libjpeg-devel speex-devel fontconfig-devel giflib-devel dejagnu curl-devel haxe<\/p>\n\n\n\n<p>cd gnash\/<br>\/autogen.sh<br>.\/configure &#8211;enable-renderer=agg &#8211;enable-gui=dump &#8211;disable-menus &#8211;enable-media=ffmpeg &#8211;disable-jemalloc<br>make<br>sudo make install<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>NOTE: the conversions didn&#8217;t work properly, but old Firefox versions such as 47 can play the flash files. You can find Firefox 47 portable with flash on the Internet.<br>Just download it, run it, and choose &#8220;File -> Open File \u2026&#8221; from the Firefox menu (ALT+F) and select the flash file<br>do not use this browser for regular browsing since it is hold and likely hackable \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Using Apple MAC OSX to convert WMA to MP3 in terminal app, install brew, run: ruby -e &#8220;$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/master\/install)&#8221; &lt; \/dev\/null 2&gt; \/dev\/null in terminal app, run &#8220;brew install ffmpeg&#8221; then you can run a command such as &#8220;ffmpeg &hellip; <a href=\"https:\/\/www.itayemi.com\/blog\/2021\/11\/18\/converting-wma-mp3-and-swf-mp4-using-ffmpeg\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":336,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2196","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/posts\/2196","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/users\/336"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/comments?post=2196"}],"version-history":[{"count":5,"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/posts\/2196\/revisions"}],"predecessor-version":[{"id":2201,"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/posts\/2196\/revisions\/2201"}],"wp:attachment":[{"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/media?parent=2196"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/categories?post=2196"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/tags?post=2196"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}