fade: Generate fade.ggo from m4 template.
[paraslash.git] / m4 / gengetopt / afh.m4
1 args "--unamed-opts=audio_file --no-handle-version"
2
3 include(header.m4)
4 <qu>
5 text "
6 para_afh, the audio format handler tool, is a stand-alone program
7 contained in the paraslash package for analyzing and streaming audio
8 files. It can be used to
9
10         - print tech info about the given audio file to stdout.
11         In particular, the 'chunk table' of the audio file, an array
12         of offsets within the audio file, may be printed. This table
13         can be used by other programs unaware of the particular audio
14         format to stream the audio file.
15
16         - write selected parts of the given audio file in complete
17         chunks without decoding. Thus para_afh can be used to 'cut'
18         an audio file.
19
20         - write selected parts of the given audio files 'just in time'
21         to stdout. This may be useful for third-party software that
22         is capable of reading from stdin.
23 "
24 </qu>
25
26 include(loglevel.m4)
27
28 <qu>
29 defgroup "mode"
30 #--------------
31 groupdesc="
32         There are two modes of operation: Info mode and stream mode,
33         one of which must be selected by the corresponding option.
34         See below.
35 "
36 required
37
38 groupoption "info" i
39 #~~~~~~~~~~~~~~~~~~~
40 "select info mode"
41 group="mode"
42 details="
43         In this mode, the program prints technical information about
44         the given audio file to stdout.
45 "
46
47 groupoption "stream" s
48 #~~~~~~~~~~~~~~~~~~~~~
49 "select stream mode"
50 group="mode"
51 details="
52         If this mode is selected, the selected parts of the content
53         of the audio file are written to stdout. Only complete chunks
54         with respect of the underlying audio format are written.
55         For example, only complete frames in case of mp3 files.
56 "
57
58 section "Options for info mode"
59 #==============================
60
61 option "chunk_table" c
62 #~~~~~~~~~~~~~~~~~~~~~
63 "print also the chunk table"
64 flag off
65 dependon="info"
66
67 option "human" u
68 #~~~~~~~~~~~~~~~
69 "use human-readable output format"
70 flag off
71 dependon = "info"
72 details = "
73         Currently this option only affects the format of the chunk table,
74         so it has no effect if --chunk_table is not given.
75
76         The human-readable output consists of one output line per
77         chunk and the output contains also the chunk number, the
78         duration and the size of each chunk.
79 "
80
81 section "Options for stream mode"
82 #================================
83
84
85 option "begin_chunk" b
86 #~~~~~~~~~~~~~~~~~~~~~
87 "skip a number of chunks"
88 int typestr="chunk_num"
89 default="0"
90 dependon="stream"
91 optional
92 details="
93         The chunk_num argument must be between -num_chunks and
94         num_chunks - 1 inclusively where num_chunks is the total number
95         of chunks which is printed when using the --info option. If
96         chunk_num is negative, the given number of chunks are counted
97         backwards from the end of the file. For example --begin_chunk
98         -100 instructs para_afh to start output at chunk num_chunks
99         - 100. This is mainly useful for cutting off the end of an
100         audio file.
101 "
102
103 option "end_chunk" e
104 #~~~~~~~~~~~~~~~~~~~
105 "only write up to chunk chunk_num"
106 int typestr="chunk_num"
107 dependon="stream"
108 optional
109 details="
110         For the chunk_num argument the same rules as for --begin_chunk
111         apply.  The default is to write up to the last chunk.
112 "
113
114 option "just_in_time" j
115 #~~~~~~~~~~~~~~~~~~~~~~
116 "use timed writes"
117 flag off
118 dependon="stream"
119 details="
120         Write the specified chunks of data 'just in time', i.e. the
121         write of each chunk is delayed until the time it is needed
122         by the decoder/player in order to guarantee an uninterrupted
123         audio stream.
124 "
125
126 option "no_header" H
127 #~~~~~~~~~~~~~~~~~~~
128 "do not write an audio file header"
129 flag off
130 dependon="stream"
131 details="
132         If an audio format needs information about the audio file
133         in a format-specific header in order to be understood by
134         the decoding software, a suitable header is automatically
135         send. This option changes the default behaviour, i.e. no
136         header is written.
137 "
138 </qu>