0x03 communication protocol_error ai_generated true

RTMP Handshake failed: server responded with unexpected version byte 0x03

ID: communication/rtmp-handshake-failed

Also available as: JSON · Markdown · 中文
79%Fix Rate
83%Confidence
1Evidence
2023-07-22First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
RTMP specification (Adobe) active
FFmpeg 6.0 active
OBS Studio 29.1 active
nginx-rtmp-module 1.2.2 active
Wowza Streaming Engine 4.8.0 active

Root Cause

RTMP client and server fail to negotiate handshake because the server expects Flash Player version 9+ (byte 0x03) but the client sends an older or malformed version (e.g., 0x00 or 0x01), often due to outdated libraries or firewall manipulation.

generic

中文

RTMP 客户端和服务器无法协商握手,因为服务器期望 Flash Player 版本 9+(字节 0x03),但客户端发送了较旧或格式错误的版本(例如 0x00 或 0x01),通常是由于过时的库或防火墙篡改。

Official Documentation

https://rtmp.veriskope.com/docs/spec/

Workarounds

  1. 90% success Update the RTMP client library to a version that sends the correct handshake byte (0x03): for FFmpeg, upgrade to 6.0 or later; for OBS, ensure version 29.0+.
    Update the RTMP client library to a version that sends the correct handshake byte (0x03): for FFmpeg, upgrade to 6.0 or later; for OBS, ensure version 29.0+.
  2. 80% success Override the handshake version on the server side: in nginx-rtmp-module, set 'rtmp_version 3;' in the configuration to force acceptance of older clients (though this may reduce security).
    Override the handshake version on the server side: in nginx-rtmp-module, set 'rtmp_version 3;' in the configuration to force acceptance of older clients (though this may reduce security).
  3. 75% success Use a proxy to rewrite the handshake: deploy a simple RTMP proxy (e.g., using Node.js 'node-rtmp-server') that intercepts the client's version byte and sends the expected 0x03 to the server.
    Use a proxy to rewrite the handshake: deploy a simple RTMP proxy (e.g., using Node.js 'node-rtmp-server') that intercepts the client's version byte and sends the expected 0x03 to the server.

中文步骤

  1. Update the RTMP client library to a version that sends the correct handshake byte (0x03): for FFmpeg, upgrade to 6.0 or later; for OBS, ensure version 29.0+.
  2. Override the handshake version on the server side: in nginx-rtmp-module, set 'rtmp_version 3;' in the configuration to force acceptance of older clients (though this may reduce security).
  3. Use a proxy to rewrite the handshake: deploy a simple RTMP proxy (e.g., using Node.js 'node-rtmp-server') that intercepts the client's version byte and sends the expected 0x03 to the server.

Dead Ends

Common approaches that don't work:

  1. 80% fail

    Disabling RTMP authentication (e.g., removing 'rtmp_auth' in nginx) does not affect the handshake version negotiation; the version byte mismatch persists.

  2. 70% fail

    Using a different streaming protocol (e.g., RTSP instead of RTMP) changes the issue but may introduce new compatibility problems with the server.

  3. 85% fail

    Increasing the handshake timeout (e.g., 'rtmp_handshake_timeout 30s') only delays the failure; the version mismatch remains.