How to Set Up Unmanned Live Streaming with FFmpeg and RTMP
Unmanned live streaming—pre‑recorded video played continuously—can be achieved by capturing an MP4 file and using FFmpeg to push it to an RTMP endpoint, with step‑by‑step instructions for Bilibili and WeChat Video channels, including RTMP URL acquisition, command syntax, and verification.
Unmanned Live Streaming Overview
Unmanned live streaming means recording video content in advance and looping it during a live broadcast to achieve continuous 24‑hour streaming. This reduces labor and material costs and can be used for product promotion, audience retention, or monetisation. Two typical scenarios are (1) streaming product, material, or game screens without a real presenter, and (2) simply repeating a pre‑recorded video.
Implementation with FFmpeg
Bilibili Live
Step 1. Obtain the RTMP push URL
Server address: rtmp://live-push.bilivideo.com/live-bvc/ Stream key:
?streamname=live_350943383_7128776&key=f9467ea5d97f5e1f7c35128e451031eb&schedule=rtmp&pflag=1Full push URL (concatenation of server address and stream key):
rtmp://live-push.bilivideo.com/live-bvc/?streamname=live_350943383_7128776&key=f9467ea5d97f5e1f7c35128e451031eb&schedule=rtmp&pflag=1Step 2. Prepare a source MP4 file
Any MP4 video can be used. The example in the guide is workerman.mp4, which contains generic content suitable for looping.
Step 3. Push the stream with FFmpeg
ffmpeg -re -stream_loop -1 \
-i ./workerman.mp4 \
-c copy -f flv \
"rtmp://live-push.bilivideo.com/live-bvc/?streamname=live_350943383_7128776&key=f9467ea5d97f5e1f7c35128e451031eb&schedule=rtmp&pflag=1"Explanation of the options: -re: read the input at its native frame rate, which mimics a live source. -stream_loop -1: loop the input file indefinitely. -i ./workerman.mp4: path to the source video. -c copy: copy audio and video streams without re‑encoding, preserving original quality and reducing CPU load. -f flv: force the FLV container required for RTMP.
Step 4. Verify the live stream
Open the Bilibili live room URL in a browser or media player to confirm that the video is being streamed continuously:
http://live.bilibili.com/14033404
WeChat Video Channel
The workflow for WeChat Video Channel is identical: obtain an RTMP push address via the WeChat Video Assistant, then execute the same FFmpeg command shown above to start an unmanned live broadcast.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Open Source Tech Hub
Sharing cutting-edge internet technologies and practical AI resources.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
