rtmp: support additional Enhanced-RTMP features (#3685) (#4088)

new features:
* support publishing Opus and AC-3 tracks
* support publishing more than 2 tracks. This is compatible with OBS multitrack video and OBS VOD audio track
This commit is contained in:
Alessandro Ros 2025-01-02 12:44:01 +01:00 committed by GitHub
parent 6425bd5a8e
commit 8cbbbc05c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
82 changed files with 2893 additions and 1022 deletions

View file

@ -54,7 +54,10 @@ func TestSource(t *testing.T) {
w, err := rtmp.NewWriter(conn, test.FormatH264, test.FormatMPEG4Audio)
require.NoError(t, err)
err = w.WriteH264(0, 0, true, [][]byte{{0x05, 0x02, 0x03, 0x04}})
err = w.WriteH264(2*time.Second, 2*time.Second, [][]byte{{5, 2, 3, 4}})
require.NoError(t, err)
err = w.WriteH264(3*time.Second, 3*time.Second, [][]byte{{5, 2, 3, 4}})
require.NoError(t, err)
}()