File size: 1,017 Bytes
e4eeb10
 
 
 
 
 
 
 
 
 
 
 
826207d
 
 
 
e4eeb10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
title: AI WebTV
emoji: 🔮
colorFrom: purple
colorTo: white
sdk: docker
pinned: false
app_port: 7860
---

A generative AI WebTV, powered by Zeroscope and Hugging Face.

Note: this won't work on iOS due to an apparent ban on Media Source Extensions (available on iPadOS).

It should be possible however to use some other protocol or library.

# Installation
## Building and run without Docker

```bash
nvm use
npm i
```

First setup some env vars:
WEBTV_VIDEOPATH="./sandbox/video"
WEBTV_AUDIOPATH="./sandbox/audio" 
WEBTV_RTMP_URL="rtmp://localhost:1935/webtv"


In a terminal, run:

```
./scripts/init.sh
```

Then run:

```
./scripts/audio.sh
```

In another terminal, run:

```
./scripts/video.sh
```

In another terminal, run:

```
./scripts/stream.sh
```

In another terminal, run:

```
npm run start
```

## Building and running with Docker

```bash
npm run docker
```

This script is a shortcut executing the following commands:

```bash
docker build -t ai-webtv .
docker run -it -p 7860:7860 ai-webtv
```