Wineに関するTips

論理ドライブ

~/.wine/dosdevices配下にシンボリックリンクを作成することでファイルシステム上の任意のパスを論理ドライブとして参照させることが出来る。 Wineのインストール後はこのようになっていた。

$ ls -l ~/.wine/dosdevices/
合計 0
lrwxrwxrwx 1 santamarta santamarta 10 2008-04-06 12:20 c: -> ../drive_c
lrwxrwxrwx 1 santamarta santamarta 13 2008-04-09 19:52 d: -> /media/cdrom0
lrwxrwxrwx 1 santamarta santamarta  8 2008-04-09 19:52 d:: -> /dev/hdc
lrwxrwxrwx 1 santamarta santamarta  1 2008-04-06 12:20 z: -> /

ディレクトリ/srv/smb/をドライブレターe:の論理ドライブとして参照させるには、次のようにする。

ln -s /srv/smb/ e:

WMAへのエンコード

Linuxで使えるWindows Media Audioエンコーダはおそらく存在しないので、Linux上でWMAへエンコードするにはWineを使ってWindows用のWMAエンコーダを使う。 まずWindows Media 9 シリーズ - Windows Media Encoding Utilityからwm8eutil_setup.exeをダウンロードし、インストールする。

wine wm8eutil_setup.exe

インストールウィザードが表示されるが、Windowsと同様ウィザードに従って適当に設定して[次へ]で進む。 エンコーダは~/.wine/drive_c/Program Files/Windows Media Components/Tools下にインストールされる。 エンコード例は以下のとおり。

wine WM8EUTIL.exe -input ~/music.wav -output ~/music.wma -a_setting 96_44_2

コマンドラインオプションはwine WM8EUTIL.exe /?で確認できる。

$ wine WM8EUTIL.exe /?

HELP usage for wm8eutil. Use one of the following for how to use wm8eutil.exe.

[-help?]        Display the user help doc for wm8eutil.
[-all?]         Usage for all settings.
[-io?]          Usage for Input/Output and config file.
[-profile?]     Profile numbers and basic descriptions.
[-profileall?]  Details for all profiles.
[-profile_aN?]  Details for audio-only profile N.
[-profile_vN?]  Details for video-only profile N.
[-profile_avN?] Details for audio/video profile N.
                  NOTE: It uses the actual bitrate for N.
                  Example: -profile_a32?.
[-audio?]       Usage for Audio Codec settings.
[-video?]       Usage for Video Codec settings.
[-default?]     All default values for custom settings.
[-a_default?]   Audio default values for custom settings.
[-v_default?]   Video default values for custom settings.
[-cont_desc?]   Usage for how to put content descriptions in the WMV/WMA files.
[-example?]     Examples for how to use wm8eutil.
[-a_example?]   Examples for how to use wm8eutil for audio-only encoding.
[-v_example?]   Examples for how to use wm8eutil for video-only encoding.
[-av_example?]  Examples for how to use wm8eutil for audio/video encoding.
[-d_example?]   Examples for how to use wm8eutil for directory mode encoding.