askrobots / network-computer
Public
Your phone is the terminal. Stream a Linux/Mac desktop to an iPhone over WebRTC through NAT, with audio and input. Open source, single binaries.
Dan Quellhorst
Firefox policy: no WebRTC mDNS (a page using WebRTC made Firefox listen on UDP 5353)
a1d92f3
1 month, 3 weeks ago
History
mediamtx.yml · 1.9 KB · 74 lines
| 1 | # Live streams into the desk (nc-stream; MediaMTX runs as nc-streams). |
| 2 | # |
| 3 | # The one door from outside is SRT on UDP 8890, for publishing only, and only |
| 4 | # with the passphrase in /etc/nc/streams.env (MTX_PATHDEFAULTS_SRTPUBLISHPASSPHRASE; |
| 5 | # SRT also encrypts the stream with it). Everything else listens on this |
| 6 | # computer only: watching (HLS, WebRTC, RTSP) is for the desk's own browser |
| 7 | # and tools, the API and metrics for nc-stream. Any stream name works: |
| 8 | # srt://<desk>:8890?streamid=publish:<name>&passphrase=<passphrase> |
| 9 | logLevel: info |
| 10 | logDestinations: [stdout] |
| 11 | |
| 12 | authMethod: internal |
| 13 | authInternalUsers: |
| 14 | # anyone may try to publish; SRT turns them away without the passphrase, |
| 15 | # and SRT is the only protocol reachable from outside |
| 16 | - user: any |
| 17 | pass: |
| 18 | ips: [] |
| 19 | permissions: |
| 20 | - action: publish |
| 21 | path: |
| 22 | # watching, recordings, the API: this computer only |
| 23 | - user: any |
| 24 | pass: |
| 25 | ips: ["127.0.0.1", "::1"] |
| 26 | permissions: |
| 27 | - action: read |
| 28 | path: |
| 29 | - action: playback |
| 30 | path: |
| 31 | - action: api |
| 32 | - action: metrics |
| 33 | |
| 34 | api: true |
| 35 | apiAddress: 127.0.0.1:9997 |
| 36 | metrics: true |
| 37 | metricsAddress: 127.0.0.1:9998 |
| 38 | pprof: false |
| 39 | playback: true |
| 40 | playbackAddress: 127.0.0.1:9996 |
| 41 | |
| 42 | rtsp: true |
| 43 | rtspTransports: [tcp] |
| 44 | rtspAddress: 127.0.0.1:8554 |
| 45 | rtmp: false |
| 46 | moq: false |
| 47 | hls: true |
| 48 | hlsAddress: 127.0.0.1:8888 |
| 49 | hlsAlwaysRemux: true |
| 50 | hlsVariant: lowLatency |
| 51 | hlsSegmentCount: 7 |
| 52 | hlsSegmentDuration: 1s |
| 53 | hlsPartDuration: 200ms |
| 54 | webrtc: true |
| 55 | webrtcAddress: 127.0.0.1:8889 |
| 56 | webrtcLocalUDPAddress: 127.0.0.1:8189 |
| 57 | webrtcIPsFromInterfaces: false |
| 58 | webrtcAdditionalHosts: [127.0.0.1] |
| 59 | |
| 60 | srt: true |
| 61 | srtAddress: :8890 |
| 62 | |
| 63 | pathDefaults: |
| 64 | source: publisher |
| 65 | # recording is per stream (nc-stream record NAME on), on the computer's own |
| 66 | # disk (the desk volume is small), deleted after two days |
| 67 | record: false |
| 68 | recordPath: /var/lib/nc-streams/recordings/%path/%Y-%m-%d_%H-%M-%S-%f |
| 69 | recordFormat: fmp4 |
| 70 | recordSegmentDuration: 10m |
| 71 | recordDeleteAfter: 48h |
| 72 | |
| 73 | paths: |
| 74 | all_others: |