Missing quotes for flac files with spaces added.
[clinton/abcde.git] / USEPIPES
CommitLineData
c1bbe6c3 1An approach for reading and encoding taken in abcde is the use of Unix pipes.
2
3By this way, a program sends as output what another programs expects as input,
4without writing the information in the hard disk.
5
6For it to work with abcde, a ripper must send the data of the CD tracks which
7are ripped to the standard output, while sending the information and error
8messages to another "stream", so that the encoder does not get confused. This
9second stream is called "standard error".
10
11The encoder program needs to be able to encode the information send to it by
12reading from the standard input (which is what the ripper sends to the standard
13output).
14
15Usually Unix/Linux programs deal with the standard input/output by using the
16special file name "-", as in the following example:
17
18cdripper -o - | audioencoder -i - -o file.ext
19
20The "cdripper" program uses the flag "-o" to identify the file it will output
21the data to. For the "audioencoder" program to be able to read the output
22through a Unix pipe (the "|" symbol), the output needs to be sent to the
23standard output using the "-" special filename.
24
25Once the output has been pipped to "audioencoder" we use the same special
26filename to read the information as input with the "-i" flag and output it to
27"file.ext" with the "-o" flag.
28
29Keep in mind that the example above is only that, an example, and every ripper
30and encoder differs from in each other in the way they interact with pipes.
31
32For one reason, not all the rippers and encoders are supported by abcde: the
33author (or the users) have not included support for them.
34
35If you plan to use a ripper or encoder which is not supported, you need to know
36how to use the ripper/encoder. For example, cdparanoia just uses "-" as the
37output filename and works. The program used to decode FLAC files (yes, abcde
38supports "ripping" from a FLAC file :) uses "-c ".
39
40To add support for a ripper called "cdripper" which uses the "-" special flag
41for outputting to the standard output, you need to open the config file (either
42/etc/abcde.conf or ~/.abcde.conf) and add the line:
43
44PIPERIPPER_cdripper="-"
45
46For an encoder called "audioencoder" which uses "--stdin" to read the pipe
47input, you need to add:
48
49PIPE_audioencoder="--stdin"
50
51Of course, you should try your configuration and report it so that it can be
52included in future versions of abcde.
53
54If you are familiar with POSIX shell programing, please open "abcde" and take a
55look at the lines below the one marked with "###USEPIPESSUPPORT###".
56
57Thanks for your time!