shithub: rtmp

Download patch

ref: a73d1bc55bf8d60f5cdd23c0f99080024a4c5f72
parent: c9a45262d2655e843fcc0ad7382f08efcc523926
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Sat Aug 21 19:18:05 EDT 2021

readme: update for mixfs

--- a/README.md
+++ b/README.md
@@ -19,21 +19,23 @@
 
 	video/hj264 -f 25 /dev/screen | video/rtmp -a <{audio/aacenc -b </dev/audio} rtmp://....
 
-Twitch does not require an audio stream to be present. PeerTube seems to require it, so in case you don't want to stream audio to PeerTube, it's possible to use silence by passing `/dev/zero` instead of `/dev/audio`.
+Twitch does not require an audio stream to be present.  PeerTube seems
+to require it, so in case you don't want to stream audio to PeerTube,
+it's possible to use silence by passing `/dev/zero` instead of
+`/dev/audio`.
 
-For audio loopback you can do the following:
+For audio loopback you can do the following (make sure you have latest 9front):
 
-Install kvik's `mq` and use it for audio:
+	audio/mixfs -s mixfs -m /n/mixfs
+	# this already binds on top of /dev/audio in that window
 
-	# in the window that produces the audio (a game or something)
-	mq -s audio -m /n/audio
-	touch /n/audio/audio
-	bind /n/audio/audio /dev/audio
+	# in another window, provide silence so there are _always_ samples available for aacenc
+	mount /srv/mixfs /n/mixfs
+	dd -bs 8192 -if /dev/zero -of /n/mixfs/audio
 
-	# in another window, to be able to hear yourself
-	mount /srv/audio /n/audio
-	dd -if /n/audio/audio -of /dev/audio
+	# streaming, another window
+	mount /srv/mixfs /n/mixfs
+	video/hj264 -f 30 /dev/screen | video/rtmp -a <{audio/aacenc -b < /n/mixfs/audio} $url
 
-	# streaming, third window
-	mount /srv/audio /n/audio
-	video/hj264 -f 30 /dev/screen | video/rtmp -a <{audio/aacenc -b < /n/audio/audio} $url
+You can also mix in audio from the microphone by mounting mixfs and
+writing PCM data from your phone to `/n/mixfs/audio`.