Stream to StreamLive Pro from the FFmpeg command line over RTMPS or SRT: a working command, what each option does, keyframes every 2 seconds, and how to reconnect.
FFmpeg can push a live stream to StreamLive Pro like any other encoder: you encode to H.264 and AAC, wrap it in FLV, and send it to the RTMPS address from the Encoder card with the stream key added at the end. StreamLive Pro then sends that one stream to every channel you ticked. This suits a server, a small always-on computer, a camera feed you already pull with FFmpeg, or a scripted 24-hour channel.
If all you want is to play a video file as a live broadcast at a set time, you do not need FFmpeg: the Pre-recorded broadcast option does it from the dashboard (Broadcast a pre-recorded video as a live stream).
ffmpeg -protocols: rtmps and srt must be in the list. The protocol options used below are documented in FFmpeg Protocols Documentation.
ffmpeg -re -i input.mp4 \
-c:v libx264 -preset veryfast -b:v 4500k -maxrate 4500k -bufsize 9000k \
-pix_fmt yuv420p -g 60 -keyint_min 60 -sc_threshold 0 \
-c:a aac -b:a 128k -ar 44100 \
-f flv "$SLP_URL"

| Option | Why |
|---|---|
-re | Reads a file at its real speed. Leave it out for a live source such as a camera or a capture device, which already arrives in real time |
-c:v libx264 | H.264 video, the only video codec the ingest accepts |
-b:v 4500k -maxrate 4500k -bufsize 9000k | Holds the bitrate close to constant. 4,500 kbps is an example; pick what your upload holds |
-pix_fmt yuv420p | The pixel format players expect from H.264 |
-g 60 -keyint_min 60 -sc_threshold 0 | A keyframe every 60 frames, which is every 2 seconds at 30 fps, and no extra keyframes on scene cuts. At 60 fps use 120 |
-c:a aac -b:a 128k -ar 44100 | AAC audio, 128 kbps at 44.1 kHz, the stereo values YouTube lists (YouTube Help: live encoder settings) |
-f flv | RTMP and RTMPS carry FLV |
YouTube asks for a keyframe every 2 seconds and no more than 4, which is why the command fixes it at 2 rather than leaving it to the encoder. The bitrate choice and the arithmetic against your upload are in Upload speed and bitrate for multistreaming.
On a lossy line, use the SRT tab. Its address already contains the stream ID. If the broadcast shows a passphrase, add it to the URL as a passphrase option, and keep the output in MPEG-TS:
-f mpegts "srt://ADDRESS-FROM-THE-CARD&passphrase=YOUR-PASSPHRASE"
Two details from FFmpeg's documentation: its SRT latency option is in microseconds, not milliseconds, and its default mode is caller, which is what you need to push to our server. The SRT fields are explained in Stream with SRT from OBS, vMix or a hardware encoder.
FFmpeg does not reconnect an output by itself; when the connection drops, the process ends. Cloudflare's page says the client must be set up to reconnect after a disconnection, and that the stream continues when it does. Run FFmpeg from a small loop or a service manager that starts it again after a few seconds. StreamLive Pro gives a dropped encoder a short window to come back before the broadcast ends; see My live stream stopped by itself.
| Symptom | Fix |
|---|---|
| "Protocol not found" for rtmps or srt | Your FFmpeg build lacks TLS or libsrt. Install a full build, or use the RTMP tab |
| Connection refused right away | Wrong key, a key from another broadcast, or a broadcast you stopped earlier. See OBS says "Failed to connect to server |
| Detected, but no picture | Not H.264, or no regular keyframes. Keep -c:v libx264 and the -g value |
| Picture runs too fast from a file | -re is missing |
| Stutter on every network | The bitrate is higher than the upload holds. Lower -b:v and -maxrate |
Yes. FFmpeg sends one stream to StreamLive Pro and our servers send it to every channel you ticked, so the machine running FFmpeg uploads it once.
The RTMPS address from the Encoder card with the stream key added straight after it. The address ends with /live/, so there is no extra slash.
A keyframe every 2 seconds: -g 60 at 30 fps or -g 120 at 60 fps, with scene-cut keyframes turned off.
No. The ingest accepts H.264 video and AAC audio only.
No. The pre-recorded broadcast option plays an uploaded video as a live broadcast at the time you choose. It is on the trial, Pro and Studio, not on Creator.
Stream a game to Twitch, Kick and YouTube at once: OBS sends one stream, StreamLive Pro sends it on, plus chat, upload, platform rules and Shorts of your best moments.
What is an ingest server in live streaming?What is an ingest server: the address your encoder sends a live stream to, with a stream key. How ingest differs from playback, what it checks, and where to find yours.
Connect PRISM Live Studio to StreamLive ProAdd StreamLive Pro as a custom channel in PRISM Live Studio on the computer and send one stream to YouTube, Facebook Pages, Twitch and more: steps, settings and fixes.
Connect XSplit Broadcaster to StreamLive ProAdd a Custom RTMP output in XSplit Broadcaster with StreamLive Pro's address and key, and reach YouTube, Facebook Pages, Twitch and more from one stream: steps and fixes.
Want to try it? 7-day trial, no credit card.
Start free