qmp3cut(1)

๐Ÿ“ฆ version 0.4.0, in debian bookworm, ubuntu jammy, ubuntu noble

๐ŸŽ€ qmp3cut ๐ŸŽ€ โ€” the quelcom manual page, bestie edition

okay so. welcome to qmp3cut(1) ๐Ÿ’– this is the quelcom girlie that slices up your mp3 files, and she eats every single time ๐Ÿ’…


โœจ NAME โœจ

qmp3cut โ€” extract and/or delete parts of a mp3 file

like literally, that's the whole job. cut a chunk out, yeet a chunk out, or both. ๐Ÿ”ฅ


๐ŸŒธ SYNOPSIS ๐ŸŒธ

qmp3cut [option]... file

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so qmp3cut lets you extract and/or delete a fragment of a mp3 file. you do have to feed it some parameters though, because how else is it supposed to know where the cut starts, how big it is, and where it ends? ๐Ÿ™ˆ

and then you gotta tell it what to do with that fragment: either the fragment gets copied to another file, or it gets erased from the file โ€” or, bestie, both. no cap. โœจ


๐Ÿ’… GENERAL OPTIONS ๐Ÿ’…

the everyday stuff. the main character options.

  • -d, --delete โ€” deletes the fragment from the file. and listen, if you're also using --output, the deletion action is always done after the fragment extraction. order matters, periodt.
  • -h, --help โ€” shows a brief help and dips out. ๐Ÿ‘‹
  • -o <outfile>, --output=<outfile> โ€” outfile is the file where the frames contained in the specified fragment get copied to. that's the whole vibe.
  • -v, --verbose โ€” verbose. she talks more. ๐Ÿ—ฃ๏ธ
  • -V, --version โ€” shows the version and exits. quick little flex.

๐ŸŒˆ CUT OPTIONS ๐ŸŒˆ

cut options are how you tell it where the fragment begins (that's -b or -B), where it ends (-e and -E), or how big it is (-s). at least one cut option has to be specified, bestie โ€” you can't just stand there. ๐Ÿ˜ญ

and watch out: neither the options -b and -B, nor the options -e and -E, can be used together. also, a begin, an end and a size option can be used at the same time. yes that's a lot, and yes it's allowed. ๐Ÿ’€

by default, the fragment begins at the first frame and ends at the last frame. there is no default value for size. that one's on you.

all the values are treated as a frame number unless a format specifier is used โ€” peep the FORMATS section below for that. values must be a positive integer. โญ

  • -b <begin>[<format>], --set-begin-from-eof=<begin>[<format>] โ€” begin specifies the first frame of the file that belongs to the cut, counting from the end of the file. so you're counting backwards, iykyk. ๐Ÿ”™
  • -B <begin>[<format>], --set-begin=<begin>[<format>] โ€” begin specifies the first frame of the file that belongs to the cut, counting from the beginning of the file. the normal way, the forward way. ๐Ÿซถ
  • -e <end>[<format>], --set-end-from-eof=<end>[<format>] โ€” end specifies the last frame of the file that belongs to the cut, counting from the end of the file.
  • -E <end>[<format>], --set-end=<end>[<format>] โ€” end specifies the last frame of the file that belongs to the cut, counting from the beginning of the file.
  • -s <size>[<format>], --set-size=<size>[<format>] โ€” size specifies the number of frames contained in the cut. how much you're taking. the portion size. ๐Ÿ“
  • -S <begin>-<end>, --slice <begin>-<end> โ€” slice specifies the starting and ending points of the cut as a timeslice, which is to say, two time specifications ([[h:]m:]s[.ms]) joined by a hyphen. two timestamps, one lil hyphen, iconic. โœจ

๐Ÿงš FORMATS ๐Ÿงš

cut options can also have an optional modifier, bestie. if you don't use this modifier, then the value you gave with the corresponding cut option gets interpreted as a number of frames. but let's be real โ€” most of the time it's genuinely so hard to specify a cut in terms of frames, so here are the modifiers that save your life:

  • j โ€” value is interpreted as milliseconds.
  • m โ€” value is interpreted as minutes.
  • s โ€” value is interpreted as seconds.
  • b โ€” value is interpreted as bytes.
  • k โ€” value is interpreted as kbytes (1024 bytes).
  • M โ€” value is interpreted as megabytes (1024 kbytes).

and in either case, the values specified will be rounded to get an integer number of frames. math girlie said round it. ๐Ÿงฎ


โญ EXAMPLES โญ

here are some examples, and honestly they serve:

to get the last ten seconds of a file:

qmp3cut -b 10s -o outfile.mp3 infile.mp3

two ways of getting the first minute of a file:

qmp3cut -E 1m -o outfile.mp3 infile.mp3
qmp3cut -s 1m -o outfile.mp3 infile.mp3

three ways of getting the second quarter of a file:

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

(yes bestie, the list says three but gives you four. we don't ask questions, we just say thank you. ๐Ÿ™๐Ÿ’œ)


๐Ÿ’€ NOTES ๐Ÿ’€

if neither the options --output nor --delete are specified, the program will do nothing. like literally nothing. it just stands there. main character with no lines. ๐Ÿ˜ญ


๐Ÿ™ˆ BUGS ๐Ÿ™ˆ

okay so the tea:

  • usually, the mpg123 player (and any other app that's mp3-read capable) reports messages like "cannot rewind by XXX bytes" where XXX is a negative value, on streams extracted with qmp3cut. this is due to frame dependency โ€” frame decoding sometimes depends on neighbourhood frames when bit reservoir technique is used at encoding time โ€” and possibly will be corrected in a (near?) future. so it's giving "we know, we're working on it". ๐Ÿซถ
  • there's no support for variable bit rate (vbr) files. nope. not today. ๐Ÿšซ
  • tests have been done only with mpeg version 1 layer iii streams, though it may (or may not) work with other versions/layers. so like, try it and see? ๐Ÿ’…

๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

dmanye@etse.urv.es http://www.etse.urv.es/~dmanye/quelcom/quelcom.html


๐Ÿ’– SEE ALSO ๐Ÿ’–

qmp3info(1), qmp3join(1), qmp3check(1), qmp3report(1) qwavinfo(1), qwavjoin(1), qwavcut(1), qwavsilence(1), qwavfade(1), qwavheaderdump(1)


and that's the whole page, bestie ๐ŸŽ€ this was quelcom 0.4.0, from back in february 2001, and she still slays. go cut something cute. โœจ๐Ÿ’œ

๐Ÿ“ฆ where this page comes from