Archive for miscellaneous

Use ffmpeg to transcode .wav to .aac files in bulk

In order to reduce the size of local data for my recent iPhone application, I have to transcode the voice files from .wav to .aac extension. We all know that by using iTunes we could easily convert .wav files to .m4a as long as we change the Import Settings of iTunes’ Preference. Well, an .aac file is the raw data inside a .m4a container, as described here. Command lines are easy to use, however, my problem is I need something to transcode a lot of files all at once.

The following .bat files is the one I used to do so all at once for the following file directory:

for %%A IN (*.wav) DO ffmpeg -i "%%A" "b\%%A.aac"

The generated .aac files are all saved inside ¥b directory, which is something like the following.


After the transcoding, the ¥b directory contains all the .aac files, however, they all have a .wav.aac at the end of their names. To solve this problem, I used a command line ‘rename’, because all my file names are in regular expressions. If not, you have to use another .bat file to rename the files.

ffmpeg is a quite a good tool to transform lots of sound files to other format, unbelievable easy to use and handy.


Extjs 3.xからExtjs 4へ移行

とても忙しいでしたが、最近会社のプロジェクトがどうしてもExtjs3.3.1からExtjs 4へ移行したい。

Ext JS 3 _Compatibility Layer をインストールしてみました。

まずはExt JS 3 to 4 Migration Packをダウンロードした。Extjs 3.3.1, Extjs 3.x-compat, Extjs 4.0.7三つのサイトを立ち上がりましたが、一時間ほど比較したところ、手が動かなければ、まだまだ分からない気がしますね。早速弊社のサイトをExtjs 4.0.7に切り替えた。ログイン画面があまり変わらなかったが、ログインしてみたら、ボタンとリンク以外は全部見えなくなった。汗をかくタイプではないから、やる気が湧いてきた。コツコツやりましょう!!


1. ライブラリファイル、html<head>コード

<link rel=”stylesheet” type=”text/css” href=”http://localhost/ext-4.0.7-gpl/resources/css/ext-all.css” />
<script type=”text/javascript” src=”http://localhost/ext-4.0.7-gpl/bootstrap.js”></script>


Ext JS 3 to 4 Migration