2 .\" "THE BEER-WARE LICENSE" (Revision 42):
3 .\" <tobias.rehbein@web.de> wrote this file. As long as you retain this notice
4 .\" you can do whatever you want with this stuff. If we meet some day, and you
5 .\" think this stuff is worth it, you can buy me a beer in return.
16 .Nd filter a list of ogg/vorbis files using various criteria
22 .Op Fl l | Fl -min-length Ar period
23 .Op Fl L | Fl -max-length Ar period
24 .Op Fl b | Fl -min-bitrate Ar bitrate
25 .Op Fl B | Fl -max-bitrate Ar bitrate
26 .Op Fl x | Fl -expression Ar regexp
27 .Op Fl X | Fl -exclude-expression Ar regexp
28 .Op Fl d | Fl -directory Ar directory
29 .Op Fl P | Fl -processes Ar count
31 .Op Fl I | Fl -no-ignorecase
42 utility reads sequentially a list of ogg/vorbis files from standard input and
43 filters this list using various criteria defined via command line options. All
44 ogg/vorbis files matching these criteria are written to standard output.
46 All specified criteria are combined using logical AND.
48 These are the available command line options:
51 .It Fl l | Fl -min-length Ar period
52 Matches every ogg/vorbis file with a play time longer than the specified
55 may be expressed as seconds or in minutes:seconds syntax.
57 .It Fl L | Fl -max-length Ar period
58 Matches every ogg/vorbis file with a play time shorter than the specified
61 may be expressed as seconds or in minutes:seconds syntax.
63 .It Fl b | Fl -min-bitrate Ar bitrate
64 Matches every ogg/vorbis file with a nominal bitrate higher than
68 .It Fl B | Fl -max-bitrate Ar bitrate
69 Matches every ogg/vorbis file with a nominal bitrate lower than
73 .It Fl x | Fl -expression Ar regexp
74 Matches every ogg/vorbis file containing at least one vorbiscomment matching
75 the extended regular expression
77 The regular expression matching is case-insensitive unless the
81 for a complete discussion of the extended regular expression format. This option
82 may be specified multiple times.
84 .It Fl X | Fl -exclude-expression Ar regexp
85 This is the inversion of the
87 flag. It excludes any ogg/vorbis files containing at least one vorbiscomment
88 matching the extended regular expression
90 This option may be specified multiple times.
92 .It Fl d | Fl -directory Ar directory
93 Prepends every line read from standard input with
95 if the first character of the line is not a slash.
98 Invert the result set - return all ogg/vorbis files not matching the specified
101 .It Fl P | Fl -processes Ar count
106 worker processes. This may speed up the processing on multi processor machines.
107 A good choice is to set
109 equal to the amount of processor cores available. By default
111 runs as a single process.
113 .It Fl I | Fl -no-ignorecase
114 This flag makes all expressions provided via
120 .It Fl 0 | Fl -print0
121 This flag emits the matching filenames followed by an ASCII NUL character
122 instead of a newline character. You may use this to use
128 Print the synopsis of
130 and exit. This overrides any other options.
142 environment variables to determine the systems locale. This is mandatory for
147 To get a list of all your ogg/vorbis files tagged with genre
149 use the following command line:
151 .Dl find /my/music -type f -name '*.ogg' | oggfilter -x '^genre=thrash metal$'
153 To filter a list of ogg/vorbis files for files not tagged as
159 .Dl oggfilter -v -E -x '^genre=(neo folk|power metal)$' < playlist.m3u
161 To get a list of all your ogg/vorbis files tagged with genre
165 in it's title use the following command line:
167 .Dl oggfilter -x '^genre=thrash metal$' -x '^title=.*death.*' < playlist.m3u
169 To get a list of all your ogg/vorbis files tagged with genre
173 in it's title use the following command line:
175 .Dl oggfilter -x '^genre=thrash metal$' -X '^title=.*death.*' < playlist.m3u
177 To get a list of all ogg/vorbis files with a maximum playtime of 5 minutes and
178 a minimum playtime of 3 minutes you may use:
180 .Dl oggfilter -l 180 -L 5:00 < playlist.m3u
182 To get a list of ogg/vorbis files encoded with a minimal nominal bitrate of
185 .Dl oggfilter -b 120 < playlist.m3u
187 If you are piping from a playlist containing relative paths you can tell
189 to prepend a base path to the read ogg/vorbis files:
191 .Dl oggfilter -d /my/music -x '^genre=.*metal$' < relative.m3u
197 was written in ANSI/C so it should compile on every unix-like platform
198 supporting an ANSI/C compiler and libvorbis. But this was written on a
200 system and has not been tested on other platforms.
202 The supplied Makefile is a BSD-style Makefile and uses the
204 infrastructure. This is not portable, but as
206 is pretty simple there should be no problem to write a simple Makefile for
218 .Xr vorbiscomment 1 ,
227 .An "Tobias Rehbein" Aq tobias.rehbein@web.de
233 will only work correctly in locales using 8-bit charsets or multi byte charsets
234 backwards compatible with ASCII, most notably UTF-8.
236 Regular expression matching will only work if the vorbis comments are
237 representable in the locale charset.
239 Expect some rough edges as this was my first take on a C program.
241 If you find a bug drop me a mail or file an issue at
242 .Dl http://github.com/blabber/oggfilter/issues