AirenSoft / OvenMediaEngine

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

Could not find track. track_id(0) #1379

Closed hatsch closed 1 year ago

hatsch commented 1 year ago

Describe the bug SRT Push cannot find tracks for variants.
In Version 0.15.15 SRT Push works as expected with variants from outgoing stream specified. In 0.15.16 and dev version SRT Push complains about no tracks found.

Last commit that works is https://github.com/AirenSoft/OvenMediaEngine/commit/4ea4e1c78acb48efd9dec8dfe1b3f2e697d64650 So the problem starts with this commit https://github.com/AirenSoft/OvenMediaEngine/commit/1054b6547c8a301e7444e3da885771c95bcee7b0

To Reproduce Steps to reproduce the behavior:

  1. Use 0.15.16
  2. Stream to app/test
  3. send startPush to app http://localhost/v1/vhosts/localhost/apps/app:startPush -d @push.json where push.json is
    {
    "id": "1",
    "stream": {
    "name": "test", 
    "variantNames": ["h264_1080", "aac"]
    },
    "protocol": "srt", 
    "url": "srt://srtrelay:1337?latency=120000&timeout=500000&streamid=publish/test/XXXXXXX",
    }

Expected behavior Stream should be pushed with SRT to srtrelay:1337

Logs

ovenmediaengine-origin-1       | id(3169781080), msid(0), output(test), SourceType(Transcoder), RepresentationType(Source), Created Time (Thu Sep 14 09:26:01 2023) UUID(bff97f16-436b-4cf0-b8e3-40eec43c26f3/192.168.23.129/#192.168.23.129#app/test/o)
ovenmediaengine-origin-1       |        >> Origin Stream Info
ovenmediaengine-origin-1       |        id(101), output(test), SourceType(Rtmp), Created Time (Thu Sep 14 09:26:00 2023)
ovenmediaengine-origin-1       | 
ovenmediaengine-origin-1       |        Video Track #0: Public Name(Video_0) Variant Name(bypass_video) Bitrate(4.39Mb) Codec(1,H264,Passthrough) BSF(AVCC) Resolution(1920x1080) Framerate(25.80fps) KeyInterval(50) BFrames(0) timebase(1/1000)
ovenmediaengine-origin-1       |        Video Track #1: Public Name(Video_0) Variant Name(h264_1080) Bitrate(5.00Mb) Codec(1,H264,OpenH264) BSF(H264_ANNEXB) Resolution(1920x1080) Framerate(30.00fps) KeyInterval(30) BFrames(0) timebase(1/90000)
ovenmediaengine-origin-1       |        Video Track #2: Public Name(Video_0) Variant Name(h264_720) Bitrate(2.00Mb) Codec(1,H264,OpenH264) BSF(H264_ANNEXB) Resolution(1280x720) Framerate(30.00fps) KeyInterval(30) BFrames(0) timebase(1/90000)
ovenmediaengine-origin-1       |        Video Track #3: Public Name(Video_0) Variant Name(h264_480) Bitrate(1.00Mb) Codec(1,H264,OpenH264) BSF(H264_ANNEXB) Resolution(852x480) Framerate(25.00fps) KeyInterval(30) BFrames(0) timebase(1/90000)
ovenmediaengine-origin-1       |        Video Track #4: Public Name(Video_0) Variant Name(h264_360) Bitrate(600.00Kb) Codec(1,H264,OpenH264) BSF(H264_ANNEXB) Resolution(640x360) Framerate(25.00fps) KeyInterval(30) BFrames(0) timebase(1/90000)
ovenmediaengine-origin-1       |        Video Track #5: Public Name(Video_0) Variant Name(image_0) Bitrate(1.30Mb) Codec(9,JPEG,Default) BSF(JPEG) Resolution(1280x720) Framerate(1.00fps) KeyInterval(1) BFrames(0) timebase(1/90000)
ovenmediaengine-origin-1       |        Video Track #6: Public Name(Video_0) Variant Name(image_1) Bitrate(25.15Mb) Codec(10,PNG,Default) BSF(PNG) Resolution(1280x720) Framerate(1.00fps) KeyInterval(1) BFrames(0) timebase(1/90000)
ovenmediaengine-origin-1       |        Audio Track #7: Public Name(Audio_1) Variant Name(bypass_audio) Bitrate(71.22Kb) Codec(6,AAC,Passthrough) BSF(AAC_RAW) Samplerate(48.0K) Format(fltp, 32) Channel(stereo, 2) timebase(1/1000)
ovenmediaengine-origin-1       |        Audio Track #8: Public Name(Audio_1) Variant Name(opus) Bitrate(128.00Kb) Codec(8,OPUS,libopus) BSF(OPUS) Samplerate(48.0K) Format(s16, 16) Channel(stereo, 2) timebase(1/48000)
ovenmediaengine-origin-1       |        Audio Track #9: Public Name(Audio_1) Variant Name(aac) Bitrate(128.00Kb) Codec(6,AAC,Passthrough) BSF(AAC_RAW) Samplerate(48.0K) Format(fltp, 32) Channel(stereo, 2) timebase(1/1000)
ovenmediaengine-origin-1       |        Data  Track #10: Public Name(Data_2) Variant Name(Data) Codec(0,Unknown,Passthrough) BSF(ID3v2) timebase(1/1000)
ovenmediaengine-origin-1       | [2023-09-14 09:26:04.138] I [OutboundWorker:63] WebRTC Publisher | rtc_stream.cpp:163  | RtcStream(#192.168.23.129#app/test) - Ignore unsupported codec(JPEG)
ovenmediaengine-origin-1       | [2023-09-14 09:26:04.138] I [OutboundWorker:63] WebRTC Publisher | rtc_stream.cpp:163  | RtcStream(#192.168.23.129#app/test) - Ignore unsupported codec(PNG)
ovenmediaengine-origin-1       | [2023-09-14 09:26:04.138] I [OutboundWorker:63] WebRTC Publisher | rtc_stream.cpp:163  | RtcStream(#192.168.23.129#app/test) - Ignore unsupported codec(AAC)
ovenmediaengine-origin-1       | [2023-09-14 09:26:04.138] I [OutboundWorker:63] WebRTC Publisher | rtc_stream.cpp:163  | RtcStream(#192.168.23.129#app/test) - Ignore unsupported codec(AAC)
ovenmediaengine-origin-1       | [2023-09-14 09:26:04.138] I [OutboundWorker:63] WebRTC Publisher | rtc_stream.cpp:200  | WebRTC Stream has been created : test/3169781080
ovenmediaengine-origin-1       | Rtx(false) Ulpfec(false) JitterBuffer(true) PlayoutDelay(false min:0 max: 0)
ovenmediaengine-origin-1       | [2023-09-14 09:26:04.138] I [OutboundWorker:63] Publisher | stream.cpp:212  | WebRTC Publisher Application application has started [test(3169781080)] stream (MSID : 0)
ovenmediaengine-origin-1       | [2023-09-14 09:26:04.140] I [OutboundWorker:63] LLHLS Publisher | llhls_stream.cpp:92   | LLHlsStream(#192.168.23.129#app/test) - Ignore unsupported codec(JPEG)
ovenmediaengine-origin-1       | [2023-09-14 09:26:04.140] I [OutboundWorker:63] LLHLS Publisher | llhls_stream.cpp:92   | LLHlsStream(#192.168.23.129#app/test) - Ignore unsupported codec(PNG)
ovenmediaengine-origin-1       | [2023-09-14 09:26:04.140] I [OutboundWorker:63] LLHLS Publisher | llhls_stream.cpp:92   | LLHlsStream(#192.168.23.129#app/test) - Ignore unsupported codec(OPUS)
ovenmediaengine-origin-1       | [2023-09-14 09:26:04.140] I [OutboundWorker:63] LLHLS Publisher | llhls_stream.cpp:187  | LLHlsStream has been created : test/3169781080
ovenmediaengine-origin-1       | OriginMode(true) Chunk Duration(0.20) Segment Duration(6) Segment Count(10)
ovenmediaengine-origin-1       | [2023-09-14 09:26:04.140] I [OutboundWorker:63] Publisher | stream.cpp:212  | LLHLS Publisher Application application has started [test(3169781080)] stream (MSID : 0)
ovenmediaengine-origin-1       | [2023-09-14 09:26:04.141] I [OutboundWorker:63] Publisher | stream.cpp:212  | OVTPublisher Application application has started [test(3169781080)] stream (MSID : 0)
ovenmediaengine-origin-1       | [2023-09-14 09:26:04.141] I [OutboundWorker:63] Publisher | stream.cpp:212  | FilePublisher Application application has started [test(3169781080)] stream (MSID : 0)
ovenmediaengine-origin-1       | [2023-09-14 09:26:04.142] I [OutboundWorker:63] Publisher | stream.cpp:212  | SRTPushPublisher Application application has started [test(3169781080)] stream (MSID : 0)
ovenmediaengine-origin-1       | [2023-09-14 09:26:04.142] I [OutboundWorker:63] Publisher | stream.cpp:212  | ThumbnailPublisher Application application has started [test(3169781080)] stream (MSID : 0)

ovenmediaengine-origin-1       | [2023-09-14 09:14:20.836] I [PushSessionCtrl:135] Publisher | application.cpp:488  | Push started. uid(d1c6c01f-10e1-459b-9f21-89c5e368456f) vhost(192.168.23.129) app(app) stream(test) -> protocol(srt) url(srt://srtrelay:1337?latency=120000&timeout=500000&streamid=publish/test/XXXXX) streamKey()
srtrelay                       | 2023/09/14 09:14:20 172.17.32.6:58064 - publish test
ovenmediaengine-origin-1       | [2023-09-14 09:14:20.849] W [StreamWorker:253] FFmpegWriter | ffmpeg_writer.cpp:189  | Cloud not find track. track_id(0)
ovenmediaengine-origin-1       | [2023-09-14 09:14:20.849] E [StreamWorker:253] MPEGTSPush | mpegtspush_session.cpp:146  | Failed to send packet

Server (please complete the following information):

getroot commented 1 year ago

Thank you for the great report. This is probably a regression bug. We will fix it soon!

Keukhan commented 1 year ago

Fixed a big problem. Thank you for your kind report! :)

https://github.com/AirenSoft/OvenMediaEngine/commit/df29f4a946cfcb4b5c91306bd64af0958a73e22e

hatsch commented 1 year ago

Thank you for the really fast fix! I can confirm that SRT Push is now working again!