AirenSoft / OvenMediaEngine

OvenMediaEngine (OME) is a Sub-Second Latency Live Streaming Server with Large-Scale and High-Definition. #WebRTC #LLHLS
https://OvenMediaEngine.com/ome
GNU Affero General Public License v3.0
2.48k stars 1.05k forks source link

Problems RTMP as live source #1540

Closed willyRed77 closed 4 months ago

willyRed77 commented 4 months ago

Describe the bug Im trying to suggest RTMP by Touchdesigner, with OBS works well. When i start pushing video to rtmp de OvenMedia Engine show this kinds of logs.

Steps to reproduce the behavior:

With Encoder Touchdesigner See error

Expected behavior A clear and concise description of what you expected to happen.

Logs


        [2024-03-01 17:54:22.382] I [SPRTMP-t1935:25] RTMPProvider | rtmp_provider.cpp:216  | The RTMP client has disconnected: [#default#app/test], remote: <ClientSocket: 0x7f4ef5202010, #30, Disconnected, TCP, Nonblocking, 172.17.0.1:39846>
        [2024-03-01 17:54:22.382] I [SPRTMP-t1935:25] Provider | stream.cpp:65   | #default#app/test(171) has been stopped playing stream
        [2024-03-01 17:54:22.382] I [SPRTMP-t1935:25] MediaRouter | mediarouter_application.cpp:569  | [#default#app/test(171)] Trying to delete a stream
        [2024-03-01 17:54:22.382] I [SPRTMP-t1935:25] Monitor | application_metrics.cpp:70   | Delete StreamMetrics(test/0a053bdb-8984-405d-93be-95eab00bffee/default/#default#app/test/i) for monitoring
        [2024-03-01 17:54:22.382] I [SPRTMP-t1935:25] Monitor | stream_metrics.cpp:31   |
        [Stream Info]
        id(171), msid(0), output(test), SourceType(Rtmp), RepresentationType(Source), Created Time (Fri Mar  1 17:53:21 2024) UUID(0a053bdb-8984-405d-93be-95eab00bffee/default/#default#app/test/i)]

Video Track #0: Public Name(Video_0) Variant Name(Video) Bitrate(195.00Kb) Codec(1,H264,none:0) BSF(AVCC) Resolution(1280x720) Framerate(60.00) KeyInterval(30/frame) SkipFrames(0) BFrames(0) timebase(1/1000)
Audio Track #1: Public Name(Audio_1) Variant Name(Audio) Bitrate(125.00Kb) Codec(6,AAC,none) BSF(AAC_RAW) Samplerate(44.1K) Format(s16, 16) Channel(mono, 1) timebase(1/1000)
Data  Track #2: Public Name(Data_2) Variant Name(Data) Codec(0,Unknown,none) BSF(ID3v2) timebase(1/1000)

>> Statistics
Last update time : Fri Mar  1 17:54:22 2024, Last sent time : Fri Mar  1 17:53:22 2024
Bytes in : 3.65MB, Bytes out : 0B, Concurrent connections : 0, Max connections : 0 (Fri Mar  1 17:53:22 2024)

    >>>> By publisher
    - Unknown : Bytes out(0B) Concurrent Connections (0)
    - WebRTC : Bytes out(0B) Concurrent Connections (0)
    - MPEGTSPush : Bytes out(0B) Concurrent Connections (0)
    - RTMPPush : Bytes out(0B) Concurrent Connections (0)
    - SRTPush : Bytes out(0B) Concurrent Connections (0)
    - HLS : Bytes out(0B) Concurrent Connections (0)
    - DASH : Bytes out(0B) Concurrent Connections (0)
    - LLDASH : Bytes out(0B) Concurrent Connections (0)
    - LLHLS : Bytes out(0B) Concurrent Connections (0)
    - OVT : Bytes out(0B) Concurrent Connections (0)
    - File : Bytes out(0B) Concurrent Connections (0)
    - Thumbnail : Bytes out(0B) Concurrent Connections (0)

[2024-03-01 17:54:22.382] I [SPRTMP-t1935:25] Transcoder | transcoder_stream.cpp:98   | [#default#app/test(171)] Transcoder stream has been stopped
[2024-03-01 17:54:22.382] I [SPRTMP-t1935:25] Orchestrator | orchestrator.cpp:872  | #default#app/test stream of inbound is deleted
[2024-03-01 17:54:23.959] I [SPRTMP-t1935:26] Provider | stream.cpp:51   | Unknown/(172) has been started stream
[2024-03-01 17:54:23.959] I [SPRTMP-t1935:26] RTMPProvider | rtmp_provider.cpp:189  | A RTMP client has connected from <ClientSocket: 0x7f4ef5202010, #30, Connected, TCP, Nonblocking, 172.17.0.1:33794>
[2024-03-01 17:54:24.167] W [SPRTMP-t1935:26] RTMPProvider | rtmp_stream.cpp:729  | AmfMeta has incompatible codec information. - stream(#default#app/test) id(0/172) video(h264) audio(mp3)
[2024-03-01 17:54:29.898] I [SPRTMP-t1935:26] MediaRouter | mediarouter_application.cpp:340  | [#default#app/test(172)] Trying to create a stream
[2024-03-01 17:54:29.898] I [SPRTMP-t1935:26] Monitor | application_metrics.cpp:58   | Create StreamMetrics(test/0a053bdb-8984-405d-93be-95eab00bffee/default/#default#app/test/i) for monitoring
[2024-03-01 17:54:29.898] I [SPRTMP-t1935:26] MediaRouter | mediarouter_application.cpp:440  | [#default#app/test(172)] Stream has been created
[2024-03-01 17:54:29.898] I [SPRTMP-t1935:26] Transcoder | transcoder_stream.cpp:63   | [#default#app/test(172)] Transcoder stream has been started
[2024-03-01 17:54:29.898] E [SPRTMP-t1935:26] Provider | stream.cpp:160  | The packet type must be specified. #default#app/test(172)
[2024-03-01 17:54:29.898] W [InboundWorker:31] MediaRouter | mediarouter_stream.cpp:858  | [#default#app/test(172)] b-frame has been detected in the 0 track of inbound stream
[2024-03-01 17:54:29.912] W [InboundWorker:31] MediaRouter | mediarouter_stream.cpp:858  | [#default#app/test(172)] b-frame has been detected in the 0 track of inbound stream
[2024-03-01 17:54:29.912] E [SPRTMP-t1935:26] Provider | stream.cpp:160  | The packet type must be specified. #default#app/test(172)
[2024-03-01 17:54:29.945] W [InboundWorker:31] MediaRouter | mediarouter_stream.cpp:858  | [#default#app/test(172)] b-frame has been detected in the 0 track of inbound stream
[2024-03-01 17:54:29.987] E [SPRTMP-t1935:26] Provider | stream.cpp:160  | The packet type must be specified. #default#app/test(172)
[2024-03-01 17:54:29.987] W [InboundWorker:31] MediaRouter | mediarouter_stream.cpp:858  | [#default#app/test(172)] b-frame has been detected in the 0 track of inbound stream
[2024-03-01 17:54:29.987] E [SPRTMP-t1935:26] Provider | stream.cpp:160  | The packet type must be specified. #default#app/test(172)
[2024-03-01 17:54:29.988] W [InboundWorker:31] MediaRouter | mediarouter_stream.cpp:858  | [#default#app/test(172)] b-frame has been detected in the 0 track of inbound stream
[2024-03-01 17:54:30.037] E [SPRTMP-t1935:26] Provider | stream.cpp:160  | The packet type must be specified. #default#app/test(172)
[2024-03-01 17:54:30.037] W [InboundWorker:31] MediaRouter | mediarouter_stream.cpp:858  | [#default#app/test(172)] b-frame has been detected in the 0 track of inbound stream
[2024-03-01 17:54:30.037] E [SPRTMP-t1935:26] Provider | stream.cpp:160  | The packet type must be specified. #default#app/test(172)
[2024-03-01 17:54:30.038] W [InboundWorker:31] MediaRouter | mediarouter_stream.cpp:858  | [#default#app/test(172)] b-frame has been detected in the 0 track of inbound stream
[2024-03-01 17:54:30.038] W [InboundWorker:31] MediaRouter | mediarouter_stream.cpp:858  | [#default#app/test(172)] b-frame has been detected in the 0 track of inbound stream
[2024-03-01 17:54:30.087] E [SPRTMP-t1935:26] Provider | stream.cpp:160  | The packet type must be specified. #default#app/test(172)
[2024-03-01 17:54:30.087] W [InboundWorker:31] MediaRouter | mediarouter_stream.cpp:858  | [#default#app/test(172)] b-frame has been detected in the 0 track of inbound stream
[2024-03-01 17:54:30.087] E [SPRTMP-t1935:26] Provider | stream.cpp:160  | The packet type must be specified. #default#app/test(172)
[2024-03-01 17:54:30.087] W [InboundWorker:31] MediaRouter | mediarouter_stream.cpp:858  | [#default#app/test(172)] b-frame has been detected in the 0 track of inbound stream
[2024-03-01 17:54:30.137] E [SPRTMP-t1935:26] Provider | stream.cpp:160  | The packet type must be specified. #default#app/test(172)
[2024-03-01 17:54:30.138] E [SPRTMP-t1935:26] Provider | stream.cpp:160  | The packet type must be specified. #default#app/test(172)
[2024-03-01 17:54:30.187] E [SPRTMP-t1935:26] Provider | stream.cpp:160  | The packet type must be specified. #default#app/test(172)

This last line repeat until I stop pushing stream.

Server:

Player (please complete the following information):

bchah commented 4 months ago

The b-frames can cause issues but I'm not sure what the packet type error is. Your application has an option to disable bframes (maxbframes 0) https://derivative.ca/UserGuide/Video_Stream_Out_TOP can you give that a shot? And I see it also does SRT, it might work better over that protocol.

getroot commented 4 months ago

[2024-03-01 17:54:24.167] W [SPRTMP-t1935:26] RTMPProvider | rtmp_stream.cpp:729 | AmfMeta has incompatible codec information. - stream(#default#app/test) id(0/172) video(h264) audio(mp3)

I suspect that the above log is the cause of the problem. OME does not support mp3/RTMP.