doc: update README

This commit is contained in:
Rob Watson 2025-05-15 08:28:57 +02:00
parent d48aeed636
commit 827ec8388c
2 changed files with 42 additions and 14 deletions

View File

@ -31,10 +31,6 @@ Octoplex is a Docker-native live video restreamer.
+--------------+ +--------------+
``` ```
## Asciicast :video_camera:
[![asciicast](https://asciinema.org/a/Es8hpa6rq82ov7cDM6bZTVyCT.svg)](https://asciinema.org/a/Es8hpa6rq82ov7cDM6bZTVyCT)
## Installation ## Installation
### Docker Engine ### Docker Engine
@ -64,10 +60,42 @@ Unarchive the `octoplex` binary and copy it somewhere in your $PATH.
## Usage ## Usage
Launch the `octoplex` binary. Octoplex can run as a single process (all-in-one), or in separate client/server mode.
Mode|Pick this when you...
---|---
All-in-one|Are testing locally, debugging, or streaming from the same machine that runs Docker.
Client/server|Want the server on a remote host (e.g., cloud VM) for long-running or unattended streams.
### All-in-one mode
```bash
$ octoplex run
``` ```
$ octoplex
Starts the media server and the terminal UI in one process.
Docker must be running on the same machine.
### Client/server mode
1. **Start the server** (on the host you want to handle the streams):
```bash
$ octoplex server start
```
2. **Connect the client** (from your laptop or any host):
```bash
$ octoplex client # --host my.remotehost.com if on a different host
```
Note: `client` is a lightweight TUI, it does not require Docker.
3. **Stop the server** (and clean up and Docker resources) on the remote host:
```bash
$ octoplex server stop
``` ```
### Restreaming with OBS ### Restreaming with OBS

16
main.go
View File

@ -52,6 +52,14 @@ func main() {
Name: "Octoplex", Name: "Octoplex",
Usage: "Octoplex is a live video restreamer for Docker.", Usage: "Octoplex is a live video restreamer for Docker.",
Commands: []*cli.Command{ Commands: []*cli.Command{
{
Name: "run",
Usage: "Run server and client in the same process",
Description: "Run the server and client in the same process. This is useful for testing, debugging or running for a single user.",
Action: func(c *cli.Context) error {
return runClientAndServer(c)
},
},
{ {
Name: "client", Name: "client",
Usage: "Run the client", Usage: "Run the client",
@ -106,14 +114,6 @@ func main() {
}, },
}, },
}, },
{
Name: "run",
Usage: "Run server and client in the same process",
Description: "Run the server and client in the same process. This is useful for testing, debugging or running for a single user.",
Action: func(c *cli.Context) error {
return runClientAndServer(c)
},
},
{ {
Name: "version", Name: "version",
Usage: "Print the version", Usage: "Print the version",