Commit fe2b96dc authored by Stefan Westerfeld's avatar Stefan Westerfeld

README.adoc: basic documentation for wav-pipe format

Signed-off-by: Stefan Westerfeld's avatarStefan Westerfeld <stefan@space.twc.de>
parent b0e2f81a
......@@ -434,6 +434,53 @@ Streaming input is also supported for watermark detection.
cat in.wav | audiowmark get -
== Wav Pipe Format
In some cases, the length of the streaming input is not known by the program
that produces the stream. For instance consider a mp3 that is being decoded by
madplay.
cat in.mp3 |
madplay -o wave:- - |
audiowmark add - out.wav f0
Since madplay doesn't know the length of the output when it starts decoding the
mp3, the best it can do is to fill the wav header with a big number. And
indeed, audiowmark will watermark the stream, but also print a warning like
this:
audiowmark: warning: unexpected EOF; input frames (1073741823) != output frames (8316288)
This may sound harmless, but for very long input streams, this will also
truncate the audio input after this length. If you already know that you need
to input a wav file from a pipe (without correct length in the header) and
simply want to watermark all of it, it is better to use the `wav-pipe` format:
cat in.mp3 |
madplay -o wave:- - |
audiowmark add --input-format wav-pipe --output-format rf64 - out.wav f0
This will not print a warning, and it also works correctly for long input
streams. Note that using `rf64` as output format is necessary for huge output
files (larger than 4G).
Similar to pipe input, audiowmark can write a wav header with a huge number (in
cases where it does not know the length in advance) if the output firmat is set
to `wav-pipe`.
cat in.mp3 |
madplay -o wave:- - |
audiowmark add --input-format wav-pipe --output-format wav-pipe - - f0 |
lame - > out.mp3
If you need both, `wav-pipe` input and output, a shorter way to write it is
using `--format wav-pipe`, like this:
cat in.mp3 |
madplay -o wave:- - |
audiowmark add --format wav-pipe - - f0 |
lame - > out.mp3
== Raw Streams
So far, all streams described here are essentially wav streams, which means
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment