Skip to main content
Version: v2

Using FFmpeg with OptiView Live

FFmpeg is a free open-source command-line tool for handling video, audio, and other multimedia. It is commonly used in production workflows to broadcast a media file using RTMP to OptiView Live.

tip

See the official ffmpeg.org documentation for installation instructions and additional support.

Streaming a file​

ffmpeg -re -stream_loop -1 -i /path/to/file.mp4 \
-c:v copy -c:a copy -f flv \
-rtmp_playpath "your-stream-key" \
-rtmp_live live "rtmps://rtmp.<region>.theo.live/live"
ParameterDescription
-reRead input at native frame rate (for file-based sources only)
-stream_loop -1Loop the video indefinitely
-c:v copyCopy the video codec from the input
-c:a copyCopy the audio codec from the input
-f flvPackage flash video
-re flag

Do not use the -re flag when the input is an actual capture device or a live stream as it may cause packet loss and higher latency.

Upload bandwidth

Make sure that your encoder has a stable connection and enough upload bandwidth. This will ensure all data is correctly sent to the OptiView Live channel.

Low Latency Encoding Settings​

The following settings are recommended to achieve the lowest possible latency when re-encoding when streaming to OptiView Live. These prioritize encoding speed and reduced buffering at the cost of some video quality.

ParameterDescription
-vb 4500kVideo Bitrate setting of 4.5 Mbps
-vprofile mainH264 video profile
-g 60Group of pictures (GOP) size
-preset veryfastFaster encoding speed at the cost of compression efficiency
-tune zerolatencyDisables internal buffering for low-latency streaming
-bf 0Disable B-frames to reduce encoding delay
ffmpeg -f decklink -i "DeckLink Mini Recorder" \
-vcodec libx264 -vb 4500k -vprofile main -g 60 \
-preset veryfast -tune zerolatency -bf 0 \
-c:a aac -ab 128k -f flv \
-rtmp_playpath "your-stream-key" \
-rtmp_live live "rtmps://rtmp.<region>.theo.live/live"