Use new github account
[oggfilter.git] / README
blob4c82b8240ef7a5fc0c845754e7c89d963ef31e17
1 OGGFILTER(1)            FreeBSD General Commands Manual           OGGFILTER(1)
3 NAME
4      oggfilter -- filter a list of ogg/vorbis files using various criteria
6 SYNOPSIS
7      oggfilter [-l | --min-length period] [-L | --max-length period]
8                [-b | --min-bitrate bitrate] [-B | --max-bitrate bitrate]
9                [-x | --expression regexp] [-X | --exclude-expression regexp]
10                [-d | --directory directory] [-P | --processes count]
11                [-v | --invert] [-I | --no-ignorecase] [-0 | --print0]
13      oggfilter {-h | --help}
15 DESCRIPTION
16      The oggfilter utility reads sequentially a list of ogg/vorbis files from
17      standard input  and filters this list using various criteria defined via
18      command line options. All ogg/vorbis files matching these criteria are
19      written to standard output.
21      All specified criteria are combined using logical AND.
23      These are the available command line options:
25      -l | --min-length period
26                  Matches every ogg/vorbis file with a play time longer than
27                  the specified period.  period may be expressed as seconds or
28                  in minutes:seconds syntax.
30      -L | --max-length period
31                  Matches every ogg/vorbis file with a play time shorter than
32                  the specified period.  period may be expressed as seconds or
33                  in minutes:seconds syntax.
35      -b | --min-bitrate bitrate
36                  Matches every ogg/vorbis file with a nominal bitrate higher
37                  than bitrate kbps
39      -B | --max-bitrate bitrate
40                  Matches every ogg/vorbis file with a nominal bitrate lower
41                  than bitrate kbps
43      -x | --expression regexp
44                  Matches every ogg/vorbis file containing at least one vorbis-
45                  comment matching the extended regular expression regexp.  The
46                  regular expression matching is case-insensitive unless the -I
47                  flag is given. See re_format(7) for a complete discussion of
48                  the extended regular expression format. This option may be
49                  specified multiple times.
51      -X | --exclude-expression regexp
52                  This is the inversion of the -x flag. It excludes any
53                  ogg/vorbis files containing at least one vorbiscomment match-
54                  ing the extended regular expression regexp.  This option may
55                  be specified multiple times.
57      -d | --directory directory
58                  Prepends every line read from standard input with directory
59                  if the first character of the line is not a slash.
61      -v | --invert
62                  Invert the result set - return all ogg/vorbis files not
63                  matching the specified criteria.
65      -P | --processes count
66                  Instructs oggfilter to spawn count worker processes. This may
67                  speed up the processing on multi processor machines.  A good
68                  choice is to set count equal to the amount of processor cores
69                  available. By default oggfilter runs as a single process.
71      -I | --no-ignorecase
72                  This flag makes all expressions provided via -x and -X case
73                  sensitive.
75      -0 | --print0
76                  This flag emits the matching filenames followed by an ASCII
77                  NUL character instead of a newline character. You may use
78                  this to use xargs(1) in conjunction with oggfilter.
80      -h | --help
81                  Print the synopsis of oggfilter and exit. This overrides any
82                  other options.
84 ENVIRONMENT
85      oggfilter peruses the LANG and LC_ALL environment variables to determine
86      the systems locale. This is mandatory for expression matching.
88 EXAMPLES
89      To get a list of all your ogg/vorbis files tagged with genre ``Thrash
90      Metal'' use the following command line:
92            find /my/music -type f -name '*.ogg' | oggfilter -x '^genre=thrash
93            metal$'
95      To filter a list of ogg/vorbis files for files not tagged as ``Neo Folk''
96      or ``Power Metal'' you may use:
98            oggfilter -v -E -x '^genre=(neo folk|power metal)$' < playlist.m3u
100      To get a list of all your ogg/vorbis files tagged with genre ``Thrash
101      Metal'' and containing ``death'' in it's title use the following command
102      line:
104            oggfilter -x '^genre=thrash metal$' -x '^title=.*death.*' <
105            playlist.m3u
107      To get a list of all your ogg/vorbis files tagged with genre ``Thrash
108      Metal'' and not containing ``death'' in it's title use the following com-
109      mand line:
111            oggfilter -x '^genre=thrash metal$' -X '^title=.*death.*' <
112            playlist.m3u
114      To get a list of all ogg/vorbis files with a maximum playtime of 5 min-
115      utes and a minimum playtime of 3 minutes you may use:
117            oggfilter -l 180 -L 5:00 < playlist.m3u
119      To get a list of ogg/vorbis files encoded with a minimal nominal bitrate
120      of 120 kbps use:
122            oggfilter -b 120 < playlist.m3u
124      If you are piping from a playlist containing relative paths you can tell
125      oggfilter to prepend a base path to the read ogg/vorbis files:
127            oggfilter -d /my/music -x '^genre=.*metal$' < relative.m3u
129 PORTABILITY
130      oggfilter was written in ANSI/C so it should compile on every unix-like
131      platform supporting an ANSI/C compiler and libvorbis. But this was writ-
132      ten on a FreeBSD system and has not been tested on other platforms.
134      The supplied Makefile is a BSD-style Makefile and uses the FreeBSD infra-
135      structure. This is not portable, but as oggfilter is pretty simple there
136      should be no problem to write a simple Makefile for other platforms.
138 DIAGNOSTICS
139      The oggfilter utility exits 0 on success, and >0 if an error occurs.
141 SEE ALSO
142      re_format(7), vorbiscomment(1), ogginfo(1), setlocale(3), environ(7),
143      xargs(1)
145 AUTHORS
146      Tobias Rehbein <tobias.rehbein@web.de>
148 BUGS
149      oggfilter will only work correctly in locales using 8-bit charsets or
150      multi byte charsets backwards compatible with ASCII, most notably UTF-8.
152      Regular expression matching will only work if the vorbis comments are
153      representable in the locale charset.
155      Expect some rough edges as this was my first take on a C program.
157      If you find a bug drop me a mail or file an issue at
158            http://github.com/blabber/oggfilter/issues
160 FreeBSD 8.2                     March 25, 2009                     FreeBSD 8.2