How to Set Flash Player Version in FFmpeg RTMP

This article explains how to configure the Flash Player version string during an RTMP handshake using FFmpeg. You will learn the specific command-line parameters and URL-formatting techniques required to customize this value, which is often necessary to bypass strict server-side version checks and successfully establish RTMP connections.

Using the -rtmp_flashver Option

The most straightforward way to set the Flash Player version in FFmpeg is by using the -rtmp_flashver private option. This option is passed directly in the command line before your output destination.

The basic syntax is as follows:

ffmpeg -i input.mp4 -c:v libx264 -c:a aac -f flv -rtmp_flashver "LNX 9,0,124,2" rtmp://your-server-address/app/stream

In this command: * -rtmp_flashver "LNX 9,0,124,2" explicitly instructs FFmpeg to present itself to the RTMP server as Linux Flash Player version 9,0,124,2.

Appending the Version to the RTMP URL

Alternatively, you can inject the Flash version parameter directly into the RTMP destination URL string. This is particularly useful if you are using FFmpeg within scripts or third-party wrappers that do not easily expose command-line options.

To append the parameter, use a space followed by the key-value pair inside quotes:

ffmpeg -i input.mp4 -c copy -f flv "rtmp://your-server-address/app/stream rtmp_flashver=LNX\ 9,0,124,2"

Note: Depending on your operating system’s terminal, you may need to escape the space character within the version string (e.g., LNX\ 9,0,124,2) to ensure the shell parses the arguments correctly.

Why Modify the Flash Player Version?

By default, FFmpeg’s native RTMP protocol handler identifies itself with a default string (often LNX 9,0,124,2). However, certain legacy media servers, Content Delivery Networks (CDNs), or interactive streaming platforms require a specific, newer version string (such as FMLE/3.0 or a specific Windows-based Flash string like WIN 11,2,202,233) to authorize the incoming stream handshake. Modifying this string prevents connection rejection errors.