This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.
Date: Thu, 9 Nov 2000 19:29:03 -0800 From: Joey Hess <joey@kitenet.net> To: svlug@svlug.org Subject: Re: [svlug] how to re-encode mp3 files? David E. Fox wrote: > Currently, though, it won't read mp3 files directly (hence the need to > decompress with mpg123 or similar) and it doesn't seem capable of reading > from stdin. Thinking that it might recognize a '-' as standard input, it > doesn't, it thinks it should be a filename. For those strapped for temporary > space to store the decompressed files, this is not nice. Tried a named pipe? -- see shy jo === Date: Thu, 9 Nov 2000 23:40:14 -0500 From: Bill Jonas <bill@billjonas.com> To: svlug@svlug.org Subject: Re: [svlug] how to re-encode mp3 files? On Thu, Nov 09, 2000 at 07:01:37PM -0800, David E. Fox wrote: > Currently, though, it won't read mp3 files directly (hence the need to > decompress with mpg123 or similar) and it doesn't seem capable of reading > from stdin. Thinking that it might recognize a '-' as standard input, it > doesn't, it thinks it should be a filename. For those strapped for temporary > space to store the decompressed files, this is not nice. Try process substitution. Assuming you're using bash (and I think other shells, such as ksh, support this, but I'm not sure), just use <(command_with_output_to_stdout) instead of an actual filename. The shell will assign a filehandle to the output stream of the command, which can be used just about wherever an actual filename is required for input (I haven't tried output yet). An example might clear this up (I'm going to use one I'm familiar with, rather than possibly confusing you with incorrect syntax for your particular command): Suppose you want to compare two directories; you could then use the following command (the sed command is there to avoid false positives arising from different directory names): $ diff <(ls -lAR /old_dir |sed 's#/old_dir/##') <(ls -lAR /new_dir |sed 's#/new_dir/##') This would show you lines which differ betwee the two directory listings. As far as your problem, just make sure that the mp3->wav command you use directs its output to stdout, then use <($command) in place of a filename for your wav->ogg command. ===