プロジェクトに取り組んでいます。RTMPコンテナにパケットを書き込みたいです。
私が達成したことは次のとおりです。
- RED5を使用してRTMPリクエストをリッスンするアプリを起動します。rtmp:// localhost/myappとしましょう
- IContainerFormatの出力形式でIContainerを開くことができます。giveas( "flv"、 "rtmp:// localhost / myapp / test"、null)
何がうまくいかないのですか:
- 開いているこのRTMPチャネルにパケットを書き込みたい。
- 問題はFFMPEGがエラー32を出し始めることです。このエラーに関連する少しの検索は、これが通常クライアントとサーバーのデータ消費の間に遅れがあるために起こることを示しました。しかし、私は本当にこの問題を解決することができませんでした。私はたくさん検索しましたが、誰もが同じ問題について泣いています。私が得るエラーは:
- 開いているこのRTMPチャネルにパケットを書き込みたい。
12:57:20.242 [Thread-0] ERROR org.ffmpeg-WriteN、RTMP送信エラー32(129バイト)12:57:20.246 [Thread-0] ERROR org.ffmpeg-WriteN、RTMP送信エラー32(45バイト) 12:57:20.246 [Thread-0] ERROR org.ffmpeg-WriteN、RTMP送信エラー9(42バイト)
そしてこれは私がRed5サーバーで受け取るエラーです
[INFO] [NioProcessor-1] org.red5.server.stream.ClientBroadcastStream - Provider connect
[INFO] [NioProcessor-1] org.red5.server.stream.ClientBroadcastStream - Stream start
[INFO] [NioProcessor-1] org.red5.server.stream.ClientBroadcastStream - Provider connect
[ERROR] [NioProcessor-1] org.red5.server.net.rtmp.codec.RTMPProtocolDecoder - Error decoding buffer
org.red5.server.net.protocol.ProtocolException: Error during decoding
at org.red5.server.net.rtmp.codec.RTMPProtocolDecoder.decode(RTMPProtocolDecoder.java:203) [red5.jar:na]
at org.red5.server.net.rtmp.codec.RTMPProtocolDecoder.decodeBuffer(RTMPProtocolDecoder.java:122) [red5.jar:na]
at org.red5.server.net.rtmp.codec.RTMPMinaProtocolDecoder.decode(RTMPMinaProtocolDecoder.java:61) [red5.jar:na]
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:225) [mina-core-2.0.0-RC1.jar:na]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434) [mina-core-2.0.0-RC1.jar:na]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46) [mina-core-2.0.0-RC1.jar:na]
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793) [mina-core-2.0.0-RC1.jar:na]
at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119) [mina-core-2.0.0-RC1.jar:na]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434) [mina-core-2.0.0-RC1.jar:na]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426) [mina-core-2.0.0-RC1.jar:na]
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:638) [mina-core-2.0.0-RC1.jar:na]
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:598) [mina-core-2.0.0-RC1.jar:na]
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:587) [mina-core-2.0.0-RC1.jar:na]
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:61) [mina-core-2.0.0-RC1.jar:na]
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:969) [mina-core-2.0.0-RC1.jar:na]
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64) [mina-core-2.0.0-RC1.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.7.0_07]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.7.0_07]
at java.lang.Thread.run(Unknown Source) [na:1.7.0_07]
Caused by: java.lang.IllegalArgumentException: null
at java.nio.Buffer.limit(Unknown Source) [na:1.7.0_07]
at org.red5.io.amf.Input.bufferToString(Input.java:275) [red5.jar:na]
at org.red5.io.amf.Input.getString(Input.java:258) [red5.jar:na]
at org.red5.io.amf.Input.readPropertyName(Input.java:565) [red5.jar:na]
at org.red5.io.amf.Input.readKeyValues(Input.java:351) [red5.jar:na]
at org.red5.io.amf.Input.readSimpleObject(Input.java:501) [red5.jar:na]
at org.red5.io.amf.Input.readObject(Input.java:537) [red5.jar:na]
at org.red5.server.net.rtmp.codec.RTMPProtocolDecoder.decodeStreamMetadata(RTMPProtocolDecoder.java:978) [red5.jar:na]
at org.red5.server.net.rtmp.codec.RTMPProtocolDecoder.decodeMessage(RTMPProtocolDecoder.java:564) [red5.jar:na]
at org.red5.server.net.rtmp.codec.RTMPProtocolDecoder.decodePacket(RTMPProtocolDecoder.java:385) [red5.jar:na]
at org.red5.server.net.rtmp.codec.RTMPProtocolDecoder.decode(RTMPProtocolDecoder.java:190) [red5.jar:na]
... 18 common frames omitted
[WARN] [NioProcessor-1] org.red5.server.net.rtmp.codec.RTMPProtocolDecoder - Closing connection because decoding failed: RTMPMinaConnection from 127.0.0.1 : 44814 to localhost (in: 3569 out 3521 )
[INFO] [NioProcessor-1] org.red5.server.stream.ClientBroadcastStream - Close
[INFO] [NioProcessor-1] org.red5.server.stream.ClientBroadcastStream - Provider disconnect
[INFO] [NioProcessor-1] org.red5.server.stream.ClientBroadcastStream - Provider disconnect
[INFO] [NioProcessor-1] org.red5.server.net.rtmp.RTMPHandler - Connecting to: [Scope@5f524524 Depth = 2, Path = '/default/myapp', Name = 'test']
[INFO] [NioProcessor-1] org.red5.server.net.rtmp.RTMPHandler - Remembering client buffer on stream: 300
[ERROR] [NioProcessor-1] org.red5.server.service.ServiceInvoker - Method FCSubscribe with parameters [teststream] not found in org.red5.core.Application@b9e19da
[WARN] [NioProcessor-1] org.red5.server.stream.PlayEngine - Subscribe to teststream provider failed
私はメディアストリーミングに慣れていないので、何かが足りないかどうかわかりません。
前もって感謝します。