I can compress a wav file using an absolute path:flac /data/all/temp/a/1.wav
If I try to put the output file in a different directory it throws an error:flac --output-prefix=/data/all/temp/b/ /data/all/temp/a/1.wav
However, if I don't use an absolute path for the input file it does work:cd /data/all/temp/a/flac --output-prefix=/data/all/temp/b/ 1.wav
Here's the error:
1.wav: ERROR initializing encoder
init_status = FLAC__STREAM_ENCODER_INIT_STATUS_ENCODER_ERROR
state = FLAC__STREAM_ENCODER_IO_ERROR
An error occurred opening the output file; it is likely that the output
directory does not exist or is not writable, the output file already exists and
is not writable, or the disk is full.
Is that just something that's not supposed to work or have I made a mistake?
In your example flac will try to write to
and it will fail because directory
probably doesn't exist. In other words, flac doesn't strip the directory part from inputs before concatenating them with output prefix.
Ah, thanks very much! I'll just "cd" into the right directory each time then. Glad it's not me going crazy :-)