1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863
|
\input texinfo.tex @c -*-texinfo-*-
@c %**start of header
@include version.texinfo
@setfilename quelcom.info
@settitle quelcom tools @value{VERSION}
@dircategory Audio editors
@direntry
* Quelcom: (quelcom). .wav and .mp3 file editing utilities
@end direntry
@finalout
@setchapternewpage odd
@c %**end of header
@ifinfo
this file documents the @code{quelcom tools}: a set of commands to handle @file{.wav} and @file{.mp3} files@.
permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.
@ignore
permission is granted to process this file through tex and print the
results, provided the printed document carries copying permission
notice identical to this one except for the removal of this paragraph
(this paragraph not being relevant to the printed manual).
@end ignore
permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the entire
resulting derived work is distributed under the terms of a permission
notice identical to this one.
@end ifinfo
@titlepage
@title quelcom tools
@subtitle command line tools to handle @file{.wav} and @file{.mp3} files
@subtitle @value{UPDATED}
@author by david many@'e <dmanye@@etse.urv.es>
@c aix seria la cara del darrera de la portada
@page
@vskip 0pt plus 1filll
permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.
permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the entire
resulting derived work is distributed under the terms of a permission
notice identical to this one.
@end titlepage
@node top
@include version.texinfo
@ifinfo
this file documents the @code{quelcom tools v@value{VERSION}}: a set of command line tools to handle @file{.wav} and @file{.mp3} files.
@end ifinfo
@c all the menus can be updated with the emacs command
@c texinfo-all-menus-update, which is normally bound to c-c c-u c-a.
@menu
* license:: what you can do with quelcom
* introduction:: introductory information.
* installation:: installation instructions
* wav tools:: tools to manipulate wav files
* mp3 tools:: tools to manipulate mp3 files
* cut points:: how to specify points in files
* specifying time:: how to specify time in arguments
@end menu
@contents
@node license, introduction, top, top
@include gpl.texinfo
@node introduction, installation, license, top
@chapter introduction
@code{quelcom tools} is a set of command line tools to manipulate @file{.wav} and @file{.mp3} files.
with these tools you can do a set of operations (get info, join, cut, delete fragments, detect silence, check, fade, ...) on maybe the most popular sound file formats (wave and mpeg layer 3) without the need of a grafical interface (xwindow) nor these or those grafical libraries.
since they are build as command line apps, they can be easily included in scripts to do automatically some job.
the @code{quelcom tools} package is written by @email{dmanye@@etse.urv.es,david many@'e} and you may find the package sources in @uref{http://www.etse.urv.es/~dmanye/quelcom/quelcom.html}.
@node installation, requirements, introduction, top
@chapter installation
@menu
* requirements::
* configuring building and installing::
* problems::
@end menu
@node requirements, configuring building and installing, installation, installation
@section requirements
the @code{quelcom tools} package is being developed on an old intel p133 with suse linux 6.3. other configurations may work also.
a c++ compiler is needed. currently are used gcc-2.95.2 and egcs-2.91.66. you can get the compiler name and version issuing the command @code{gcc@w{ }--version}.
and of course, you also need que @code{quelcom tools} package. you may find it at @w{http://www.etse.urv.es/~dmanye/quelcom/quelcom.html}. using the latest available version is recommended.
@node configuring building and installing, problems, requirements, installation
@section configuring and building
@enumerate
@item
unpack the package with the command @code{tar@w{ }xzf@w{ }quelcom-@value{VERSION}.tar.gz}. this creates a directory named @file{quelcom-@value{VERSION}} and expands there all the files.
@item
get into the directory with @code{@w{cd quelcom-@value{VERSION}}}
@item
if you want, you can take a look at the makefiles. then type @code{make} to build the sources. some compiler messages may appear, but it should compile successfully.
@item
once the package is successfully build, you can proceed to install it with @code{make install}.
by default, the executables are installed under @file{/usr/local/bin}, the libraries under @file{/usr/local/lib}, the translation @file{.mo} files under @file{/usr/local/share/locale} and the info manual file under @file{/usr/local/info}.
@end enumerate
to activate the automatic translation to catalan or to spanish (the only languages supported at this moment), it should be enough (if there haven't been no problem until now), setting the environment variable @env{LANG} this way (with @command{bash} shell): @command{export LANG=ca} or @command{export LANG=es} respectively. otherwise, the messages will appear in english.
@node problems, wav tools, configuring building and installing, installation
@section problems
if you have problems configuring or building the package, or if you find a bug in any of the tools, please update to the latest release. if the problem remains, please send electronic mail to @w{@samp{dmanye@@etse.urv.es}} including the version number and a detailed description of the problem.
@node wav tools, qwavcut, problems, top
@chapter wav tools
tests has been done only with 44100 Hz 16 bit stereo files, though it may work with mono/stereo 8/16 bits files.
the tools to handle wav files are the following:
@menu
* qwavcut:: extract and/or delete parts of a wav file@.
* qwavfade:: fade in/out wav files@.
* qwavheaderdump:: dump (and fix) wav headers@.
* qwavinfo:: show info from wav files@.
* qwavjoin:: join multiple wav files in one@.
* qwavsilence:: detect and shrink silence sequences in wav files@.
@end menu
@iftex
@ifnothtml
@itemize @bullet
@item @command{qwavcut}
to extract and/or delete parts of a wav file@.
@item @command{qwavfade}
to fade in/out wav files@.
@item @command{qwavheaderdump}
to dump (and fix) wav headers@.
@item @command{qwavinfo}
to show info from wav files@.
@item @command{qwavjoin}
to join multiple wav files in one@.
@item @command{qwavsilence}
to detect and shrink silence sequences in wav files@.
@end itemize
@end ifnothtml
@end iftex
@page
@node qwavcut, qwavfade, wav tools, wav tools
@section qwavcut
@command{qwavcut} extracts and/or deletes parts of a wav file
@subsection synopsis
@samp{qwavcut @var{option}@dots{} @var{file}}
@subsection description
@command{qwavcut} allows to extract and/or delete a fragment of a wav file. some parameters must be supplied in order to define the start/size/end cut points and what to do then: either the fragment must be copied to another file or erased from the file (or both)
@subsection general options
@table @samp
@item -d
@itemx --delete
deletes the fragment from the file. if option @option{--delete} is used, deletion is always done after fragment extraction.
@item -h
@itemx --help
show a brief help and exit.
@item -o @var{outfile}
@itemx --output=@var{outfile}
@var{outfile} is the name of the file where all the samples in the given fragment will be copied.
@c @item -v
@c @itemx --verbose
@c show which operations are done.
@item -V
@itemx --version
show version and exit.
@end table
@subsection cut options
cut options are used to specify where the fragment begins and ends. there are two ways to do it: with time slices (easier) and with cut points (more complex but also more powerful). cut options are mandatory (which way is used is matter of your choice).
if time slices are used, cut points options are automatically ignored.
@subsubsection cut with time slices
there is only one option:
@table @samp
@item -S @var{timeslice}
@itemx --slice @var{timeslice}
@var{timeslice} (@pxref{specifying time}) specifies, in terms of time, where the cut begins and ends.
@end table
@subsubsection cut with cut points
there are several options with cut points. cut points are used to specify at which sample the fragment begins (@option{--begin} and @option{--Begin}), ends (@option{--end} and @option{--End}), or which size it has (@option{--size}). at least, one cut option must be specified (non specified options take its default values). neither the options @option{--begin} and @option{--Begin}, and the options @option{--end} and @option{--End} can be used together; also, a begin, end and size option cannot be used at the same time.
by default, the fragment begins at the first sample and ends at the last sample; there's no default value for size.
@table @samp
@item -b @var{cutpoint}
@itemx --set-begin-from-eof=@var{cutpoint}
@var{cutpoint} (@pxref{cut points}) specifies the first sample of the file that belongs to the cut counting from the end of the file.
@item -B @var{cutpoint}
@itemx --set-begin=@var{cutpoint}
@var{cutpoint} (@pxref{cut points}) specifies the first sample of the file that belongs to the cut counting from the beginning of the file.
@item -e @var{cutpoint}
@itemx --set-end-from-eof=@var{cutpoint}
@var{cutpoint} (@pxref{cut points}) specifies the last sample of the file that belongs to the cut counting from the end of the file.
@item -E @var{cutpoint}
@itemx --set-end=@var{cutpoint}
@var{cutpoint} (@pxref{cut points}) specifies the last sample of the file that belongs to the cut counting from the beginning of the file.
@item -s @var{cutpoint}
@itemx --size=@var{cutpoint}
@var{cutpoint} (@pxref{cut points}) specifies the number of samples contained in the cut.
@end table
@subsection examples
@enumerate
@item
to get the last ten seconds of a file
@example
qwavcut -b 10s -o outfile.wav infile.wav
@end example
@item
four different ways to get the first minute of a file:
@example
qwavcut -S -1:0 -o outfile.wav infile.wav
qwavcut -S -60 -o outfile.wav infile.wav
qwavcut -E 1m -o outfile.wav infile.wav
qwavcut -s 1m -o outfile.wav infile.wav
@end example
@item
four ways of getting the second quarter of a file:
@example
qwavcut -S 15:0-30:0 -o outfile.wav infile.wav
qwavcut -B 15m -E 30m -o outfile.wav infile.wav
qwavcut -s 15m -E 30m -o outfile.wav infile.wav
qwavcut -B 15m -s 15m -o outfile.wav infile.wav
@end example
@end enumerate
@page
@node qwavfade, qwavheaderdump, qwavcut, wav tools
@section qwavfade
@command{qwavfade} fade in/out wav files
@subsection synopsis
@samp{qwavfade @var{option}@dots{} @var{file}@dots{}}
@subsection description
@command{qwavfade} modifies a wav file applying on it a fade in or a fade out or both.
a fade consists in modifying progressively the level of the wav as if you were slowly increasing or decreasing the volume. a fade in consists in increasing the volume starting from a low level at the beginning of the wav. a fade out consists in decreasing the volume to a low level at the end of the wav.
@subsection option list
@table @samp
@item -d @var{cutpoint}
@itemx --duration=@var{cutpoint}
@var{cutpoint} (@pxref{cut points}) specifies the duration of the fade. the default value is five seconds. this option overrides the @option{--length} option explained below.
@item -h
@itemx --help
show a brief help and exit.
@item -i
@itemx --in
just fade in. don't fade out. by default, fade in and fade out.
@item -l @var{time}
@itemx --length=@var{time}
@var{time} (@pxref{specifying time}) specifies the length(=duration) of the fade. this option is quite similar to the @option{--duration} option above. it's easier to use though not as powerful than the previous one. the default value is five seconds. this option overrides @option{--duration} option explained above.
@item -o
@itemx --out
just fade out. don't fade in. by default, fade in and fade out.
@item -t
@itemx --test
this option can be used to create and fade test files instead of modifying the original file. a test file will be created for each type of selected fade (in or out). the name of the test file will be @file{fadein.@var{file}} or @file{fadeout.@var{file}}. the duration of the test files is the fade duration plus five seconds.
@item -v
@itemx --verbose
show more detailed info.
@item -V
@itemx --version
show version and exit.
@end table
@subsection example
suppose you want to fade in and out the fantastic song @file{live.in.concert.wav} using a fade duration of 3.5 seconds:
first we are going to test:
@example
qwavfade --test --length 3.5 live.in.concert.wav
@end example
hear the test fades:
@example
my-wav-player fadein.live.in.concert.wav fadeout.live.in.concert.wav
@end example
if you want to try with another duration, jump to the first step and change the @option{length}(or @option{--duration}) argument.
if you're happy with the tests (omit @option{--test}):
@example
qwavfade --length 3.5 live.in.concert.wav
@end example
@subsection notes
@command{qwavfade} doesn't allow both types of fades (in and out) to overlap. if you want to fade in and out a wav file, and the two regions to fade overlap, then probably you made a mistake (maybe you selected a too large fade). in any case, you'll have to fade separately.
@page
@node qwavheaderdump, qwavinfo, qwavfade, wav tools
@section qwavheaderdump
@command{qwavheaderdump} dumps (and fixes) wav headers
@subsection synopsis
@samp{qwavheaderdump @var{option}@dots{} @var{file}@dots{}}
@subsection description
@command{qwavheaderdump} reads a list of wav files and prints on standard output all its header values in text (no binary) form. also, it has ability to fix some of the headers in case they'd be incorrect.
@subsection option list
@table @samp
@item -F
@itemx --fix
correct the header if there's any incorrect value. not all the fields are recoverable.
@item -h
@itemx --help
show a brief help and exit.
@item -q
@itemx --quiet
no output messages. don't show detected (and corrected) errors.
@item -V
@itemx --version
show version and exit.
@end table
@page
@node qwavinfo, qwavjoin, qwavheaderdump, wav tools
@section qwavinfo
@command{qwavinfo} show info from wav files.
@subsection synopsis
@samp{qwavinfo @var{option}@dots{} @var{file}@dots{}}
@subsection description
@command{qwavinfo} reads a list of wav files and prints on standard output some of its parameters: sample rate, bits per sample, mono/stereo and duration. a duration summary is appended at the end of the list.
@subsection option list
@table @samp
@item -h
@itemx --help
show a brief help and exit.
@item -s
@itemx --summary-only
show only the summary. do not show info from every file.
@item -v
@itemx --verbose
show also the number of bytes and samples.
@item -V
@itemx --version
show version and exit.
@end table
@c exemple...
@page
@node qwavjoin, qwavsilence, qwavinfo, wav tools
@section qwavjoin
@command{qwavjoin} joins wav files
@subsection synopsis
@samp{qwavjoin @var{option}@dots{} @var{file1} @var{file2}@dots{}}
@subsection description
@command{qwavjoin} reads a list of wav files and joins them in the specified order in one wav file. the files must have the same parameters (i.e. sampling rate, bytes per sample, @dots{}) in order that the joining can be done.
@subsection option list
@table @samp
@item -h
@itemx --help
show a brief help and exit.
@item -o @var{outfile}
@itemx --output=@var{outfile}
@var{outfile} is the name of the file where all the samples will be copied. if this option is not used, the samples from the second to the last file of the list will be appended to @var{file1}.
@item -v
@itemx --verbose
show which operations are done.
@item -V
@itemx --version
show version and exit.
@end table
@c exemple...
@page
@node qwavsilence, mp3 tools, qwavjoin, wav tools
@section qwavsilence
@command{qwavsilence} detects and shrinks silence sequences in wav files
@subsection synopsis
@samp{qwavsilence @var{option}@dots{} @var{file}@dots{}}
@subsection description
@command{qwavsilence} reads a list of wav files looking for silence sequences longer than a given value, possibly shrinking them.
@subsection option list
@table @samp
@item -d @var{cutpoint}
@itemx --duration=@var{cutpoint}
@var{cutpoint} (@pxref{cut points}) specifies the minimum duration of a silent sequence in a file to be reported. the default value is one second. this option overrides the option @option{--length} explained below.
@item -h
@itemx --help
show a brief help and exit.
@item -l @var{time}
@itemx --length=@var{time}
@var{time} (@pxref{specifying time}) specifies the minimum length(=duration) of a silent sequence in a file to be reported. this option is quite similar to the @option{--duration} option above. it's easier to use though not as powerful than the previous one. the default value is one second. this option overrides the @option{--duration} option explained above.
@item -S
@itemx --shrink
when this option is set, all the silent sequences greater than the value of the @option{--duration} option will be shrinked down to @var{duration} and the file size truncated accordingly.
@item -t @var{threshold}
@itemx --threshold=@var{threshold}
@var{threshold} is a percentage value respect the maximum (absolute) sample value. samples whose value is under the given @var{threshold} are considered silent. for example, a value of 2 means that all samples with absolute value under the 2% will be treated as silent samples. the default value is 0.
@item -v
@itemx --verbose
show also sample information.
@item -V
@itemx --version
show version and exit.
@end table
@c @subsection example
@node mp3 tools, qmp3check, qwavsilence, top
@chapter mp3 tools
tests have been done only with mpeg version 1 layer iii streams, though it may (or not) work with other versions or layers.
the tools to handle mp3 files are the following:
@menu
* qmp3check:: check and clean mp3 files@.
* qmp3cut:: extract and/or delete fragments from a mp3 file@.
* qmp3info:: show info from mp3 files@.
* qmp3join:: join multiple mp3 files in one@.
* qmp3report:: generate simple reports for mp3 files and directories
@end menu
@iftex
@ifnothtml
@itemize @bullet
@item @command{qmp3check}
to check and clean mp3 files@.
@item @command{qmp3cut}
to extract and/or delete parts of a mp3 file@.
@item @command{qmp3info}
to show info from mp3 files@.
@item @command{qmp3join}
to join multiple mp3 files in one@.
@item @command{qmp3report}
to generate simple reports for mp3 files and directories
@end itemize
@end ifnothtml
@end iftex
@page
@node qmp3check, qmp3cut, mp3 tools, mp3 tools
@section qmp3check
@command{qmp3check} checks and cleans mp3 streams
@subsection synopsis
@samp{qmp3check @var{option}@dots{} @var{file}@dots{}}
@subsection description
@command{qmp3check} reads mp3 streams looking for invalid frames or, simply, garbage. it can be used as a mp3 file checker but also as a mp3 file cleaner because it is able to strip garbage bits from the streams.
@subsection option list
@table @samp
@item -D
@itemx --delete
delete invalid frames and garbage. use with care
@item -h
@itemx --help
show a brief help and exit.
@item -q
@itemx --quiet
no output messages
@item -T
@itemx --delete-tag
delete tag (if exists). option @option{--delete} must be set.
@item -v
@itemx --verbose
show more detailed info
@item -V
@itemx --version
show version and exit.
@end table
@page
@node qmp3cut, qmp3info, qmp3check, mp3 tools
@section qmp3cut
@command{qmp3cut} extracts and/or deletes parts of a mp3 file
@subsection synopsis
@samp{qmp3cut @var{option}@dots{} @var{file}}
@subsection description
@command{qmp3cut} allows to extract and/or delete a fragment of a mp3 file. some parameters must be supplied in order to define the start/size/end cut points and what to do then: either the fragment must be copied to another file or erased from the file (or both)
@subsection general options
@table @samp
@item -d
@itemx --delete
deletes the fragment from the file. if option @option{--output} is used, deletion is always done after fragment extraction.
@item -h
@itemx --help
show a brief help and exit.
@item -o @var{outfile}
@itemx --output=@var{outfile}
@var{outfile} is the name of the file where all the frames in the given fragment will be copied.
@item -v
@itemx --verbose
verbose
@item -V
@itemx --version
show version and exit.
@end table
@subsection cut options
cut options are used to specify where the fragment begins and ends. there are two ways to do it: with time slices (easier) and with cut points (more complex but also more powerful). cut options are mandatory (which way is used is matter of your choice).
if time slices are used, cut points options are automatically ignored.
@subsubsection cut with time slices
there is only one option:
@table @samp
@item -S @var{timeslice}
@itemx --slice @var{timeslice}
@var{timeslice} (@pxref{specifying time}) specifies, in terms of time, where the cut begins and ends.
@end table
@subsubsection cut with cut points
there are several options with cut points. cut points are used to specify at which frame the fragment begins (@option{--begin} and @option{--Begin}), ends (@option{--end} and @option{--End}), or which size it has (@option{--size}). at least, one cut option must be specified (non specified options take its default values). neither the options @option{--begin} and @option{--Begin}, and the options @option{--end} and @option{--End} can be used together; also, a begin, end and size option cannot be used at the same time.
by default, the fragment begins at the first frame and ends at the last frame; there's no default value for size.
@table @samp
@item -b @var{cutpoint}
@itemx --set-begin-from-eof=@var{cutpoint}
@var{cutpoint} (@pxref{cut points}) specifies the first frame of the file that belongs to the cut counting from the end of the file.
@item -B @var{cutpoint}
@itemx --set-begin=@var{cutpoint}
@var{cutpoint} (@pxref{cut points}) specifies the first frame of the file that belongs to the cut counting from the beginning of the file.
@item -e @var{cutpoint}
@itemx --set-end-from-eof=@var{cutpoint}
@var{cutpoint} (@pxref{cut points}) specifies the last frame of the file that belongs to the cut counting from the end of the file.
@item -E @var{cutpoint}
@itemx --set-end=@var{cutpoint}
@var{cutpoint} (@pxref{cut points}) specifies the last frame of the file that belongs to the cut counting from the beginning of the file.
@item -s @var{cutpoint}
@itemx --size=@var{cutpoint}
@var{cutpoint} (@pxref{cut points}) specifies the number of frames contained in the cut.
@end table
@subsection examples
@enumerate
@item
to get the last ten seconds of a file
@example
qmp3cut -b 10s -o outfile.mp3 infile.mp3
@end example
@item
four different ways to get the first minute of a file:
@example
qmp3cut -S -1:0 -o outfile.mp3 infile.mp3
qmp3cut -S -60 -o outfile.mp3 infile.mp3
qmp3cut -E 1m -o outfile.mp3 infile.mp3
qmp3cut -s 1m -o outfile.mp3 infile.mp3
@end example
@item
four ways of getting the second quarter of a file:
@example
qmp3cut -S 15:0-30:0 -o outfile.mp3 infile.mp3
qmp3cut -B 15m -E 30m -o outfile.mp3 infile.mp3
qmp3cut -s 15m -E 30m -o outfile.mp3 infile.mp3
qmp3cut -B 15m -s 15m -o outfile.mp3 infile.mp3
@end example
@end enumerate
@page
@node qmp3info, qmp3join, qmp3cut, mp3 tools
@section qmp3info
@command{qmp3info} show info from mp3 files.
@subsection synopsis
@samp{qmp3info @var{option}@dots{} @var{file}@dots{}}
@subsection description
@command{qmp3info} reads a list of mp3 files and prints on standard output some of its parameters: version, layer, sample rate, bit rate, duration and tag. a duration summary is appended at the end of the list.
@subsection option list
@table @samp
@item -c
@itemx --check
check the entire stream (slower but accurate). all the frames of the stream are read and the total duration is exactly computed. this option is automatically activated if the stream appears to be vbr (have different bit rate frames).
@item -h
@itemx --help
show a brief help and exit.
@item -s
@itemx --summary-only
show only the summary. do not show info from every file.
@item -v
@itemx --verbose
show also the number of bytes and frames.
@item -V
@itemx --version
show version and exit.
@end table
@c exemple...
@subsection bugs
variable bit rate (vbr) streams are detected by reading the initial 5 frames in the stream. if their bit rate field differs, the @option{--check} option is activated automatically.
if vbr is not detected, @command{qmp3info} reads only the first frame in the stream and calculates the duration supposing that (1) the entire stream is composed by valid frames and (2) all the frames have the same bit rate. this is a fast way to compute the duration of the stream, but it is not exact: there's an error of 0.3% aprox. if you want to be accurate, or @command{qmp3info} is unable to detect a vbr stream, use @option{--check}.
@page
@node qmp3join, qmp3report, qmp3info, mp3 tools
@section qmp3join
@command{qmp3join} joins mp3 files
@subsection synopsis
@samp{qmp3join @var{option}@dots{} @var{file1} @var{file2}@dots{}}
@subsection description
@command{qmp3join} reads a list of mp3 files and joins them in one mp3 file in the specified order. some conditions must be met for the parameters of each of the files (see the notes subsection below).
@subsection option list
@table @samp
@item -f
@itemx --force
force join bypassing bit rate checks. by default, to join two files they must be both vbr (have variable bit rate) or have the same bit rate. using this option you can skip this check.
@item -h
@itemx --help
show a brief help and exit.
@item -o @var{outfile}
@itemx --output=@var{outfile}
@var{outfile} is the name of the file where all the frames will be copied. if this option is not used, the frames from the second to the last file of the list will be appended to @var{file1}.
@item -v
@itemx --verbose
show which operations are done.
@item -V
@itemx --version
show version and exit.
@end table
@c exemple...
@subsection notes
both mp3 must have the same bit rate or (both) must have a variable bit rate. this restriction can be by-passed with the @option{--force} flag.
before joining, all the streams are tested for validity. this is a time consuming operation. if the streams are not found clean, the join operation is aborted, so if you want to join @i{dirty} streams or simply qmp3join detects a clean stream as dirty, please report this as a bug and/or use @command{cat}.
due to the mp3 file format characteristics, @command{qmp3join} can be viewed like a @i{better but restrictive} @command{cat} for mp3 files.
@page
@node qmp3report, cut points, qmp3join, mp3 tools
@section qmp3report
@command{qmp3report} reports mp3 files and directories
@subsection synopsis
@samp{qmp3report @var{option}@dots{} @var{file}@dots{}}
@subsection description
@command{qmp3report} reads mp3 files or directories containing mp3 files and gives information about them. @command{qmp3report} can output the reports with plain text or in html format. using the latter format, you can @i{navigate} your mp3 directories with a web browser.
@subsection option list
@table @samp
@item -a
@itemx --all-files
report all files, not just files with suffix @file{.mp3}.
@item -A
@itemx --show-all
implies @option{--dirs}, @option{--files} and @option{--summary}. show report for files and directories and a summary report.
@item -d
@itemx --dirs
show a report for every directory containing reported files/directories. note that if option @option{--all-files} is not set, only will be reported those directories containing mp3 files.
@item -f
@itemx --files
show a report for every reportable file (see also @option{--all-files}).
@item -h
@itemx --help
show a brief help and exit.
@item -H
@itemx --html
output in html format (default is plain text).
@item -r
@itemx --recursive
scan directories.
@item -s
@itemx --summary
show a summary report.
@item -S
@itemx --split
split report across visited directories. @command{qmp3report} leaves in each visited directory a file with the report for that directory, independently of the output format. the name of the report file is the name of the directory with extension @file{.txt} or @file{.html} depending on the selected output format.
@item -v
@itemx --verbose
show more detailed info.
@item -V
@itemx --version
show version and exit.
@end table
@c exemple... qmp3report -rA .
@c exemple... qmp3report -rAHS .
@subsection bugs
variable bit rate (vbr) streams are detected by reading the initial 5 frames in the stream. if their bit rate field differs, the entire stream is read to compute the duration time with accuracy (@pxref{qmp3info}).
if vbr is not detected, @command{qmp3report} reads only the first frame in the stream and calculates the duration supposing that (1) the entire stream is composed by valid frames and (2) all the frames have the same bit rate. this is a fast way to compute the duration of the stream, but it is not exact: there's an error of 0.3% aprox.
the @i{htmlize} function, which converts file names in a suitable form for html format (ie. replacing blanks with '@i{%20}'), is not bulletproof.
@node cut points, specifying time, qmp3report, top
@appendix cut points
cut points are used to specify point in a sound file. they can also be used to speciy a size or a time duration using the beginning of the file as start reference. a cut point has the following form:
@var{value}[@var{format}]
@c farcir tot aix d'exemples!!!
@c some of the commands have options referring to a point (a begin or an end of a fragment for qwavcut and qmp3cut) or a part of a file (a duration for qwavfade or qwavsilence, a size for qwavcut or qmp3cut).
in all cases, a positive integer @var{value} is required. the wav tools treat this number as a number of samples, whereas the mp3 tools treat this number as a number of frames. since most of the times is hard to specify a point (or size, or duration) in a file in terms of samples or frames, some modifiers are accepted. these modifiers consist in a single letter that must be written behind the number without leaving any blank.
@appendixsec cut points modifiers
these are the valid modifiers and how they modify the interpretation of @var{value}:
@table @code
@item j
milliseconds
@item s
seconds
@item m
minutes
@item b
bytes
@item k
kbytes (1024 bytes)
@item M
megabytes (1024 kbytes)
@end table
in either case, the given values will be rounded to an integer number of samples/frames.
@node specifying time, , cut points, top
@appendix specifying time
time specifiers are a easier (more @i{human}) way than cut options to specify points in a file.
a time specifier has the following form:
[[@var{h}:]@var{m}:]@var{s}[.@var{ms}]
where:
@table @code
@item @var{h}
hours
@item @var{m}
minutes
@item @var{s}
seconds
@item @var{ms}
milliseconds
@end table
as you can see, time specifiers are easier to use but less powerful than cut options (which can also specify a point in a file in terms of bytes or frames/samples).
@c posar-hi exemples
@appendixsec time slices
time slices are composed by two time specifiers designing a range (slice) of time:
@var{begin}-@var{end}
where @var{begin} and @var{end} are time specifiers. they can be not specified, meaning, respectively, the beginning and the end of the file.
@c ms exemples
@bye
|