-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Piping capured audio to insertable stream from shell script #41
Comments
Since WebRTC supports PCM how can we pipe directly from STDOUT (s16le 2ch 44100Hz) to insertable stream (writable)? |
One way to solve this is
Proof-of-concept
|
Closing as "not identified as requiring any spec change". |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For the case of Chromium refusal to support capture of monitor devices am using Native Messaging and Native File System to write and read a file which is then parsed and set as
outputs
atAudioWorkletProcessor.process()
, in pertinent partparec --raw -d alsa_output.pci-0000_00_1b.0.analog-stereo.monitor ../app/output
which is read in main thread at browser. However, one issue is that Native File System currently cannot got a single handle on a file that is simultaneously being written to for the purpose of reading and writing at the same time,
DOMException
s will be thrown, and requires reading the entire file at each iteration toslice()
from previous offsetDoes
opus-tools
have the capability to create an Opus bitstream that will support piping the output therefrom to thewritable
side of the insertable stream? That is, instead of writing the file and reading the file we can do something likeparec --raw -d alsa_output.pci-0000_00_1b.0.analog-stereo.monitor | opusenc - - | opusenc <options_to_make_stdout_insertable_stream_writable_input> -
where we can then
write()
the output from the native shell script directly to an insertable stream, avoiding the need to re-read the same file just to get the current offset, or useSharedArrayBuffer
to store the contents of the file in memory; we do not need to write a file at all, rather actually stream output from native application toRTCPeerConnection
?The text was updated successfully, but these errors were encountered: