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

JS
{
	"name": "FFmpeg Streaming Renderer",
	"url": "...",
	"sdpFileName": "...",
	"outputContainerFormat": "...",
    "outputAudioFormat": "...",
    "outputVideoFormat": "...",
    "options": {
        ...
    }
}
FieldDescription
url

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

sdpFileNameUNC 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).  

outputAudioFormatName of the audio format of the stream. Optional, not used for some containers.
outputVideoFormatCurrently not used
optionsAn 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)

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

JS
{
	"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

JS
{
    "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

JS
{
    "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

JS
{
    "name": "FFmpeg Streaming Renderer",
    "url": "icecast://user:password@10.1.200.1:8000/stream",
    "outputContainerFormat": "webm",
    "outputAudioCodec": "libvorbis",
    "options": {
        "b" : "96k"
    }
}

File (for debugging)

JSON Structure

JS
{
    "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.