Skip to main content
Skip table of contents

FFmpeg Streaming Renderer Filter Specification

The FFmpeg streaming renderer filter can only be used as the last filter in an output graph or as sink filter as one outputs of the InfTee filter. The main purpose is providing output of audio as a stream over IP in various supported formats.

JSON Structure
JSON
{
	"name": "FFmpeg Streaming Renderer",
	"url": "...",
	"sdpFileName": "...",
	"outputContainerFormat": "...",
    "outputAudioFormat": "...",
    "outputVideoFormat": "...",
    "options": {
        ...
    },
    "metadata": {
        ...
    },
    "icecast": {
        "baseUrl": "...",
        "mountPoint": "...",
        "adminUser": "...",
        "adminPassword": "..."
    }
}


Field

Description

url

The URL for the created stream. The format is the same as you would specify the output path of ffmpeg.exe.

sdpFileName

UNC Path to a SDP file, which will be written by the filter (the directory must already exist). ). (optional, should be used for RTP streaming)

outputContainerFormat

Name of a container format for the output stream. The container format is in most cases deduced from the url file extension (Optional).  

outputAudioFormat

Name of the audio format of the stream. Optional, not used for some containers.

outputVideoFormat

Currently not used

options

An optional list of arbitrary key/value pairs, which are passed to the filter "as is". The key/value pairs reflect the ffmpeg.exe command line parameter. Default: (none)

metadata

An optional list of arbitrary key/value pairs, which are passed as “global metadata” to the FFmpeg encoder/muxer.

icecast

These settings are optional, and only needed, if ROAD streams to an Icecast server and should update the Icecast’s “StreamTitle” metadata. This metadata is used to show the currently playing song in a continuous Icecast stream, usually in the format “Artist - Song Title”.

  • baseUrl: Public base URL of the Icecast endpoint, e.g. “https://icecast.my-domain.com”

  • mountPoint: The mount point, to which this stream is mapped, e.g. “/my-rock-stream”

  • adminUser: User name of an admin account, which has the rights to access the Icecast server’s “admin” HTTP endpoint

  • adminPassword: Password of the user adminUser

Using

In order to get streaming work use the following steps.

  • Checkout the examples below and adjust, server url, and formats.

  • You can listen to the stream using for example ffplay. (see https://ffmpeg.org/ffplay.html) Example: ffplay.exe -loglevel debug -protocol_whitelist rtp,file,udp g:\_TEST\test.sdp

Troubleshooting

If you do not get an error in ROAD, but also don't hear anything in the player, 

  • use ffmpeg.exe and ffplay.exe to get the desired command line options.

  • ensure that firewall does not block.

  • start with 127.0.0.1 (IPv4 local loopback address) as server and playback on the same computer with the same version of ffmpeg and ffplay.

  • then check ::1 (IPv6 local loopback address)

  • then check localhost

  • then check your computers ip adress (ipconfig)

  • then check your computers ip adress, but use ffplay from a second computer in your LAN. 

  • then check computer name as server url. Be aware that DNS may be different from different computers especially when VPN is used.

  • check that tracert resolves to the same computer

Map the commandline options from FFmpeg.exe to the JSON configuration

Examples

RTP Streaming

JSON Structure
JSON
{
	"name": "FFmpeg Streaming Renderer",
	"url": "rtp://127.0.0.1:1234",
	"sdpFileName": "C:\MySdpFiles\stream.sdp",
	"outputContainerFormat": "rtp",
    "outputAudioCodec": "aac",
    "options": {
        "b" : "128k"
    }
}

HTTP Streaming (chunked transfer encoding)

JSON Structure
JSON
{
    "name": "FFmpeg Streaming Renderer",
    "url": "http://10.1.200.1:8080/test.mp3",
    "outputContainerFormat": "mp3",
    "outputAudioCodec": "libmp3lame",
    "options": {
	    "b" : "128k",
        "headers": "Access-Control-Allow-Origin: *"
    }
}

HLS Streaming

JSON Structure
JSON
{
    "name": "FFmpeg Streaming Renderer",
    "url": "d:/myRadioStream.m3u8",
    "outputContainerFormat": "hls",
    "outputAudioCodec": "aac",
    "options": {
        "b" : "128k",
        "f" : "hls",
        "hls_time" : "4",
        "hls_playlist_type" : "event"    
    }
}

Icecast

JSON Structure
JSON
{
    "name": "FFmpeg Streaming Renderer",
    "url": "icecast://user:password@10.1.200.1:8000/stream",
    "outputContainerFormat": "webm",
    "outputAudioCodec": "libvorbis",
    "options": {
        "b" : "96k"
    },
    "icecast": {
        "baseUrl": "https://icecast.my-domain.com",
        "mountPoint": "/favorite-stream",
        "adminUser": "root",
        "adminPassword": "6-%76zT4Rt4%"
    }
}

File (for debugging)

JSON Structure
JSON
{
    "name": "FFmpeg Streaming Renderer",
    "url": "d:/test.mp3",
    "outputContainerFormat": "mp3",
    "outputAudioCodec": "libmp3lame",
    "options": {
        "b" : "128k"
    }
}


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.