Configuration de streaming vidéo en direct
Ce que fait cette page
Ce guide vous aide à configurer la fonction de streaming vidéo en direct sur votre site ComusThumbz. Une fois configurés, vos créateurs peuvent diffuser des vidéos en direct directement de leur navigateur à leurs fans, avec des conversations en temps réel, des pourboires et des émissions privées. Pensez-y comme mettre en place votre propre plateforme de streaming en direct Twitch ou OnlyFans.
[Screenshot: en direct-streaming-overview]
Pourquoi tu as besoin de ça
La fonctionnalité de streaming en direct permet aux créateurs de votre site:
- Aller directement en direct de leur navigateur (pas de logiciel spécial nécessaire)
- Vidéo en streaming avec très peu de retard (moins de 1 seconde)
- Dialoguez avec les téléspectateurs en temps réel
- Recevez des conseils pendant leur flux
- Offrir des spectacles individuels privés
- Contrôle qui peut regarder (gratuit, abonnés seulement, à la carte, etc.)
Pour les téléspectateurs, ils peuvent :
- Les créateurs de montres diffusent en direct
- Envoyer des messages dans le chat
- Envoyer des conseils aux créateurs
- Demander des spectacles privés
Avant de commencer
Le streaming en direct nécessite un serveur dédié ou VPS (Virtual Private Server). Il ne fonctionnera PAS sur l'hébergement partagé comme GoDaddy ou les plans de base de Bluehost. Vous avez besoin d'un accès racine pour installer un logiciel sur le serveur.
Ce dont vous aurez besoin
- Un serveur séparé ou un VPS - Ce peut être le même serveur où ComusThumbz est installé, ou un autre. Minimum 2 Go RAM, 2 cœurs CPU recommandés.
- Un domaine ou sous-domaine - Quelque chose comme
streaming.yoursite.com - Environ 30-60 minutes - Pour le processus de configuration
- Confort de base avec une ligne de commande - Vous devrez exécuter certaines commandes sur votre serveur
Vérifier si vous êtes prêt
Connectez-vous à votre serveur via SSH et exécutez ces commandes :
Vérifiez l'IP public de votre serveur
Si Docker n'est pas installé, ne vous inquiétez pas - le script d'installation peut l'installer pour vous.
Comprendre la configuration
Comment fonctionne la diffusion en direct
- Un créateur ouvre la page "Go Live" sur votre site
- Leur webcam et leur microphone se connectent à votre serveur de streaming
- Le serveur en streaming envoie la vidéo à tous les téléspectateurs qui regardent
- Tout le monde peut discuter et envoyer des conseils en temps réel
Ce qui est installé
Le processus de configuration s'installe LiveKit, qui est le logiciel de serveur en streaming. Il fonctionne dans un conteneur Docker (pensez-y comme un mini-ordinateur autonome) sur votre serveur et gère tout le routage vidéo.
Étapes d'installation
Étape 1: Choisissez votre méthode d'installation
Il y a deux façons de configurer le serveur de streaming:
Option A: Installation automatisée (recommandée) - Un script fait tout pour toi
Option B: Configuration manuelle - Vous exécutez chaque commande vous-même (pour les utilisateurs avancés)
Nous recommandons l'option A pour la plupart des gens.
Option A : Installation automatisée (la plus facile)
1. Télécharger le script de configuration
- Téléchargez le script d'installation depuis votre dossier d'installation ComusThumbz :
tools/setuplivekitserver.sh - Téléchargez-le sur votre serveur de streaming (vous pouvez le mettre dans votre répertoire)
2. Rendre le script exécutable
Connectez-vous à votre serveur via SSH et lancez :
3. Lancez le script de configuration
Le script vous posera quelques questions, puis :
- Installez Docker si nécessaire
- Configurez votre pare-feu
- Configuration du serveur de streaming
- Générer des clés de sécurité
4. Sauvegardez vos lettres de créances
À la fin, le script vous montrera quelque chose comme:
Copiez ces identifiants et sauvez-les dans un endroit sûr ! Vous en aurez besoin dans la prochaine section.
5. Essai de l ' installation
Le script vous dira si tout fonctionne. Vous devriez voir un message disant "LiveKit fonctionne avec succès."
Option B: Installation manuelle (avancée)
Si vous préférez effectuer l'installation manuellement ou si le script automatisé ne fonctionne pas pour votre serveur, suivez les étapes d'installation manuelle détaillées du guide technique.
Les étapes manuelles sont essentiellement les mêmes choses que le script automatisé, juste divisé en commandes individuelles. Ne l'utilisez que si vous êtes à l'aise avec l'administration du serveur.
Connexion de ComusThumbz au serveur de streaming
Maintenant que votre serveur de streaming fonctionne, vous devez dire à votre installation ComusThumbz comment vous y connecter.
Étape 1: Activer la fonctionnalité
- Log into your Admin Panel
- Go to Admin Panel > Settings > Feature Toggles
- Find Live Streaming and turn it ON
- Click Save Changes
Step 2: Add Your Streaming Server Details
You need to add three pieces of information to your configuration file.
- Log into your web server via SFTP or File Manager
- Navigate to
ct/dat/config.inc.php - Open the file for editing
- Add these lines at the end of the file (before the closing
?>if there is one):
- Replace the values:
streaming.yoursite.com- Your streaming server domainpaste-your-api-key-here- The API Key from Step 4 of the installationpaste-your-api-secret-here- The API Secret from Step 4 of the installation
- Save the file
For LIVEKITHOST, use
wss:// (secure WebSocket) if you have SSL/HTTPS on your site. If you're just testing on a local network, you can use ws:// followed by your server's IP address and :7880.
Step 3: Verify It's Working
- Log into your site as a user who has creator access
- Go to My Account > Go Live (in your user settings)
- You should see the "Go Live" page with webcam options
- If you see an error message instead, something isn't configured correctly
Testing Your Setup
Complete Streaming Test
Follow these steps to verify everything is working:
1. Prepare a Creator Account
You need an account with creator privileges to test.
- Go to Admin Panel > Users > User Management
- Find the user you want to test with
- Click Edit
- Make sure Is Creator is set to Yes
- Save
2. Start a Test Stream
- Log in as the creator
- Go to My Account > Go Live
- Fill in a stream title (like "Test Stream")
- Set access to Free (so anyone can watch)
- Click Start Streaming
- When your browser asks for camera/microphone permission, click Allow
- You should see your webcam preview on screen
3. Watch the Stream as a Viewer
- Open a different browser (or incognito/private window)
- Visit your site and go to Live Streams in the main menu
- You should see your test stream listed
- Click on it to watch
- The video should appear within 1-2 seconds
4. Test the Chat
- In the viewer window, type a message in the chat box and press Enter
- The message should appear in both the viewer and broadcaster windows
- This confirms real-time communication is working
5. End the Stream
- Back in the broadcaster window, click End Stream
- The stream should disappear from the Live Streams page
- The viewer should see a message that the stream has ended
If all five steps worked, congratulations! Your live streaming is fully operational.
Where Creators and Viewers Go
For Creators (Broadcasters)
Go Live Page: Settings > Go Live
On this page, creators can:
- Select their camera and microphone
- Set a title and description for their stream
- Choose who can watch (free, password protected, subscribers only, pay-per-view, or tip goal)
- See their viewer count
- Read and respond to chat messages
- See tip notifications
- Accept or decline private show requests
For Viewers
Stream Directory: Live Streams (in main navigation)
This page shows:
- All active streams as a grid of preview cards
- Number of viewers watching each stream
- Creator's profile picture and name
Watch Stream Page: Clicking on any stream opens the viewer page
On this page, viewers can:
- Watch the live video
- Chat with the creator and other viewers
- Send tips
- Request a private show (if they have enough tokens)
Common Tasks
Restarting the Streaming Server
If your streams aren't working, sometimes you just need to restart the server:
Wait 10 seconds, then test again.
Checking if the Streaming Server is Running
If you see a line with "livekit" in it, the server is running. If you don't see anything, start it:
Viewing Server Logs
If something isn't working and you need to see what's happening:
Watch the log in real-time (press Ctrl+C to stop)
Updating the Streaming Server
Every few months, you may want to update to the latest version:
Restart with the new version
Troubleshooting
Streams Won't Start
What you see: Creator clicks "Start Streaming" but nothing happens or an error appears.
How to fix it:
- Check that the feature is enabled in Admin Panel > Settings > Feature Toggles
- Verify the creator account has Is Creator set to Yes
- Check your
config.inc.phpfile has the three LIVEKIT settings - Verify the streaming server is running:
docker ps | grep livekit
Viewers Can't Connect
What you see: The Live Streams page loads but clicking a stream shows an error or black screen.
How to fix it:
- Make sure your firewall allows traffic on these ports:
- TCP: 7880, 7881
- UDP: 50000-60000
- Check that your LIVEKITHOST uses
wss://(notws://) if your site uses HTTPS - Verify your SSL certificate is valid if using HTTPS
Chat Works But Video is Black
What you see: Viewers can send chat messages but the video never appears.
How to fix it:
This usually means the UDP ports are blocked. On your streaming server:
Then restart the streaming server and try again.
"You Already Have an Active Stream" Error
What you see: Creator tries to go live but gets an error saying they already have a stream.
How to fix it:
This happens if a previous stream didn't end properly (browser crash, etc.). You can manually end it:
- Go to Admin Panel > Live Streams (if you have this page)
- Find the stuck stream and click End Stream
Or ask a developer to run this SQL command:
Replace [USERID] with the creator's user ID number.
Stream Previews Not Showing
What you see: The Live Streams directory page shows streams but no preview images.
How to fix it:
- Check that the
uploads/streamsnapshots/folder exists - Make sure the folder is writable (permission 755 or 777)
- Wait a few seconds - previews are captured every 30 seconds during a live stream
Tips for New Users
- Start with free streams - Get comfortable with the technology before setting up paid streams
- Test with friends - Have a few people watch your first stream to verify everything works
- Check your internet speed - Creators need at least 5 Mbps upload speed for good quality streaming
- Use a wired connection - WiFi can be unreliable for streaming; ethernet cables work better
- Close other apps - Streaming uses a lot of computer resources; close unnecessary programs
- Have good lighting - Viewers can't tip if they can't see you clearly
Access Control Options Explained
When creators start a stream, they choose who can watch:
Creators can change these settings for each stream.
Understanding Private Shows
Private shows are one-on-one streams between a creator and a single viewer. Here's how they work:
- A viewer watches a public stream
- They click Request Private Show
- They set how many minutes they want
- The request appears to the creator
- If the creator accepts:
- The public stream ends
- A new private stream starts
- Only the requesting viewer can watch
- Tokens are deducted per minute automatically
- When time runs out (or someone ends it), the private show ends
Creators set their per-minute rate in their creator profile settings.
Security and Privacy
What's Protected
- All video streams are encrypted in transit
- Tokens (payment for access) are generated by the server, not the browser
- Viewers can only join rooms they have permission for
- Chat messages are stored in your database
What to Watch For
- Require SSL/HTTPS - Always use
wss://in your LIVEKIT_HOST setting for production sites - Monitor reported streams - Have a moderation system for inappropriate content
- Set up rate limiting - Prevent chat spam by limiting how fast users can send messages
- Review your firewall - Only open the ports mentioned in this guide
Related Pages
Getting Help
If you're stuck:
- Check the logs - Run
docker logs livekitto see what the streaming server is reporting - Test the connection - Make sure you can reach your streaming server from a browser
- Verify your config - Double-check the three LIVEKIT settings in
config.inc.php - Check the forum - Other users may have solved the same issue
- Contact support - Provide the output of
docker psanddocker logs --tail 50 livekit
What's Next?
Once your live streaming is set up:
- Promote the feature - Let your creators know they can now go live
- Create a guide for creators - Write simple instructions for your specific audience
- Set token prices - Decide pricing for pay-per-view and private shows
- Monitor usage - Watch server resources to see if you need to upgrade
- Gather feedback - Ask creators and viewers what they like or what needs improvement
Live streaming can significantly increase engagement and revenue on your site. Take time to promote it to your creators and viewers!