Set Flash Player Version in RTMP Using FFmpeg

This article explains how to configure the Flash Player version string (flashVer) during the RTMP handshake and connection phase using FFmpeg. Setting this string is often necessary when streaming to restrictive media servers or Content Delivery Networks (CDNs) that validate client versions before accepting an incoming RTMP stream.

Using Native FFmpeg RTMP

When using FFmpeg's native RTMP implementation, set the Flash Player version string using the -rtmp_flashver private option. This option overrides the default version string sent during the initial connect command.

ffmpeg -re -i input.mp4 -c copy -f flv -rtmp_flashver "LNX 11,2,202,235" rtmp://your-server.com/live/streamkey

Place the -rtmp_flashver parameter directly before the output URL.

Flash Player Version Format

The version string generally follows a strict platform and version convention:

  • Format: [PLATFORM] [MAJOR],[MINOR],[BUILD],[REVISION]
  • Linux: "LNX 11,2,202,235"
  • Windows: "WIN 32,0,0,465"
  • macOS: "MAC 32,0,0,465"

If you do not specify this flag, FFmpeg typically sends its default string, often identified as LNX 9,0,124,2.

Using FFmpeg with Librtmp

If your FFmpeg build is compiled with librtmp support enabled (--enable-librtmp), the parameter is passed directly inside the RTMP URL using key-value query parameters rather than a command-line flag.

ffmpeg -re -i input.mp4 -c copy -f flv "rtmp://your-server.com/live/streamkey flashVer=LNX\\ 11,2,202,235"

Notice the escaped space (\\) between the platform identifier and the version numbers, which is required to prevent the shell from breaking the string.

Verifying the Configuration

To verify that the correct flashVer is being transmitted to the RTMP server, run the FFmpeg command with the logging verbosity set to trace:

ffmpeg -v trace -re -i input.mp4 -c copy -f flv -rtmp_flashver "WIN 32,0,0,465" rtmp://your-server.com/live/streamkey

Inspect the console output for the connect packet dump. You will find the flashVer field reflecting the custom version string assigned in the command.