🛒 scripte-pay.de

CamStream Pro Single Streamer

CamStream Pro Single Streamer

# CamStream Pro

Premium Webcam-Streaming-Portal für Single-Streamer mit DaCast API-Integration

## 🎯 Features

### User-Seite (Subscriber)
- 💳 PayPal-Abo-System (29,99€/Monat, monatlich kündbar)
- 📺 Live-Streaming über DaCast
- 🎬 Video-Archiv mit allen Aufnahmen
- 👁️ Watch-History & Verlauf
- ⏱️ Watchtime-Tracking (automatisch)
- 🔒 Paywall (nur zahlende User sehen Content)
- ⚙️ Account-Management

### Admin-Seite (Streamer)
- 📊 Dashboard (MRR, Revenue, User-Stats, Analytics)
- 📹 Stream-Control (Live gehen/beenden)
- 📡 **DaCast API-Integration** (vollautomatisch)
- 🎬 Video-Upload (lokal oder DaCast-Import)
- 👥 User-Management (Bannen, Abo-Status)
- 💰 Umsatz-Tracking (Abos, Kündigungen)
- 📈 View-Analytics (Top-Videos, Watchtime)

### Technische Features
- 🔐 Session-Management & Security
- 💳 PayPal Subscriptions API mit Webhooks
- 📹 Lokales Video-Hosting ODER DaCast
- 📡 **DaCast REST API v2** (vollständig integriert)
- 💾 MySQL-Datenbank (strukturiert)
- 🔒 Upload-Schutz (.htaccess)
- 📊 Echtzeit-Analytics

---

## 📦 Installation

### Schritt 1: Dateien hochladen
```bash
1. ZIP entpacken
2. Alle Dateien auf Webserver hochladen
3. Ordner-Rechte setzen (chmod 755)
```

### Schritt 2: Installation durchführen
```
1. Browser öffnen: https://yoursite.com/install.php
2. Datenbank-Daten eingeben
3. Website-Name & URL eingeben
4. PayPal-E-Mail eingeben
5. Admin-Account erstellen
6. Installation abschließen
```

**Nach Installation:**
- ✅ install.php wird automatisch gelöscht
- ✅ config.php wird generiert
- ✅ Datenbank-Tabellen werden erstellt
- ✅ Admin-Account ist aktiv

---

## 🎥 DaCast Setup (Streaming-API)

### Was ist DaCast?
**DaCast** ist eine professionelle Streaming-Plattform mit B2B-API. Perfekt für:
- ✅ Adult-Content (erlaubt!)
- ✅ White-Label (dein Branding)
- ✅ Automatische Aufnahmen
- ✅ HD-Streaming
- ✅ Keine Zuschauer-Limits

### Preise (Stand 2026)
| Plan | Preis/Monat | Bandwidth | Recording |
|------|-------------|-----------|-----------|
| **Starter** | $39 | 50 GB | ✅ |
| **Scale** | $188 | 1 TB | ✅ |
| **Premium** | $750 | 6 TB | ✅ |

**Empfehlung:** Starter für Beginn, Scale ab 100+ Subscriber

### Account erstellen
```
1. Website: https://www.dacast.com
2. "Start Free Trial" klicken
3. Account erstellen (14 Tage kostenlos!)
4. Plan auswählen
```

### API-Credentials holen

#### 1. API-Key generieren
```
Dashboard → Settings → API Keys → "Generate New API Key"
```
**Wichtig:** Key sofort kopieren und sicher speichern!

#### 2. Channel-ID finden
```
Dashboard → Live Channels → Dein Channel auswählen
```
Die URL sieht so aus:
```
https://dacast.com/channel/123456_c_789012
^^^^^^ ^^^^^^
Broadcaster-ID Channel-ID
```
- **Broadcaster-ID:** 123456
- **Channel-ID:** 789012

#### 3. In CamStream Pro eintragen
Datei `config.php` öffnen und ergänzen:
```php
// DaCast API Configuration
define('DACAST_API_KEY', 'dein-api-key-hier');
define('DACAST_CHANNEL_ID', '789012');
define('DACAST_BROADCASTER_ID', '123456');
```

**Speichern!** Die Integration ist jetzt aktiv.

### API-Funktionen testen
```
Admin-Login → DaCast-Tab

Du siehst:
✅ API-Verbindungsstatus
✅ Stream-Status (Live/Offline)
✅ Viewer-Count
✅ Verfügbare Recordings
```

---

## 📹 Live-Streaming mit OBS

### OBS Studio Setup

#### 1. OBS herunterladen
- Website: https://obsproject.com
- Für Windows/Mac/Linux verfügbar

#### 2. DaCast RTMP-Daten holen
```
DaCast Dashboard → Encoder Setup

Du bekommst:
- RTMP-URL: rtmp://...
- Stream-Key: dein-stream-key
```

#### 3. OBS konfigurieren
```
OBS → Einstellungen → Stream

Service: Custom
Server: [RTMP-URL von DaCast]
Stream-Key: [Stream-Key von DaCast]
```

#### 4. Recording aktivieren (optional)
```
OBS → Einstellungen → Output

Recording aktivieren → Aufnahmen werden automatisch zu DaCast hochgeladen
```

#### 5. Stream starten
```
1. CamStream Pro Admin → Stream Control → "Live gehen"
2. OBS → "Streaming starten"
3. User sehen jetzt den Live-Stream!
```

---

## 🎬 Video-Management

### Option 1: Lokaler Upload
```
Admin → Videos → "Neues Video hochladen"

- Max. Größe: 500 MB (konfigurierbar)
- Formate: MP4, MOV, AVI
- Speicherort: /uploads/videos/
```

### Option 2: DaCast-Import
```
Admin → DaCast → Recordings importieren

DaCast speichert automatisch alle Live-Streams als VOD.
Diese können direkt importiert werden!

Vorteil: Kein Upload nötig, Videos bleiben bei DaCast gehostet
```

### Video-Verwaltung
- ✅ Titel & Beschreibung bearbeiten
- ✅ Views-Statistiken
- ✅ Watchtime-Analytics
- ✅ Videos löschen

---

## 💳 PayPal-Integration

### PayPal-Webhooks einrichten

**Wichtig:** Ohne Webhooks werden Abos NICHT aktiviert!

#### 1. PayPal-Dashboard öffnen
```
https://www.paypal.com/businessmanage/preferences/website
```

#### 2. Webhooks hinzufügen
```
Developer → Webhooks → Add Webhook

URL: https://yoursite.com/paypal_webhook.php

Events auswählen:
✅ Payment sale completed
✅ Billing subscription activated
✅ Billing subscription cancelled
✅ Billing subscription payment completed
```

#### 3. Testen
```
1. Test-User erstellen
2. Abo abschließen
3. Nach 2-3 Minuten: User hat "active" Status
```

### PayPal-Log überprüfen
Datei auf Server:
```
/paypal_log.txt

Enthält alle Webhook-Calls von PayPal
```

---

## 🔒 Sicherheit & Datenschutz

### Upload-Schutz
Alle Upload-Ordner sind durch `.htaccess` geschützt:
```
/uploads/
/uploads/videos/
/uploads/thumbnails/
/recordings/
```
PHP-Ausführung blockiert!

### HTTPS erforderlich
- ✅ SSL-Zertifikat MUSS aktiv sein
- ✅ PayPal akzeptiert nur HTTPS-Webhooks
- ✅ Video-Streaming erfordert HTTPS

### DSGVO-Konformität
**Erforderlich:**
- 📋 Impressum erstellen
- 📋 Datenschutzerklärung
- 📋 AGB (Adult-Content-Hinweis!)
- 🔞 Altersverifikation (18+)

**Daten-Speicherung:**
- User-Daten (username, email, hashed password)
- Abo-Historie (PayPal-IDs)
- View-Analytics (watchtime, video-views)

**DSGVO-Rechte:**
- User können Account löschen (implementierbar)
- Daten-Export auf Anfrage
- Widerrufsrecht

---

## ⚠️ Rechtliche Hinweise

### Gewerbeanmeldung
- 💼 Gewerbeanmeldung ERFORDERLICH
- 🏦 Steuerpflicht für Einnahmen
- 📋 Umsatzsteuer ab Gewinn

### Adult-Content
Falls Adult-Content:
- 🔞 Altersverifikation (18+) implementiert
- ⚠️ "Nur für Erwachsene"-Hinweis
- 📋 AGB mit Content-Hinweis
- 🚫 Illegale Inhalte (Gewalt, etc.) VERBOTEN

### PayPal-Richtlinien
- ✅ Adult-Content mit PayPal möglich
- ⚠️ Aber: Explizite Inhalte können Probleme machen
- 💡 Alternative: Stripe, CCBill (Adult-freundlicher)

---

## 📊 Datenbank-Struktur

### Tabellen
1. **cam_users** - User-Accounts (mit Abo-Status)
2. **cam_videos** - Video-Archiv (lokal + DaCast)
3. **cam_subscriptions** - Abo-Historie (PayPal-Tracking)
4. **cam_views** - Watch-Analytics (Watchtime, Views)
5. **cam_stream_status** - Live-Status (Viewer-Count)
6. **cam_chat** - Chat-Messages (Vorbereitung für Live-Chat)
7. **cam_settings** - Portal-Einstellungen

### DB-Update für DaCast
Nach Installation ausführen:
```sql
ALTER TABLE cam_videos ADD COLUMN is_dacast TINYINT(1) DEFAULT 0;
ALTER TABLE cam_videos ADD COLUMN dacast_vod_id VARCHAR(100) DEFAULT NULL;
```

---

## 🚀 Go-Live-Checkliste

### Vor dem Start
- [ ] Installation durchgeführt
- [ ] DaCast-Account erstellt
- [ ] DaCast API konfiguriert
- [ ] PayPal-Webhooks eingerichtet
- [ ] OBS getestet
- [ ] SSL-Zertifikat aktiv
- [ ] Impressum & AGB erstellt
- [ ] Test-Abo durchgeführt

### Marketing
- [ ] Social-Media-Profile
- [ ] Landing-Page optimieren
- [ ] Preisgestaltung festlegen
- [ ] Promo-Content erstellen
- [ ] Launch-Datum festlegen

---

## 📱 Mobile-Optimierung

Das Portal ist **responsive** und funktioniert auf:
- ✅ Desktop (Chrome, Firefox, Safari)
- ✅ Tablet (iPad, Android)
- ✅ Mobile (iPhone, Android)

DaCast-Player passt sich automatisch an!

---

## 🆘 Troubleshooting

### Stream lädt nicht
```
Problem: Iframe zeigt "Fehler"
Lösung:
1. DaCast API-Keys überprüfen
2. Channel-ID korrekt?
3. Browser-Console öffnen (F12)
```

### PayPal-Abo nicht aktiviert
```
Problem: User zahlt, aber Status bleibt "inactive"
Lösung:
1. paypal_log.txt überprüfen
2. Webhook-URL korrekt in PayPal?
3. Webhook-Events aktiviert?
```

### Videos spielen nicht ab
```
Problem: "Cannot play video"
Lösung:
1. Video-Datei korrekt hochgeladen?
2. Browser unterstützt MP4?
3. HTTPS aktiv?
```

### DaCast API-Fehler
```
Problem: "API-Key ungültig"
Lösung:
1. API-Key neu generieren
2. Spaces im Key? (Kopieren ohne Leerzeichen!)
3. DaCast-Account aktiv?
```

---

## 📞 Support

### Dokumentation
- **DaCast API:** https://www.dacast.com/support/
- **PayPal API:** https://developer.paypal.com/docs/

### Portal-Konfiguration
- Alle Einstellungen in `config.php`
- Logs in `/paypal_log.txt`
- Fehler-Logs: Server-Error-Log prüfen

---

## 🎉 Fertig!

Das Portal ist **production-ready** und vollständig funktionsfähig!

**Bei Fragen:**
- DaCast-Support: support@dacast.com
- PayPal-Support: https://www.paypal.com/de/smarthelp/

**Viel Erfolg! 🚀**

🔗 Unsere Partner

Scriptworld.de Zahnzusatzversicherung_Fullsize