こんにちは 奥井です。 その後、ecasound<http://eca.cx/ecasound/>を読んでいたらecasoundとlameを使ってラジオ録音した記事を見つけたのでそこを参考にしましたがどうもうまくいきません。 Linux based Radio Timeshifting<http://linuxgazette.net/issue94/yan-fa.html> ここでecasoundでstdoutにwavファイルを出力してlameに-rオプションをつけてpipeでファイルを渡してるようなんですが、エラーがでます。 [sus@P4G sus]$ ecasound -dd -b 128 -i:/dev/dsp -o:stdout -t:10 |lame -r somefile.mp3 Could not find "somefile.mp3". (eca-session) Set debug level to: 319 [* Session created *] [* Chainsetup created (cmdline) *] (audioio-db-server) constructor (eca-chainsetup-parser) Interpreting object option "-f:s16_le,2,44100,i". (eca-chainsetup-parser) Set active format to (bits/channels/srate/interleave): s16_le/2/44100/i (eca-chainsetup) sample rate change, chainsetup command-line-setup to rate 44100. (eca-chainsetup-parser) Interpreting object option "-z:mixmode,avg". (eca-static-object-maps) register_chain_operator_objects() (eca-static-object-maps) register_controller_objects() (eca-chainsetup-parser) Interpreting global option "-b:128". (eca-chainsetup) overriding buffersize. (eca-chainsetup-parser) Setting buffersize to (samples) 128. (eca-chainsetup-parser) Interpreting global option "-i:/dev/dsp". (eca-chainsetup-parser) Interpreting global option "-o:stdout". (eca-chainsetup-parser) Interpreting global option "-t:10". (eca-chainsetup-parser) Set processing time to 10.00. (eca-chain) constructor: CHAIN (eca-chainsetup) Chain "default" created. (eca-chainsetup-parser) Interpreting object option "-b:128". (eca-chainsetup-parser) Interpreting object option "-i:/dev/dsp". (eca-static-object-maps) register_audio_io_rt_objects() (eca-object-factory) Object "-i:/dev/dsp" created, type "OSS soundcard device". Has 1 parameter(s). (eca-chainsetup-parser) adding file "/dev/dsp". (audioio) set srate, aobj 'OSS soundcard device:/dev/dsp' to 44100. (eca-chainsetup) Assigning file to chains: default (eca-chainsetup-parser) Interpreting object option "-o:stdout". (eca-static-object-maps) register_audio_io_nonrt_objects() (eca-object-factory) Object "-o:stdout" created, type "Raw audio file". Has 2 parameter(s). (eca-chainsetup-parser) adding file "stdout". (audioio) set srate, aobj 'Raw audio file:stdout' to 44100. (audioio-db-client) DB-client created for stdout. (audioio) set srate, aobj 'DB => Raw audio file:uninitialized' to 44100. (audioio) set srate, aobj 'Raw audio file:stdout' to 44100. (audioio) set srate, aobj 'Raw audio file:stdout' to 44100. (eca-chainsetup) Assigning file to chains: default (eca-chainsetup-parser) Interpreting object option "-t:10". [* Connecting chainsetup *] (eca-chainsetup) overriding raised priority. (eca-chainsetup) bmode-selection case-2 (eca-chainsetup) 'rt' buffering mode selected. (eca-chainsetup) Set buffering parameters to: --cut-- buffersize: 1024 raised_priority: 1 sched_priority: 50 double buffering: 1 double buffer size: 100000 max buffers: 1 --cut-- (audioio-oss) (audioio-oss) Setting OSS fragment size according to 128. (audioio-oss) (audioio-oss) set OSS fragment size to (2^x) 9. (audioio-oss) (audioio-oss) OSS set to use fragment size of 512. (eca-chainsetup) Audio object "/dev/dsp", mode "read". (audio-io) Format: s16_le, channels 2, srate 44100, interleaved. (audioio-db-client) open stdout. (audioio-raw) Outputting to standard output [rw]. (audioio) set srate, aobj 'DB => Raw audio file:stdout' to 44100. (audioio) set srate, aobj 'Raw audio file:stdout' to 44100. (audioio) set srate, aobj 'Raw audio file:stdout' to 44100. (audioio-db-server) Registering client 0. Buffer count 781. (audioio-db-client) seek stdout to pos 0.00. (audioio-db-client) seek stdout to pos 0.00. (eca-chainsetup) Audio object "stdout", mode "read/write". (audio-io) Format: s16_le, channels 2, srate 44100, interleaved. (eca-chainsetup) sample rate change, chainsetup command-line-setup to rate 44100. (audioio) set srate, aobj 'OSS soundcard device:/dev/dsp' to 44100. (audioio) set srate, aobj 'DB => Raw audio file:stdout' to 44100. (audioio) set srate, aobj 'Raw audio file:stdout' to 44100. [* Chainsetup connected *] (eca-control-objects) Connected chainsetup: "command-line-setup". [* Controller/Starting batch processing *] (eca-engine) Engine/Initializing (eca-engine) Prefill loops: 63 (blocksize 128). (eca-chain) Initialized chain default with 0 chainops and 0 gcontrollers. Sbuf points to 137418832. (eca-control-base) Engine-thread pid: 2830 [* Engine init - Driver start *] (eca-engine) Request start (audioio-db-server) start (audioio-db-server) starting processing (eca-engine) prefilling i/o buffers. (audioio-db-server) Hey, in the I/O loop! (audioio-db-server) Using idle timeout of 226000000 nsecs. (eca-engine) i/o buffers prefilled. (eca-engine) starting engine operation! (audioio-oss) (audioio-oss) Audio device "/dev/dsp" started. <--------ここでしばらく止まってから以下のメッセージがでます。 (eca-engine) output error - stop (eca-engine) stopping engine operation! (audioio-oss) (audioio-oss) Audio device "/dev/dsp" disabled. (audioio-db-server) stop (eca-engine) Signaling stop (eca-engine) Signaling exit (eca-engine) WARNING: An output object has raised an error! Possible causes: Out of disk space, permission denied, unable to launch external applications needed in procesing, etc. (eca-engine) Engine state when finishing: 4 [* Controller/Batch processing finished *] (eca-control-objects) Disconnecting chainsetup: "command-line-setup". (eca-chainsetup) Closing chainsetup "command-line-setup" (eca-chainsetup) Closing audio device/file "/dev/dsp". (eca-chainsetup) Closing audio device/file "stdout". (audioio-db-client) close stdout. [* Chainsetup disconnected *] (eca-chainsetup) ECA_CHAINSETUP destructor! (eca-chainsetup) Deleting chain "default". (eca-chain) CHAIN destructor! (eca-chainsetup) Deleting audio object "/dev/dsp". (eca-chainsetup) Deleting audio db-client "stdout". (audioio-db-client) destructor stdout. (audioio-db-server) unregister_client Raw audio file. (eca-chainsetup) Deleting audio object "stdout". (audioio-db-server) destructor ecasoundでエラーがでてるようなので stdoutに書き込めないのかなと思い[sus@P4G sus]$ ecasound -dd b:64 -i:/dev/dsp -o:stdout -t:10 でやったら画面に一杯文字が出てきたので書き込めていると思いますが。 [sus@P4G sus]$ ls -lh somefile* -rw-r--r-- 1 sus sus 0 Nov 10 11:40 somefile.mp3 -rw-r--r-- 1 sus sus 1.2k Nov 10 13:07 somefile.mp3.mp3 -rw-r--r-- 1 sus sus 1.7M Nov 10 12:26 somefile.wav 又、lameの動作もよくわかりません。somefile.mp3がないとエラーがでますCould not find "somefile.mp3". somefile.mp3を作っておくとsomefile.mp3.mp3が作られます。 コマンド自体はちゃんと動作しました。 ecasound -i:/dev/dsp -o somefile.wav -t:10 lame somefile.wav sample.mp3 なにか気がついた点などあれば助言お願いします。