Make other file ops than save/load use different dialog
[jpcrr.git] / streamtools / manual.txt
blob918e9844a9dd4891c83deab5170cb174be84649f
1 Dumping processing tools manual
3 1 Concatenating dumps
5 Concatenation of dump files is concatenation of their contents. 
6 So cat and similar tools can be used to concatenate dumps.
8 2 audiotodump.exe
10 Converts raw PCM audio to dump file containing said audio as PCM 
11 audio track.
13 Syntax: audiotodump.exe <options> <input> <stream> <output>
15 Convert raw PCM audio from file <input> to dump named <output>. 
16 The audio data is placed as PCM-type stream named <stream>.
18 2.1 Options
20 2.1.1 --8bit
22 Assume that samples in file are 8 bits per channel.
24 2.1.2 --16bit
26 See --16bit-little-endian
28 2.1.3 --16bit-little-endian
30 Assume that sample in file are 16 bits per channel and 
31 little-endian. This is the default.
33 2.1.4 --16bit-big-endian
35 Assume that sample in file are 16 bits per channel and 
36 big-endian.
38 2.1.5 --mono
40 Assume that samples in file have only one channel.
42 2.1.6 --stereo
44 Assume that samples in file have two channels in order left, 
45 right, left, right,... This is the default.
47 2.1.7 --stereo-swapped
49 Assume that samples in file have two channels in order right, 
50 left, right, left...
52 2.1.8 --signed
54 Assume that samples in file are signed. This is the default.
56 2.1.9 --unsigned
58 Assume that samples in file are unsigned.
60 2.1.10 --rate=<rate>
62 Assume that sampling rate in input file is <rate> Hz.
64 2.1.11 --volume=<left>,<right>
66 Write initial volume <left> for left channel and <right> for 
67 right channel to output.
69 2.1.12 --volume=<volume>
71 Write initial volume <volume> for both channels to output.
73 3 cutdump.exe
75 Copies section out of the dump.
77 syntax: cutdump.exe <input> <start> <end> <output>
79 Cuts section <start> to <end> from dump <input> and saves it to 
80 <output>.
82 <start> and <end> are specified in nanoseconds if these don't 
83 contain '.'. Otherwise these are assumed to be in seconds. So for 
84 example both 100000000 and 0.1 signifies 0.1s point.
86 4 demuxdump.exe
88 Copies stream out of the dump.
90 syntax: demuxdump.exe <input> <stream> <output>
92 Cuts stream <stream> from dump <input> and saves it to <output>.
94 5 dumpconvert.exe
96 The main dump to other formats converter.
98 syntax: dumpconvert.exe <options> [<subtitle options>...] [<audio 
99 options>...] <files>...
101 Convert <files>... into other formats. Note that this tool takes 
102 subtitle and audio options (and that they are shared with 
103 playdump.exe).
105 5.1 Options
107 5.1.1 --video-width=<width>
109 Set video output width to <width>. No default, must be specified.
111 5.1.2 --video-height=<height>
113 Set video output height to <height>. No default, must be 
114 specified.
116 5.1.3 --video-framerate=<fps>
118 Set video output fps to <fps>. <fps> can also be 'auto' to allow 
119 variable-framerate output. Default is fixed 60fps.
121 5.1.4 --video-scale-algo=<algo>
123 Set video scaling algorithm to <algo>. Currently following 
124 algorithms are available:
126 • 'nearest' (nearest neighbor)
128 • 'average' (weighted average of covered pixels)
130 • 'lanczos1', 'lanczos2', 'lanczos3', 'lanczos4', 'lanczos5' 
131   (higher-quality resizeers).
133 5.1.5 --video-scale-algo=”<algo> <width> <height>”
135 Set video scaling algorithm to <algo> for frames that are <width> 
136 by <height> (i.e. set special scaler for specific resolution).
138 5.1.6 --video-max-dedup=<dedup>
140 Allow up to <dedup> consequtive frames to be elided if they are 
141 indentical to previous (truly identical, not just “identical”). 
142 Requires variable framerate output.
144 5.1.7 --audio-delay=<delay>
146 Delay audio by <delay> nanoseconds/seconds (seconds if <delay> 
147 has '.', nanoseconds otherwise). Delay may be negative.
149 5.1.8 --subtitle-delay=<delay>
151 Delay subtitles by <delay> nanoseconds/seconds (seconds if 
152 <delay> has '.', nanoseconds otherwise). Delay may be negative.
154 5.1.9 --output-<format>=<filename>[,<parameters>]
156 Output to <filename> in format <format>. <parameters> is 
157 format-dependent parameters.
159 5.2 Output formats
161 5.2.1 oggenc
163 syntax: 
164 --output-oggenc=<filename>[,<oggenc-option>[,<oggenc-option[...]]]
166 Pipe audio to oggenc in order to encode OGG Vorbis to <filename>. 
167 Note that audio bitrate and format is automatically set 
168 correctly. For oggenc options in form --foo=bar, use foo=bar as 
169 <oggenc-option>. For oggenc options of form --baz, use baz as 
170 <oggenc-option>
172 5.2.2 rawaudio
174 syntax: --output-rawaudio=<filename>
176 Write 16-bit stereo little-endian signed audio track in raw 
177 format to <filename>.
179 5.2.3 rawi420
181 syntax: --output-rawi420=<filename>
183 Write video in raw I420 format to <filename>
185 5.2.4 rawi420-uvswap
187 syntax: --output-rawi420-uvswap=<filename>
189 Write video in raw I420 format to <filename>. Red and blue are 
190 swapped.
192 5.2.5 rawrgbx
194 syntax: --output-rawrgbx=<filename>
196 Write video in raw RGBx format to <filename>.
198 5.2.6 timecodev2
200 syntax: --output-timecodev2=<filename>
202 Write video timestamp data in v2 format to <filename>. Very 
203 useful for automatic-/variable-fps encoding.
205 5.2.7 wav
207 syntax: --output-wav=<filename>
209 Write audio in wav form to <filename>. Note that files with over 
210 1 billion samples are not written properly.
212 5.2.8 x264
214 syntax: 
215 --output-x264=<filename>[,<x264-option>[,<x264-option[...]]]
217 Pipe video to x264 in order to encode h.264 to <filename>. Note 
218 that video size is automatically set correctly. For x264 options 
219 in form --foo bar, use foo=bar as <x264-option>. For x264 options 
220 of form --baz, use baz as <x264-option>. 
222 BUG: Framerate is not set correctly automatically.
224 6 dumppackets.exe
226 Dump the stream in textual format (useful for debugging):
228 syntax: dumppackets.exe <file>
230 Dumps the data in <file> in textual form.
232 7 fmtopcm.exe
234 Convert given stream from FM format to PCM format (this is mainly 
235 useful for dumps somehow containing multiple FM streams).
237 syntax: fmtopcm.exe <input> <stream> <rate> <output>
239 Reads dump from <input> and converts FM output on stream <stream> 
240 into PCM output at sampling rate <rate>. The output (all other 
241 streams plus converted stream) is written to <output>.
243 8 guessresolution.exe
245 Try to guess proper encoding resolution from dump.
247 sytax: guessresolution.exe <files>...
249 Read given files <files>... and try to guess the proper 
250 resolution.
252 9 mknulldump.exe
254 Make empty clip of specified length.
256 syntax: mknulldump.exe <length> <output>
258 Make empty clip of <length> nanoseconds (seconds if <length> 
259 contains dot) and write it to <output>.
261 10 muxdump.exe
263 Mux multiple dumps into one.
265 syntax: muxdump.exe <input>... <output>
267 Read dump files <input>... and combine streams, writing result to 
268 <output>.
270 11 picturestodump.exe
272 Transform set of pictures into dump.
274 syntax: picturestodump.exe [--fps=<fps>] <input>... <output>
276 Reads pictures from <input>... and writes dump at <fps> (defaults 
277 to 60 if not specified) to <output> containing those pictures.
279 12 playdump.exe
281 Play dump in realtime.
283 syntax: playdump.exe [<subtitle options>...] [<audio options>...] 
284 [--audio-rate=<rate>]
286 [--speed=<percent>] <files>...
288 Play concatenation of <files>... at <percent>% realtime speed 
289 (default 100%). Use <rate> Hz for audio sampling rate (default 
290 44100Hz). Note that this command accepts audio and subtitle 
291 options.
293 13 Audio processing options
295 Audio processing has three stages:
297 • Per-stream premix filtering
299 • Mixing
301 • Postmix filtering.
303 For each, the operations are done in order they are given on 
304 command line. If <stream> is specified for some operation, it 
305 occurs as part of premix filtering for that stream. Otherwise it 
306 occurs as postmix filtering.
308 13.1 --audio-mixer-filter=[<stream>:]<a0>,<a1>,...
310 Perform FIR filtering using coefficients <a0>, <a1>, ..., given 
311 in order of increasing delay.
313 13.2 --audio-mixer-filter=[<stream>:]<a0>,<a1>,...;<b0>,<b1>,...
315 Perform IIR filtering using input coefficents <a0>, <a1>, ..., 
316 output coefficients <b0>, <b1>,... given in order of increasing 
317 delay.
319 13.3 --audio-mixer-gain=[<stream>:]<gain>
321 Amplify signal by <gain> dB.
323 13.4 --audio-mixer-attenuate=[<stream>:]<attenuation>
325 Attenuate signal by <attenuation> dB.
327 13.5 --silence[=<stream>]
329 Silence specified stream or entiere sound output.
331 14 Subtitle processing options
333 Subtitle option of form foo=bar is given as 
334 --video-hardsub-foo=bar on command line and as foo=bar in script 
335 file. For option of form baz, the corresponding forms are 
336 --video-hardsub-baz and baz. Options are processed in order they 
337 are encountered, script files are processed immediately when 
338 script file option is encountered.
340 14.1 font=<font>
342 Syntax (command line): --video-hardsub-font=<font>
344 Syntax (script): font=<font>
346 Set the font used to <font>. No default, this has to be set 
347 before using any font rendering commands.
349 14.2 size=<size>
351 Syntax (command line): --video-hardsub-size=<size>
353 Syntax (script): size=<size>
355 Set the size used to <size>. Default is 16.
357 14.3 xpos=<xpos>
359 Syntax (command line): --video-hardsub-xpos=<xpos>
361 Syntax (script): xpos=<xpos>
363 Set the x offset to <xpos> pixels. There are also special offsets 
364 left, center and right. Default is center.
366 14.4 ypos=<ypos>
368 Syntax (command line): --video-hardsub-ypos=<ypos>
370 Syntax (script): ypos=<ypos>
372 Set the y offset to <ypos> pixels. There are also special offsets 
373 top, center and bottom. Default is bottom.
375 14.5 duration=<duration>
377 Syntax (command line): --video-hardsub-duration=<duration>
379 Syntax (script): duration=<duration>
381 Set the duration to <duration> (nano)seconds (seconds being 
382 selected if <duration> has '.'). Default is 5.0 (5 seconds).
384 14.6 halo=<thickness>
386 Syntax (command line): --video-hardsub-halo=<thickness>
388 Syntax (script): halo=<thickness>
390 Set the halo thickness to <thickness> pixels. 0 disables halo. 
391 Default is 0.
393 14.7 textalign=<align>
395 Syntax (command line): --video-hardsub-textalign=<align>
397 Syntax (script): textalign=<align>
399 Set the between-lines text alignment to <align>. Valid alignments 
400 are left, center and right. Default is center.
402 14.8 spacing=<amount>
404 Syntax (command line): --video-hardsub-spacing=<amount>
406 Syntax (script): spacing=<amount>
408 Set the between-lines text spacing to <amount> pixels. Default is 
411 14.9 script=<file>
413 Syntax (command line): --video-hardsub-script=<file>
415 Read file <file> and execute it as subtitle commands.
417 14.10 text=<timestamp>,<text>
419 Syntax (command line): --video-hardsub-text=<timestamp>,<text>
421 Syntax (script): text=<timestamp>,<text>
423 Display <text> at <timestamp> (seconds or nanoseconds, depending 
424 on presence of '.'). The following sequences are special in 
425 <text>:
427 • '\\': Literal backslash
429 • '\n': Newline
431 • '\A': Authors from runinfo
433 • '\G': Game name from runinfo
435 • '\L': Movie length from runinfo.
437 • '\R': Movie rerecord count from runinfo.
439 14.11 background-color=<color>
441 Syntax (command line): --video-hardsub-background-color=<color>
443 Syntax (script): background-color=<color>
445 Set the background color to <color>. Following <color> 
446 specifications are allowed:
448 • '<a>': Partially transparent black. <a> of 0 is fully 
449   transparent, 255 is fully opaque.
451 • '<rgb>,<a>': Partially transparent gray. <a> of 0 is fully 
452   transparent, 255 is fully opaque. <rgb> sets brightness of 
453   gray, 0 is black and 255 is white.
455 • '<r>,<g>,<b>,<a>': Partially transparent color. <a> of 0 is 
456   fuly transparent, 255 is fully opaque. <r>, <g> and <b> set the 
457   color (0-255 for each component).
459 Default is fully transparent.
461 14.12 foreground-color=<color>
463 Syntax (command line): --video-hardsub-foreground-color=<color>
465 Syntax (script): foreground-color=<color>
467 Set the foreground color to <color>. Following <color> 
468 specifications are allowed:
470 • '<a>': Partially transparent white. <a> of 0 is fully 
471   transparent, 255 is fully opaque.
473 • '<rgb>,<a>': Partially transparent gray. <a> of 0 is fully 
474   transparent, 255 is fully opaque. <rgb> sets brightness of 
475   gray, 0 is black and 255 is white.
477 • '<r>,<g>,<b>': Fully opaque color. <r>,<g>, <b> set the color 
478   (0-255 for each component).
480 • '<r>,<g>,<b>,<a>': Partially transparent color. <a> of 0 is 
481   fuly transparent, 255 is fully opaque. <r>, <g> and <b> set the 
482   color (0-255 for each component).
484 Default is fully opaque white.
486 14.13 halo-color=<color>
488 Syntax (command line): --video-hardsub-halo-color=<color>
490 Syntax (script): halo-color=<color>
492 Set the halo color to <color>. Following <color> specifications 
493 are allowed:
495 • '<a>': Partially transparent black. <a> of 0 is fully 
496   transparent, 255 is fully opaque.
498 • '<rgb>,<a>': Partially transparent gray. <a> of 0 is fully 
499   transparent, 255 is fully opaque. <rgb> sets brightness of 
500   gray, 0 is black and 255 is white.
502 • '<r>,<g>,<b>': Fully opaque color. <r>,<g>, <b> set the color 
503   (0-255 for each component).
505 • '<r>,<g>,<b>,<a>': Partially transparent color. <a> of 0 is 
506   fuly transparent, 255 is fully opaque. <r>, <g> and <b> set the 
507   color (0-255 for each component).
509 Default is fully opaque black.
511 14.14 push
513 Syntax (command line): --video-hardsub-push
515 Syntax (script): push
517 Save all settings to settings stack.
519 14.15 push
521 Syntax (command line): --video-hardsub-pop
523 Syntax (script): pop
525 Pop all settings to settings stack and apply them.
527 14.16 reset
529 Syntax (command line): --video-hardsub-reset
531 Syntax (script): reset
533 Reset all settings that have defaults to defaults (ones that 
534 don't are not reset).