izy.avstream
command, use:
curl -o- https://raw.githubusercontent.com/izyware/av-stream/master/sh/install.sh | bash
If you are not using a host system, you would need to use virtual devices and software loopback. Below different workstation platforms are discussed.
brew install blackhole-2ch
If you need to run multiple side by side blackhole drivers refer to: Running-Multiple-BlackHole-Drivers.
Always set your default system microphone and speaker to the virtual device.
sudo lsof /dev/snd/*
To manage the lifecycle of the virtual devices use the following commands (Notice that the ALSA virtual device would use hw:device X,0
for the sink and hw:device X,1
for the source):
/ setup the sampleRate both for alsa and pulseaudio /
sudo vim /etc/pulse/daemon.conf / add the following /sudo vim /etc/modprobe.d/alsa-base.conf
options snd-aloop index=10,11 enable=1,1 / add snd-aloop to load at boot time /sudo vim /etc/modules
/ set the default sink and source (speaker and microphone) /
/etc/pulse/default.pa Optionally, if you prefer to perform these task manually / load /sudo modprobe snd-aloop
/ set sink and source manually /pactl list short sinks
pactl set-default-sink/ To see the current defaults /
pactl info/ unload /
sudo modprobe -r snd-aloop You can test the ALSA device/ test /
aplay -D plughw:3,1 ./data/test-44.1-16-mono.wav The device will show up as "Built-in-Audio Stero" in Chrome as it is percieved by pulseAudio.If you need to test that the virtual device sink is recieving audio from Chrome, you can use pulseAudio to route its source to the hardware sink (speaker) device:
pactl list short sources | grep monitor
pactl load-module module-loopback source=alsaoutput.platform-sndaloop.0.analog-stereo.monitor sink=alsaoutput.usb-ASUSTeKCOMPUTERINC.C-MediaR_Audio-00.analog-stereo pactl unload-module module-loopbackOn ubuntu you may use
sudo nano /etc/pulse/default.pa
load-module module-native-protocol-tcppulseaudio -k
pulseaudio --startexport PULSE_SERVER=localhost
pactl infowget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz
tar -xvf ffmpeg-git-amd64-static.tar.xz; ThenBUCKETID=YOURBUCKETID;
export DISPLAY=1;VIDEO_SIZE=WxH;
clear;DATE=$(date +"%Y-%m-%d-%H-%M");
~/ffmpeg-git-20240629-amd64-static/ffmpeg -videosize $VIDEOSIZE -framerate 25 -f x11grab -i :$DISPLAY+0,0 -vcodec libx264 -pix_fmt yuv420p ~/Downloads/screen-$BUCKETID-$DISPLAY-$DATE.mp4;* mixerNode
* onAudioPacket -> mixeradminSharedState[userId] = audioInputMetadata* xcast:mixeradmin aggregatorAudioOutputNode -> aggregatorOutputToClient.socketWriterNode(streamproto1)
* getMetaDataStrFunction: mixeradminSharedState* peer:xcastSourceMonitor -> hubToSpeakerContext.socketReaderNode(streamproto1)
* adminSpeakerInput* onMetaDataPacket -> aggregatedStatesSnapshot
mixeradminclient service provides the service APIs the QOS client uses to monitor the mixer quality. //service/mixeradminclient?getMetrics
will be polled by QOS which will provide the aggregated metrics to the QOS dashboard using aggregatedStatesSnapshot
variable.
aggregatedStatesSnapshot
contains:
Use the streamproto1 with the socketReader/Writer nodes to enable QOS monitoring.
As the first step, setting the enableQOSMetrics
flag to true for the streamproto1 object, will trigger a call to the qosWriter method everytime an audio packet is recieved. A QOSMetrics
object will be generated and passed on to the the qosWriter
method. The object will have the following properties:
A typical implementation may be found in service/audiooutput
:
(xcast) audio source => IzySocketWriterNode => metadata packet(getMetaDataStrFunction) + audio packet => (peer) => IzySocketReaderNode => audio sink
(xcast) updateQOSForUser <= socket.on('data') <= Stringify(QOSMetrics) (peer) <= enableQOS?qosWriterQOSMetrics
, and write it back to the xcastmixeradminSharedState
storeLib variable.Eventually, service/mixeradmin
will push the mixeradminSharedState
back to the admin using socketWriterNode.getMetaDataStrFunction
:
mixeradminSharedState
alongside other xcast state objects and serialize them.storeLib.set('readMetadataPacket')
value which is then consumed by dashboard/userinput/qos/api
to populate the QOS dashboard.arch -x86_64 zsh
nvm uninstallnvm install
rm -rf node_modules
npm install For Kinesis hosts that use X11 (any window manager gnome, icewm, ...) customizing cut/paste keys for Mac platforms can be achieved by swapping Alt with Ctrl (or any other keys. use xev to figure out the mapping): Edit Xmodmapvim ~/.Xmodmap
Define the codes
keycode 37 = Alt_L
keycode 64 = Control_L Apply the changesxmodmap ~/.Xmodmap
* on MacOS systems it would freeze the process
* on Linux interactive shell might need to be explicitly specified
* use pm2 start apps/generic.js --name service -- service
syntax
* this will be removed and functionality integrated ino the webAudio library
* more consistent with the speaker view
* ChannelMergerNode does not solve the issue. We had to implement proprietry incomingAudioTrackMixer
* Update the QOS status calculator* slow feature would only refresh on user action. This should allow reasonable user experience in slow networking environment (1.5K for audio status, 50K per desktop)
* imrprove refresh mechanism such that it will remember last refresh time to avoid collision
* move config values into composeConfig* use standard status/statusCode vs. connectionFailure flag
* improve logging* remove waitForUIUpdateMS and improve image sync by routing everything throughthe service
* for remote, when the metrics creation timestamp gets too old we report a 504
* when xcast server stops report a 503* xcastSourceServerJSONIOUrl is included within the service context
* addresses delays encountered when using portAudio interface
* implement consumeMetricsOnly option for mixeradminclient service
* disable speaker, mic and socket connect for web clientRunning-Multiple-BlackHole-Drivers: https://github.com/ExistentialAudio/BlackHole/wiki/Running-Multiple-BlackHole-Drivers
macos-blackhole: https://github.com/ExistentialAudio/BlackHole