Skip to content

Commit c6cabe0

Browse files
committed
Fix and clean package.json, regenerate package-lock.json, reinstall node modules
2 parents b7e4339 + 836b2a0 commit c6cabe0

612 files changed

Lines changed: 2343 additions & 73222 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,28 @@ INFURA_API_KEY=your-infura-api-key
5555
# INFLUXDB_TOKEN=your-influxdb-token
5656
# INFLUXDB_ORG=your-org
5757
# INFLUXDB_BUCKET=substream-analytics
58+
59+
# Video Transcoding Configuration
60+
FFMPEG_PATH=/usr/bin/ffmpeg
61+
TRANSCODING_OUTPUT_DIR=./transcoded
62+
MAX_CONCURRENT_TRANSCODINGS=3
63+
64+
# Redis Configuration (for job queue)
65+
REDIS_HOST=localhost
66+
REDIS_PORT=6379
67+
REDIS_PASSWORD=
68+
REDIS_DB=0
69+
70+
# S3 Configuration (for video storage)
71+
S3_BUCKET=your-s3-bucket
72+
S3_REGION=us-east-1
73+
S3_ACCESS_KEY_ID=your-access-key
74+
S3_SECRET_ACCESS_KEY=your-secret-key
75+
76+
# IPFS Configuration
77+
IPFS_HOST=localhost
78+
IPFS_PORT=5001
79+
IPFS_PROTOCOL=http
80+
81+
# CDN Configuration for video streaming
82+
CDN_BASE_URL=https://cdn.example.com/videos

.github/workflows/test.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ jobs:
1010
test:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414
- name: Use Node.js
15-
uses: actions/setup-node@v3
15+
uses: actions/setup-node@v4
1616
with:
17-
node-version: '18'
17+
node-version: '20.11.0'
18+
- name: Install FFmpeg
19+
run: |
20+
sudo apt-get update
21+
sudo apt-get install -y ffmpeg
1822
- run: npm ci
1923
- run: npm test

README.md

Lines changed: 46 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ A comprehensive backend API for the SubStream Protocol, supporting wallet-based
44

55
## Features
66

7+
### 🎥 Video Transcoding & Streaming
8+
- **Multi-resolution transcoding**: Automatic conversion to 360p, 720p, and 1080p
9+
- **HLS streaming**: Segmented video for smooth adaptive bitrate streaming
10+
- **Adaptive quality**: Automatic quality selection based on connection speed
11+
- **Background processing**: Queue-based transcoding with Redis
12+
- **Storage flexibility**: Support for S3 and IPFS storage
13+
- **Pay-per-second integration**: Seamless integration with subscription system
14+
715
### 🔐 Authentication (SIWE)
816
- Wallet-based authentication using Sign In With Ethereum
917
- JWT token generation and validation
@@ -32,33 +40,64 @@ A comprehensive backend API for the SubStream Protocol, supporting wallet-based
3240
## Quick Start
3341

3442
### Prerequisites
35-
- Node.js 16+
43+
- Node.js 20.11.0+
3644
- npm or yarn
45+
- FFmpeg (for video transcoding)
46+
- Redis (for job queue)
3747

3848
### Installation
3949

4050
1. Clone the repository:
4151
```bash
42-
git clone https://github.com/jobbykings/SubStream-Protocol-Backend.git
52+
git clone https://github.com/lifewithbigdamz/SubStream-Protocol-Backend.git
4353
cd SubStream-Protocol-Backend
4454
```
4555

46-
2. Install dependencies:
56+
2. Install FFmpeg:
57+
```bash
58+
# Ubuntu/Debian
59+
sudo apt-get update && sudo apt-get install -y ffmpeg
60+
61+
# macOS
62+
brew install ffmpeg
63+
64+
# Windows
65+
# Download from https://ffmpeg.org/download.html
66+
```
67+
68+
3. Install and start Redis:
69+
```bash
70+
# Ubuntu/Debian
71+
sudo apt-get install redis-server
72+
sudo systemctl start redis
73+
74+
# macOS
75+
brew install redis
76+
brew services start redis
77+
78+
# Windows
79+
# Download from https://redis.io/download
80+
```
81+
82+
4. Install dependencies:
4783
```bash
4884
npm install
4985
```
5086

51-
3. Copy environment variables:
87+
5. Copy environment variables:
5288
```bash
5389
cp .env.example .env
5490
```
5591

56-
4. Configure your environment variables in `.env`:
92+
6. Configure your environment variables in `.env`:
5793
- Set your JWT secret
5894
- Add IPFS service API keys
59-
- Configure database connections (optional for development)
95+
- Configure Redis connection
96+
- Set up S3 credentials (optional)
97+
- Configure FFmpeg path
98+
- Set up CDN base URL
6099

61-
5. Start the server:
100+
7. Start the server:
62101
```bash
63102
# Development
64103
npm run dev

0 commit comments

Comments
 (0)