roc-streaming / roc-toolkit

Real-time audio streaming over the network.
https://roc-streaming.org
Mozilla Public License 2.0
1.02k stars 203 forks source link

Support reading/writing WAV file from stdin #684

Open gavv opened 5 months ago

gavv commented 5 months ago

This is a small follow-up issue for #576.

In roc-recv and roc-send, we have special syntax -o file:- and -i file:- which means read or write from/to stdin. See details here and here.

This feature is supported by sox backend, but wav sink and wav source are missing support.

Testing:

roc-send -vv -s rtp+rs8m://localhost:10001 -r rs8m://localhost:10002 -c rtcp://localhost:10003 \
    -i file:- --input-format wav < input.wav
roc-recv -vv -s rtp+rs8m://localhost:10001 -r rs8m://localhost:10002 -c rtcp://localhost:10003 \
    -o file:- --output-format wav > output.wav