bfr

Langue: en

Autres versions - même langue

Version: 2004-03-03 (ubuntu - 07/07/09)

Section: 1 (Commandes utilisateur)

NAME

bfr, bfp - nonblocking 8-bit-clean pipe buffer

SYNOPSIS

bfr [-v[v]] [-t0] [-T0] [-b100] [-p<arg>] [-m0]         [-T90] [-C0] [<input file or -> ...]

bfp [-v[v]] [-t0] [-T0] [-b100] [-p<arg>] [-m0]         [-T90] [-s44100] [-S[y|n]] [-c2] [-B2]   [-C0]
        [<input file or -> ...]

[see OPTIONS for the --long equivelants to these]

DESCRIPTION

bfr's purpose is to buffer data. (I hope this is obvious. =)) It buffers from its standard input and/or a list of files of your choosing, and allows this data to flow to its standard output at whatever rate that end can handle. Its useful for any situation in which its beneficial to have I/O occur in a detached yet smooth fashion... possible applications:
- CD burning. A user in Spain was using this in front of cdrecord, apparently the CPU couldn't keep up with the 8x burner, so 30 megs (cdrecord's limit) wasn't enough.
- Backups. bfr can be configured to release its data in large chunks, rather than small flowing increments, which reduces tape seek. bfr also has a speedcap option, which ensures bfr will never output more than a certain amount (which you specify) of data per second. This makes it useful for network backups without saturating your backbone or T1.
- Multimedia. Since bfr does its best to yield data to its output at whatever pace the other side can handle (essentially keeping the output stuffed full), it reduces skips. This helps both movies (the pr0n must go on!) and audio (ditto mp3!). The bfp program, included in this package, is an extension to bfr whose primary purpose is to aid skipless audio playback, by properly configuring and writing to /dev/dsp.

OPTIONS

-h | --help
display a (hopefully) helpful message.
-v | --verbose
enable verbosity (use twice for pedantic verbosity)
-p | --progress (*)
Enables ``progress mode'', with an optional arg specifying how to display the data. The optional arg should take the form of a letter and another part... the letter being ``k'', ``b'', ``m'' or ``p'', specifying whether bfr filledness should be displayed in Kilobytes, bytes, megabytes or as a percentage. The second, if a number, should be the multiplier by which throughput is measured. Otherwise, it may be ``CD'' for CD data (150K/sec) or ``CA'' for CD audio (176K/sec). If either is omitted, they default is kilobytes and 1k, respectively. Typical values: ``k1k'', to monitor data at the kilobyte level, and ``pCD'' and ``pCA'' to show meaningful values for CD data and CD audio (and total buffer usage as a percentage) , respectively. The default is ``k1k'' for bfr, ``pCA'' for bfp.
-m | --minimum (*)
Set the amount of buffer to reach before output begins (to ensure a full stream even at start). The default is 10%.
-i | --initial (*)
Initial is a special case of --minimum, which takes effect only for initial prebuffering before output starts the first time. If unspecified, it defaults to whatever --minimum is set to.
-t | --timeout (*)
Time, in seconds, to wait before aborting if both input and output are locked. A value of 0 means it will wait forever. The default is 0.
-T | --throttle (*)
After filling the buffer, bfr will allow the level of onhand data to go down to this amount before accepting more input. The default is 98%.
-b | --buffersize (*)
Full size of memory buffer. The default is 5m.
-C | --speedcap (*)
If set to a non-zero value, bfr will allow only this many bytes to be output per second.

BUFPLAY SPECIFIC OPTIONS

-s | --speed
Sound samples per second. The default is 44100.
-S | --signed
Is the sound data signed (y) or unsigned (n)? The default is y.
-c | --channels
Number of channels (1 = mono, 2 = stereo). The default is 2.
-B | --bytes
Bytes per sound sample (1=8bit, 2=16bit). The default is 2 (16bit).

DEBUG SPECIFIC OPTIONS

-d | --debug
enable debugging - only valid for the bfrdebug and bfpdebug executables, not built or in dist packages by default.

NOTES

Options marked with a ``(*)'' can take their argument in simpler notation: You can use letters 'k' and 'm' can be used to specify kilobytes and megabytes. Decimals are not allowed, use '6500k' instead of '6.5M'. '1k' means 1024, and '1m' means 1048576. '80%' means, literally, 80 percent of buffersize. Percentages are mostly useful for the various threshold settings - using it with --buffersize or --timeout is a bit silly.

Full list of qualifiers:

t - 1000 (1 thousand)
K or k - 1024 (1 kilobyte)
M - 1000000 (1 million)
m - 1048576 (1 megabyte)
b - 1000000000 (1 billion (either you're insane, or I want your hardware))
G or g - 1073741824 (1 gigabyte (either you're insane, or I want your hardware))

BUGS

If you find an inconsistency, whether its an unexpected or undocumented ``feature'' or something missing, please let me know!

THANKS

First of all, thank you for using it. =)

Thanks also to the various people who have helped me at various stages of the way, through ideas, notes, suggestions, bugfixes and death threats, including but not limited to: miponme, Samuli Karkkainen, Scott Gifford, Sam Phillips, Andreas Metzler, Arnd Bergmann, Rob Ekl

AUTHOR

Mark Glines <mark@glines.org>

http://www.glines.org/software/bfr.html

SEE ALSO

bag, dog

POD ERRORS

Hey! The above document had some coding errors, which are explained below:
Around line 179:
You forgot a '=back' before '=head2'
Around line 181:
'=item' outside of any '=over'
Around line 229:
You forgot a '=back' before '=head2'
Around line 231:
'=item' outside of any '=over'