finds.dev← search

// the find

zhangpeihao/gortmp

★ 522 · Go · MIT · updated Oct 2026

Implement RTMP protocol by golang

A Go implementation of the RTMP protocol for connecting to media servers as a client, so you can play or publish streams from code. The repo also contains server-side files and demo programs for a player, publisher, proxy and server, which is the quickest way to see how the API fits together.

- The handler-callback API is clear: OnStreamCreated hands you an OutboundStream, and Play and Publish are called on it, so connection lifecycle stays explicit.

- The protocol code is split by concern across chunkstream.go, header.go, command.go, handshake.go and message.go, so the chunk and message layers can be read separately.

- Handshake and header code has tests against byte fixtures (fp_test_bytes.go, vlc_test_bytes.go, handshake_test.go, header_test.go). That is the right way to test a binary protocol without a live server.

- Four runnable programs in demo/ (player, publisher, proxy, server) show a full flow, which is more useful than the README snippet.

- The README is out of date. Its Todo still lists 'Inbound side' even though inboundconn.go, inboundstream.go and server.go are in the tree, so it's unclear what the server side actually supports.

- The Travis badge points at travis-ci.org, which was shut down, so the CI status shown in the README tells you nothing.

- The README example is a fragment. The numeric argument to rtmp.Dial is unexplained and the handler type is never shown, so a newcomer has to read the demos to get anything running.

- In the visible tree, the only test files cover handshake, header and defines. Nothing covers command handling, chunk stream reassembly or the connection state machine, and nothing exercises a live server.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →