Livestream (Live Video) has the feature to live from directly built-in devices on your computer without the streaming software's support. Furthermore, this new feature still leverages Mux and its features to provide a smooth experience for users. In this article, we will guide you to set up the transcoder server to enable this feature.
Firstly, the transcoder server had been built and pushed to DockerHub at https://hub.docker.com/r/foxsystem/metafox-transcoder-livevideo. Therefore, you can update docker-compose.yml to have a new service - "transcoder" as below.
docker-compose.yml
version: '3' services: ... transcoder: container_name: metafox-transcoder image: foxsystem/metafox-transcoder-livevideo:latest restart: always tty: true volumes: - ./upload:/app/upload ports: - ${WS_EXTERNAL_PORT:-3001}:${WS_PORT} env_file: - .env networks: - metafox-app-tier |
Moreover, to make the server operate correctly, you also have to update your .env to adapt a few variables that the server needs
.env
WS_PORT=3000 WS_EXTERNAL_PORT=3001 NODE_ENV=production JWT_SECRET=transcoderSecret MFOX_BASE_API_URL=https://yourdomain/api/v1 |
Given that,
Finally, you can just restart the docker to apply new service by using command
docker-compose up -d |
Now, let's go to AdminCP of MetaFox to configure Live Video with the transcoder server. Visit AdminCP > App Settings > Live Videos > Settings and configure two settings: Allow Webcam Streaming and Transcoder Server Url (see in image below).
Given that,