bluenviron / mediamtx

Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.
MIT License
10.78k stars 1.4k forks source link

Unable to stream with RTMP and codec H265/VP9/AV1 #3188

Closed pedroSG94 closed 2 months ago

pedroSG94 commented 3 months ago

Which version are you using?

v1.6.0

Which operating system are you using?

Describe the issue

Due to new AMF0 parser in RTMP . AMF0 Strict Array type is not supported producing this error:

closed: unsupported marker 0x0a

AMF0 documentation to implement Strict Array: https://rtmp.veriskope.com/pdf/amf0-file-format-specification.pdf

According with RTMP enhanced in connect command you need include a property called fourCcList which is a Strict Array: https://veovera.org/docs/enhanced/enhanced-rtmp-v1#extending-netconnection-connect-command

This was working on version 1.5.1 so I think the error is in the new AMF0 parser. Also, I checked that if you send AMF0 types not implemented in this method, the connection fail. I think that the server should at least ignore not implemented types instead of refuse connection if it is a valid type.

I did a PR to fix this error: https://github.com/bluenviron/mediamtx/pull/3189

Describe how to replicate the issue

  1. Download the Android apk attached (this apk is a compilation of this project modified to work with H265 codec as default in rotation example)

app-debug.zip ...

  1. Unzip and install the apk in an Android device
  2. Open app
  3. Open Rotation (include filters) example
  4. Type a rtmp url in the textbox
  5. Press center button to start stream
  6. The connection fail and the app try reconnect.

Did you attach the server logs?

Yes

Did you attach a network dump?

No

aler9 commented 2 months ago

fixed by #3189

github-actions[bot] commented 2 months ago

This issue is mentioned in release v1.7.0 🚀 Check out the entire changelog by clicking here