~ubuntu-branches/ubuntu/utopic/vorbis-tools/utopic

« back to all changes in this revision

Viewing changes to oggenc/oggenc.c

  • Committer: Bazaar Package Importer
  • Author(s): Adeodato Simó
  • Date: 2006-07-13 21:25:09 UTC
  • mfrom: (2.1.6 edgy)
  • Revision ID: james.westby@ubuntu.com-20060713212509-903jomi0kuu1gzy0
Tags: 1.1.1-6
* Include vorbistagedit script from martin f. krafft to edit vorbis tags in
  an editor.  (Closes: #357421)

* Build with LFS, without touching configure.ac this time, as adviced by the
  submitter. Submit however debian/patches/for_upstream-largefile_support.diff
  to upstream, together with dean gaudet's include_config_h_everywhere.patch.
  (Closes: #364527)

* Fix typos in manpages spotted by A Costa.  (Closes: #353184, #353185)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 * This program is distributed under the GNU General Public License, version 2.
4
4
 * A copy of this license is included with this source.
5
5
 *
6
 
 * Copyright 2000-2002, Michael Smith <msmith@xiph.org>
 
6
 * Copyright 2000-2005, Michael Smith <msmith@xiph.org>
7
7
 *
8
 
 * Portions from Vorbize, (c) Kenneth Arnold <kcarnold@yahoo.com>
 
8
 * Portions from Vorbize, (c) Kenneth Arnold <kcarnold-xiph@arnoldnet.net>
9
9
 * and libvorbis examples, (c) Monty <monty@xiph.org>
10
10
 */
11
11
 
25
25
#include "i18n.h"
26
26
 
27
27
 
28
 
#define VERSION_STRING "OggEnc v1.0.1 (libvorbis 1.0.1)\n"
29
 
#define COPYRIGHT "(c) 2000-2003 Michael Smith <msmith@xiph.org>\n"
 
28
#define VERSION_STRING "OggEnc v1.0.2\n"
 
29
#define COPYRIGHT "(c) 2000-2005 Michael Smith <msmith@xiph.org>\n"
30
30
 
31
31
#define CHUNK 4096 /* We do reads, etc. in multiples of this */
32
32
 
274
274
                                continue;
275
275
            }
276
276
 
 
277
            if(infiles[i] && !strcmp(infiles[i], out_fn)) {
 
278
                fprintf(stderr, _("ERROR: Input filename is the same as output filename \"%s\"\n"), out_fn);
 
279
                errors++;
 
280
                free(out_fn);
 
281
                continue;
 
282
            }
 
283
 
277
284
                        out = fopen(out_fn, "wb");
278
285
                        if(out == NULL)
279
286
                        {
319
326
                    fprintf(stderr, _("Downmixing stereo to mono\n"));
320
327
            }
321
328
            else {
322
 
                fprintf(stderr, _("ERROR: Can't downmix except from stereo to mono\n"));
323
 
                errors++;
324
 
                if(opt.resamplefreq && opt.resamplefreq != enc_opts.rate)
325
 
                    clear_resample(&enc_opts);
326
 
                goto clear_all;
 
329
                fprintf(stderr, _("WARNING: Can't downmix except from stereo to mono\n"));
 
330
                opt.downmix = 0;
327
331
            }
328
332
        }
329
333
 
375
379
{
376
380
        fprintf(stdout, 
377
381
                _("%s%s\n"
378
 
                "Usage: oggenc [options] inputfile [...]\n"
 
382
                "Usage: oggenc [options] input.wav [...]\n"
379
383
                "\n"
380
384
                "OPTIONS:\n"
381
385
                " General:\n"
382
386
                " -Q, --quiet          Produce no output to stderr\n"
383
387
                " -h, --help           Print this help text\n"
 
388
        " -v, --version        Print the version number\n"
384
389
                " -r, --raw            Raw mode. Input files are read directly as PCM data\n"
385
390
                " -B, --raw-bits=n     Set bits/sample for raw input. Default is 16\n"
386
391
                " -C, --raw-chan=n     Set number of channels for raw input. Default is 2\n"
388
393
        " --raw-endianness     1 for bigendian, 0 for little (defaults to 0)\n"
389
394
                " -b, --bitrate        Choose a nominal bitrate to encode at. Attempt\n"
390
395
                "                      to encode at a bitrate averaging this. Takes an\n"
391
 
                "                      argument in kbps. This uses the bitrate management\n"
392
 
        "                      engine, and is not recommended for most users.\n"
393
 
        "                      See -q, --quality for a better alternative.\n"
 
396
                "                      argument in kbps. By default, this produces a VBR\n"
 
397
        "                      encoding, equivalent to using -q or --quality.\n"
 
398
        "                      See the --managed option to use a managed bitrate\n"
 
399
        "                      targetting the selected bitrate.\n"
 
400
        " --managed            Enable the bitrate management engine. This will allow\n"
 
401
        "                      much greater control over the precise bitrate(s) used,\n"
 
402
        "                      but encoding will be much slower. Don't use it unless\n"
 
403
        "                      you have a strong need for detailed control over\n"
 
404
        "                      bitrate, such as for streaming.\n"
394
405
                " -m, --min-bitrate    Specify a minimum bitrate (in kbps). Useful for\n"
395
 
                "                      encoding for a fixed-size channel.\n"
 
406
                "                      encoding for a fixed-size channel. Using this will\n"
 
407
        "                      automatically enable managed bitrate mode (see\n"
 
408
        "                      --managed).\n"
396
409
                " -M, --max-bitrate    Specify a maximum bitrate in kbps. Useful for\n"
397
 
                "                      streaming applications.\n"
398
 
                " -q, --quality        Specify quality between 0 (low) and 10 (high),\n"
399
 
                "                      instead of specifying a particular bitrate.\n"
 
410
                "                      streaming applications. Using this will automatically\n"
 
411
        "                      enable managed bitrate mode (see --managed).\n"
 
412
        " --advanced-encode-option option=value\n"
 
413
        "                      Sets an advanced encoder option to the given value.\n"
 
414
        "                      The valid options (and their values) are documented\n"
 
415
        "                      in the man page supplied with this program. They are\n"
 
416
        "                      for advanced users only, and should be used with\n"
 
417
        "                      caution.\n"
 
418
                " -q, --quality        Specify quality, between -1 (very low) and 10 (very\n"
 
419
        "                      high), instead of specifying a particular bitrate.\n"
400
420
                "                      This is the normal mode of operation.\n"
401
421
        "                      Fractional qualities (e.g. 2.75) are permitted\n"
402
 
        "                      Quality -1 is also possible, but may not be of\n"
403
 
        "                      acceptable quality.\n"
 
422
        "                      The default quality level is 3.\n"
404
423
        " --resample n         Resample input data to sampling rate n (Hz)\n"
405
424
        " --downmix            Downmix stereo to mono. Only allowed on stereo\n"
406
425
        "                      input.\n"