Updated README.md
This commit is contained in:
parent
cfb1f8ffbc
commit
53f7750e0d
1 changed files with 43 additions and 9 deletions
52
README.md
52
README.md
|
|
@ -50,16 +50,21 @@ Step 2. Run — replace `/your/video/path` with the real path on your host
|
||||||
|
|
||||||
A. Using `docker run`:
|
A. Using `docker run`:
|
||||||
|
|
||||||
|
`mkdir -p data`
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run -d \
|
docker run -d \
|
||||||
--name videopress \
|
--name videopress \
|
||||||
--restart unless-stopped \
|
--restart unless-stopped \
|
||||||
-p 8080:8080 \
|
-p 8080:8080 \
|
||||||
-v /your/video/path:/media \
|
-v /your/video/path:/media \
|
||||||
|
-v ./data:/data \
|
||||||
videopress
|
videopress
|
||||||
```
|
```
|
||||||
B. Using Docker Compose
|
B. Using Docker Compose
|
||||||
|
|
||||||
|
`mkdir -p data`
|
||||||
|
|
||||||
`docker compose up -d`
|
`docker compose up -d`
|
||||||
|
|
||||||
Step 3. Open http://localhost:8080
|
Step 3. Open http://localhost:8080
|
||||||
|
|
@ -120,6 +125,8 @@ Browser ──HTTP──▶ Gunicorn (gevent worker)
|
||||||
└─ POST /api/compress/cancel/<id>
|
└─ POST /api/compress/cancel/<id>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**Why gevent?** SSE (`/api/compress/progress`) is a long-lived streaming
|
**Why gevent?** SSE (`/api/compress/progress`) is a long-lived streaming
|
||||||
response. Standard Gunicorn sync workers block for its entire duration.
|
response. Standard Gunicorn sync workers block for its entire duration.
|
||||||
Gevent workers use cooperative greenlets so a single worker process can
|
Gevent workers use cooperative greenlets so a single worker process can
|
||||||
|
|
@ -146,17 +153,44 @@ in-process job store with Redis.
|
||||||
|
|
||||||
```
|
```
|
||||||
videocompressor/
|
videocompressor/
|
||||||
├── app.py ← Flask application + all API routes
|
├── app
|
||||||
├── wsgi.py ← Gunicorn entry point (imports app from app.py)
|
├── __init__.py
|
||||||
├── gunicorn.conf.py ← Gunicorn configuration (gevent, timeout, logging)
|
├── config.py
|
||||||
├── requirements.txt ← Python dependencies
|
├── db.py
|
||||||
├── Dockerfile ← Two-stage Docker build
|
├── jobs.py
|
||||||
├── docker-compose.yml ← Volume mapping, port, env vars
|
├── media.py
|
||||||
├── start.sh ← Helper script (dev + prod modes)
|
├── notify.py
|
||||||
|
└── routes.py
|
||||||
|
├── wsgi.py
|
||||||
|
├── gunicorn.conf.py
|
||||||
|
├── requirements.txt
|
||||||
|
├── Dockerfile
|
||||||
|
├── docker-compose.yml
|
||||||
|
├── start.sh
|
||||||
├── README.md
|
├── README.md
|
||||||
├── templates/
|
├── templates/
|
||||||
│ └── index.html
|
│ └── index.html
|
||||||
└── static/
|
└── static/
|
||||||
├── css/main.css
|
├── css
|
||||||
└── js/app.js
|
└── main.css
|
||||||
|
└── js
|
||||||
|
├── app.js
|
||||||
|
└── modules
|
||||||
|
├── browser.js
|
||||||
|
├── compress.js
|
||||||
|
├── progress.js
|
||||||
|
├── scan.js
|
||||||
|
├── session.js
|
||||||
|
├── settings.js
|
||||||
|
├── state.js
|
||||||
|
├── stream.js
|
||||||
|
├── theme.js
|
||||||
|
└── utils.js
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Contribute
|
||||||
|
Feel free to clone the repository, make updates, and submit a pull request to make this more feature rich.
|
||||||
|
|
||||||
|
Keep in mind, I like to keep things fairly simple to use.
|
||||||
|
|
||||||
|
If you need to know too much about ffmpeg and how to configure the perfect compression, then that may be too much for this app, but feel free to fork this repository and make your own as well.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue