Skip to content

thelazyfox/gortmp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoRTMP Build Status

======

RTMP protocol implementation.

Spec:

Todo:

  • Inbound side

Examples:

// To connect FMS server
obConn, err := rtmp.Dial(url, handler, 100)

// To connect
err = obConn.Connect()

// When new stream created, handler event OnStreamCreated() would been called
func (handler *TestOutboundConnHandler) OnStreamCreated(stream rtmp.OutboundStream) {
	// To play
	err = stream.Play(*streamName, nil, nil, nil)
	// Or publish
	err = stream.Publish(*streamName, "live")
}

// To publish data
stream.PublishAudioData(data, deltaTimestamp)
// or
stream.PublishVideoData(data, deltaTimestamp)
// or
stream.PublishData(tagHeader.TagType, data, deltaTimestamp)

// You can close stream by
stream.Close()

// You can close connection by
obConn.Close()

About

Implement RTMP protocol by golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%