Software Design 1998 9 月号の記事を参考にファイルの作成から音楽の再生 まで. 結構手間がかかります.
以下の例は下記の環境でのもの.
FreeBSD 2.2.7-RELEASE #0: Sun Mar 14 18:14:53 JST 1999
uranov@angel.dream.or.jp:/usr/src/sys/compile/ANGEL
CPU: AMD-K6tm w/ multimedia extensions (199.90-MHz 586-class CPU)
Origin = "AuthenticAMD" Id = 0x562 Stepping=2
Features=0x8001bf
real memory = 134217728 (131072K bytes)
avail memory = 129261568 (126232K bytes)
angel# tosha -i
Device: /dev/cd0c TOSHIBA CD-ROM XM-3401TA 3593
track playing start end raw size mp3 size # of
number time sector sector in bytes 128 kbps frames
--------------------------------------------------------------
1 5:45'00 37 25911 60858000 5520835 13208
2 5:18'38 25912 49799 56184576 5096941 12193
3 4:28'37 49800 69936 47362224 4296728 10279
4 5:00'38 69937 92474 53009376 4808941 11504
5 5:21'37 92475 116586 56711424 5144728 12308
6 5:06'38 116587 139574 54067776 4904941 11734
7 4:48'25 139575 161199 50862000 4614168 11038
8 5:36'50 161200 186449 59388000 5387501 12889
9 5:23'00 186450 210674 56977200 5168835 12365
10 5:51'00 210675 236999 61916400 5616835 13437
11 4:57'15 237000 259289 52426080 4756035 11378
--------------------------------------------------------------
total 57:36'53 259253 sectors 609763056 55390897 132328
angel# tosha -t 3
Device: /dev/cd0c TOSHIBA CD-ROM XM-3401TA 3593
track playing start end raw size mp3 size # of
number time sector sector in bytes 128 kbps frames
--------------------------------------------------------------
3 4:28'37 49800 69936 47362224 4296728 10279
Reading to track03.pcm ...
Transferred 45.168 Mb in 269.0 seconds, 176.1 kb/s, speed: 1.0.
angel# ls -l track03.pcm
-rw-r--r-- 1 root users 47362224 Jun 10 01:17 track03.pcm
angel# pcmplay track03.pcm
angel% time sox -t raw -r 44100 -c 2 -s -w track03.pcm akai_maboroshi.wav
41.770u 3.776s 0:46.35 98.2% 107+230k 4+741io 4pf+0w
angel% time lamer2.1f mokuren_no_namida.wav mokuren_no_namida.mp3
WAVE : Found WAV header. Assuming 44.1khz 16bit stereo samples
Encoding mokuren_no_namida.wav to mokuren_no_namida.lamer.mp3
Encoding as 44.1 kHz 128 kbps stereo MPEG-1 LayerIII file
Frame: [11205/11205] - Time: 854s - Remaining Time: 0s Total Time: 854s
852.625u 2.538s 14:17.36 99.7% 117+1198k 258+73io 9pf+0w
angel% time lame3.12b4 mokuren_no_namida.wav mokuren_no_namida.lame.mp3
LAME version 3.12 (beta 4) (www.sulaco.org/mp3)
WAVE : Found WAV header. Assuming 44.1khz 16bit stereo samples
Encoding mokuren_no_namida.wav to mokuren_no_namida.lame.mp3
Encoding as 44.1 kHz 128 kbps j-stereo MPEG-1 LayerIII file
using GPSYCHO: GPL'd psycho-acoustic model
Frame: [11205/11205] Encoding Time 15:02/15:02 (0.33x) ETA 00:00
899.496u 2.881s 15:05.15 99.6% 123+861k 7+72io 10pf+0w
angel% time bladeenc -QUIT mokuren_no_namida.wav mokuren_no_namida.blade.mp3
Blade's MP3 Encoder v0.76 Homepage: http://home8.swipnet.se/~w-82625
========================= This is freeware!
BSD-port by Giao Nguyen (gnguyen@cs.berkeley.edu)
L3ENC commandline detected. BladeEnc now running in L3ENC emulation mode.
Encoding: mokuren_no_namida.wav
Input: 44.1 kHz, 16 bit, stereo.
Output: 112 kBit, stereo.
Completed. Encoding time: 00:34:02
2027.181u 4.803s 34:02.41 99.4% 138+1168k 6+65io 13pf+0w
% time 8hz-mp3 akai_maboroshi.wav akai_maboroshi_8hz.mp3
8hz-mp3 1998 8Hz software http://www.8hz.com
Microsoft RIFF, WAVE audio, PCM, stereo 44100Hz 16bit, Length: 0: 4:28
MPEG-I layer III, stereo Psychoacoustic Model: AT&T
Bitrate=128 kbps De-emphasis: none CRC: off
Encoding "akai_maboroshi.wav" to "akai_maboroshi_8hz.mp3"
[Frame 10278 of 10278] (100.00%) Finished in 0:43:21
2588.079u 3.233s 43:21.08 99.6% 189+655k 2+66io 6pf+0w
angel% mpg123 heron.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2 and 3.
Version 0.59o (1998/Feb/08). Written and copyrights by Michael Hipp.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
Playing MPEG stream from heron.mp3 ...
MPEG 1.0 layer III, 128 kbit/s, 44100 Hz stereo
[4:42] Decoding of heron.mp3 finished.
% amp mp3file
angel% amp mokuren_no_namida.mp3
amp 0.7.6, (C) Tomislav Uzelac 1996,1997
THIS PROGRAM COMES WITH ABSOLUTELY NO WARRANTY
PLEASE READ THE DOCUMENTATION FOR DETAILS
Playing: mokuren_no_namida.mp3
Properties: stereo 44100Hz
Coding Method: MPEG1.0 layer3
Bitrate: 128kbit/s
Thank you for using amp!
この他 xaudio(share ware) 等もあるようですが, 使っていません.
上記 2 つはコマンドラインで使用するタイプですが, これにかぶせる
GUI もあります. (それぞれ xmpeg3-1.0.tgz, x11amp-0.7.tgz 等)
これも使っていません.