[BACK]Return to README.md CVS log [TXT][DIR] Up to [local] / projects / fauxstream

Diff for /projects/fauxstream/README.md between version 1.1 and 1.2

version 1.1, 2018/06/23 22:54:14 version 1.2, 2019/07/07 17:46:17
Line 1 
Line 1 
 fauxstream  fauxstream
 ==========  ==========
   
 fauxstream (for **f**fmpeg + **au**cat **x**11 **stream**) is a shell script to  fauxstream is a wrapper script for ffmpeg to simultaneously record a
 simultaneously record a desktop video stream and one (or more?) audio streams.  desktop video stream and one (or more?) audio streams on OpenBSD.
 The main goal is to allow screencasting (with additional voice-over stream?),  The goal is to circumvent limitations with other streaming/recording
 with defaults set to suit twitch.tv as the primary target. The license is ISC  solutions on OpenBSD, including simpler invocations of ffmpeg(1). It
 (see [LICENSE.txt](LICENSE.txt)).  allows screencasting including monitoring and microphone audio streams.
   The license is ISC (see head of fauxstream).
   
 Rationale  Rationale
 ---------  ---------
   
 To my knowledge, there is no dedicated screen casting solution available on  To my knowledge, there is no dedicated screen casting solution available
 OpenBSD. The port of ffmpeg can fulfill these functions, but seems to be  on OpenBSD as of the time of this writing. The port of ffmpeg can
 hampered by apparent lack of or suboptimal multithreading support, resulting  fulfill these functions, but seems to be hampered by apparent lack of or
 in dropped frames when recording.  suboptimal multithreading support, resulting in dropped frames when
   recording.
   
 It turns out that the reason for this is apparently lack of (or too little)  It turns out that the reason for this is apparently lack of (or too
 parallelism on th side of ffmpeg.  little) parallelism on the side of ffmpeg.
   
 This script circumvents this by running multiple parallel recording streams  This script circumvents this by running multiple parallel recording
 with both ffmpeg(1) and OpenBSD's aucat(1).  streams communicating via pipes.
   
 Note that this is likely only useful on multiprocess systems/kernels.  Note that this is likely only useful on multiprocess systems/kernels.
   
 Requirements  Requirements
 ------------  ------------
   
 * ffmpeg (install from ports with `doas pkg_add ffmpeg`)  * ffmpeg >= 4.0 (install from ports with `doas pkg_add ffmpeg`)
 * aucat(1) (present on OpenBSD, FreeBSD)  * OpenBSD/ksh
 * enable kern.audio.record:  * enable kern.audio.record:
 # sysctl kern.audio.record=1    ```
     # sysctl kern.audio.record=1
     ```
   
 Limitations  Known Limitations
 -----------  -----------------
   
 * Higher recording resolutions, non-default video codecs, or simultaneously  * Higher recording resolutions, non-default video codecs, or
   running applications may affect performance while recording to the point of    simultaneously running applications may affect performance while
   dropping frames and leading to desynchronization.    recording to the point of dropping frames and leading to
 * The recording with ffmpeg's x11grab doesn't register when an application goes    desynchronization.
   fullscreen, and it continues to record it as being run in a window.  * The recording with ffmpeg's x11grab doesn't register when an
 * Likely significantly worse performance on single-core CPUs/single-process    application goes fullscreen, and it continues to record it as being
   systems.    run in a window.
   * Likely significantly worse performance on single-core CPUs/
     single-process systems.
   * Correctly syncing audio and video streams currently requires manually
     finding the best audio offset (`-a` parameter).
   * Including a webcam video feed may introduce its own lag/desync and
     has not been tested by me.
   
 Setting up the Monitoring Stream  Setting up the Monitoring Stream
 --------------------------------  --------------------------------
Line 51 
Line 61 
 -----  -----
   
 ```  ```
 -r <recording video resolution>  fauxstream [-vmon <factor>] [-m [-vmic <factor>]] [-r <size>]
 -a <additional audio stream>          [-f <framerate>] [-a <seconds>] <target>
 -c <video codec>  
 -p <path>  -m:     enable microphone stream (in addition to monitoring stream)
 -v1 <volume adjustment of stream 1>  -vmon:  factor to adjust volume of the monitoring stream
 -v2 <volume adjustment of stream 2>  -vmic:  factor to adjust volume of the microphone stream
   -r:     set video size (resolution)
   -f:     set video framerate
   -a:     set audio offset (in seconds; can be negative)
   
   The target can be a file or a remote streaming address (`rtmp://`).
 ```  ```
   
 Example(s):  Examples:
 -----------  -----------
   
 `sh fauxstream -r 1920x1080 -a snd/0.mon "rtmp://SERVER.twitch.tv/app/STREAM_KEY`  ### Stream to Twitch:
   
 **Note: To stop the recording, press Ctrl-C (not [q]!). Then the script will  ```
 continue to combine (mux) the recorded streams.**  sh fauxstream -m -vmic 5.0 -vmon 0.25 -r 1920x1080 -f 30 -a -0.2 \
           "rtmp://<SERVER>.twitch.tv/app/<STREAM_KEY>
   ```
   
   ### Record to file:
   
   ```
   sh fauxstream [...] /path/to/file.flv
   ```
   
   FAQ:
   ----
   
   **Q: What does the name stand for?**
   
   A: It used to stand for **f**fmpeg + **au**cat **x**11 **stream**, but
   since aucat was dropped, the name isn't an abbreviation for anything in
   particular anymore.
   
   **Q: How do I stop the recording??**
   
   A: Press Ctrl-C to stop the recording.
   
 Related Links:  Related Links:
 --------------  --------------

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

Contact: <mail@mail.thfr.info>