fauxstream (for **f**fmpeg + **au**cat **x**11 **stream**) is a shell script to
simultaneously record a desktop video stream and one (or more?) audio streams.
The main goal is to allow screencasting (with additional voice-over stream?),
with defaults set to suit twitch.tv as the primary target. The license is ISC
To my knowledge, there is no dedicated screen casting solution available on
OpenBSD. The port of ffmpeg can fulfill these functions, but seems to be
hampered by apparent lack of or suboptimal multithreading support, resulting
in dropped frames when recording.
It turns out that the reason for this is apparently lack of (or too little)
parallelism on th side of ffmpeg.
This script circumvents this by running multiple parallel recording streams
with both ffmpeg(1) and OpenBSD's aucat(1).
Note that this is likely only useful on multiprocess systems/kernels.
* ffmpeg (install from ports with `doas pkg_add ffmpeg`)
* aucat(1) (present on OpenBSD, FreeBSD)
* enable kern.audio.record:
# sysctl kern.audio.record=1
* Higher recording resolutions, non-default video codecs, or simultaneously
running applications may affect performance while recording to the point of
dropping frames and leading to desynchronization.
* The recording with ffmpeg's x11grab doesn't register when an application goes
fullscreen, and it continues to record it as being run in a window.
* Likely significantly worse performance on single-core CPUs/single-process
Setting up the Monitoring Stream
Refer to [FAQ 13](https://www.openbsd.org/faq/faq13.html#recordmon).
-r <recording video resolution>
-a <additional audio stream>
-c <video codec>
-v1 <volume adjustment of stream 1>
-v2 <volume adjustment of stream 2>
`sh fauxstream -r 1920x1080 -a snd/0.mon "rtmp://SERVER.twitch.tv/app/STREAM_KEY`
**Note: To stop the recording, press Ctrl-C (not [q]!). Then the script will
continue to combine (mux) the recorded streams.**