ROC-COPY(1)

πŸ“¦
version 0.4.0 Β· 4 versions
, in alpine 3.24, arch rolling, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– ROC-COPY(1) πŸ’–

okay bestie, so this is roc-copy from the Roc Toolkit era (the man page says Roc Toolkit 0.4), and it's literally the simplest lil glow-up in the whole toolkit. you feed it audio, it does a lil transformation, it spits audio back out. that's it. that's the whole vibe. πŸŽ€


✨ NAME ✨

roc-copy β€” copy local audio πŸ¦‹


✨ SYNOPSIS ✨

roc-copy OPTIONS

✨ DESCRIPTION ✨

Read an audio stream from a file, transform it, and write it to another file. yes queen, that's genuinely it. read β†’ transform β†’ write. main character pipeline energy. πŸ‘‘


🌸 Options 🌸

  • -h, --help β€” prints the help and dips. exit stage left. πŸ’…
  • -V, --version β€” prints the version and dips. also exit stage left.
  • -v, --verbose β€” bumps up the verbosity level. and the tea is you can stack this one β€” use it multiple times for maximum yapping. πŸ—£οΈ
  • -L, --list-supported β€” lists all the supported schemes and formats. a little menu of possibilities, iykyk. πŸ“‹
  • -i, --input=FILE_URI β€” the input file URI. where we're pulling the audio from. 🎧
  • -o, --output=FILE_URI β€” the output file URI. where we're dropping the audio off. πŸ“€
  • --input-format=FILE_FORMAT β€” force the input file format. no guessing allowed. πŸ™…β€β™€οΈ
  • --output-format=FILE_FORMAT β€” force the output file format. same energy, output side.
  • --frame-len=TIME β€” the duration of the internal frames, in TIME units. ⏱️
  • -r, --rate=INT β€” the output sample rate, in Hz. numbers, bestie, numbers. πŸ”’
  • --resampler-backend=ENUM β€” the resampler backend. possible values are "default", "builtin", "speex", "speexdec", and the default is default. pick your fighter. πŸ₯Š
  • --resampler-profile=ENUM β€” the resampler profile. possible values are "low", "medium", "high", and the default is medium. goldilocks behavior fr fr. 🌈
  • --profiling β€” enable self profiling. default is off. it's giving "study yourself" energy. πŸ”
  • --color=ENUM β€” set the colored logging mode for stderr output. possible values are "auto", "always", "never", and the default is auto. aesthetic choices matter. 🎨

πŸ¦‹ File URI πŸ¦‹

so --input and --output both want a file URI, and it's gotta be in one of these forms, no cap:

  • file:///ABS/PATH β€” absolute file path
  • file://localhost/ABS/PATH β€” absolute file path (alternative form; only the "localhost" host is supported)
  • file:/ABS/PATH β€” absolute file path (alternative form)
  • file:REL/PATH β€” relative file path
  • file://- β€” stdout
  • file:- β€” stdout (alternative form)

Examples, because we love a demonstration:

  • file:///home/user/test.wav
  • file://localhost/home/user/test.wav
  • file:/home/user/test.wav
  • file:./test.wav
  • file:-

you can pull the list of supported file formats with the --list-supported option. go look, bestie, the info is right there. πŸ‘€

if --output is omitted, the conversion results are literally discarded. poof. gone. (which is lowkey useful, see the examples below. 😌)

the --input-format and --output-format options can force the file format. if you omit them, the file format gets auto-detected. BUT β€” and this is the important part β€” for stdin or stdout, this option is always required. no auto-detect for you, bestie. ⚠️

the path component of the URI you hand over is percent-decoded. and for convenience, unencoded characters are allowed too β€” the one exception is that % should always be encoded as %25. keep that in your notes. πŸ“

for example, the file named /foo/bar%/[baz] may be specified using either of these URIs: file:///foo%2Fbar%25%2F%5Bbaz%5D and file:///foo/bar%25/[baz]. two roads, same file, slay. πŸ›£οΈ


πŸ’œ Time units πŸ’œ

TIME should have one of these forms:

123ns; 1.23us; 1.23ms; 1.23s; 1.23m; 1.23h;

✨ EXAMPLES ✨

Convert sample rate to 48k:

$ roc-copy -vv --rate=48000 -i file:input.wav -o file:output.wav

Drop output results (useful for benchmarking):

$ roc-copy -vv --rate=48000 -i file:input.wav

Input from stdin, output to stdout:

$ roc-copy -vv --input-format=wav -i file:- \
    --output-format=wav -o file:- >./output.wav <./input.wav

✨ ENVIRONMENT VARIABLES ✨

these environment variables are supported, bestie:

  • NO_COLOR β€” by default, terminal coloring is automatically detected. this environment variable can be set to a non-empty string to disable terminal coloring. it has lower precedence than the --color option.
  • FORCE_COLOR β€” by default, terminal coloring is automatically detected. this environment variable can be set to a positive integer to enable/force terminal coloring. it has lower precedence than the NO_COLOR variable and the --color option.

✨ SEE ALSO ✨

roc-recv(1), roc-send(1), and the Roc web site at https://roc-streaming.org/ 🌐


✨ BUGS ✨

please report any bugs found via GitHub (https://github.com/roc-streaming/roc-toolkit/). do your civic duty, angel. πŸ›


✨ AUTHORS ✨

see the authors page on the website for a list of maintainers and contributors (https://roc-streaming.org/toolkit/docs/about_project/authors.html). πŸ’–


2024, Roc Streaming authors


that's the whole page, bestie β€” go copy some audio πŸ’…βœ¨

Roc Toolkit 0.4 Β· 2024 Β· mwah, that's a wrap on ROC-COPY(1) πŸŽ€πŸ¦‹πŸ’–