srs 使用 rtmp2trc 每次都会断流再继续推,使用 rtmp 不会出现

wqnecbli  于 2022-12-31  发布在  其他
关注(0)|答案(2)|浏览(499)

描述(Description)
使用 rtmp2trc 每次都会断流再继续推

  1. SRS版本(Version): 4.0
  2. SRS的日志如下(Log):
[2021-11-29 19:36:48.474][Trace][19008][25r2zb35] HTTP #57 192.168.50.221:49622 GET http://192.168.50.201:1985/api/v1/clients/?callback=angular.callbacks._1v, content-length=-1
[2021-11-29 19:36:48.775][Error][19008][4394x826][11] decode_band_types: Input buffer exhausted before END element found(Resource temporarily unavailable)
[2021-11-29 19:36:48.775][Trace][19008][4394x826] cleanup when unpublish
[2021-11-29 19:36:48.775][Trace][19008][4394x826] cleanup when unpublish, created=1, deliver=1
[2021-11-29 19:36:48.776][Warn][19008][4394x826][4] 1 frames left in the queue on closing
[2021-11-29 19:36:48.776][Trace][19008][4394x826] TCP: before dispose resource(RtmpConn)(0x564f442f8130), conns=2, zombies=0, ign=0, inz=0, ind=0
[2021-11-29 19:36:48.776][Error][19008][4394x826][4] serve error code=5011 : service cycle : rtmp: stream service : rtmp: receive thread : handle publish message : rtmp: consume message : rtmp: consume audio : bridger consume audio : recode error : decode and resample : submit to dec(-1094995529,Invalid data found when processing input)
thread [19008][4394x826]: do_cycle() [src/app/srs_app_rtmp_conn.cpp:217][errno=4]
thread [19008][4394x826]: service_cycle() [src/app/srs_app_rtmp_conn.cpp:414][errno=4]
thread [19008][4394x826]: do_publishing() [src/app/srs_app_rtmp_conn.cpp:911][errno=11]
thread [19008][4394x826]: consume() [src/app/srs_app_recv_thread.cpp:380][errno=11]
thread [19008][4394x826]: handle_publish_message() [src/app/srs_app_rtmp_conn.cpp:1038][errno=11]
thread [19008][4394x826]: process_publish_message() [src/app/srs_app_rtmp_conn.cpp:1059][errno=11]
thread [19008][4394x826]: on_audio_imp() [src/app/srs_app_source.cpp:2222][errno=11]
thread [19008][4394x826]: transcode() [src/app/srs_app_rtc_source.cpp:870][errno=11]
thread [19008][4394x826]: transcode() [src/app/srs_app_rtc_codec.cpp:161][errno=11]
thread [19008][4394x826]: decode_and_resample() [src/app/srs_app_rtc_codec.cpp:330][errno=11](Interrupted system call)
[2021-11-29 19:36:48.776][Trace][19008][1f3897a9] TCP: clear zombies=1 resources, conns=2, removing=0, unsubs=0
[2021-11-29 19:36:48.776][Trace][19008][4394x826] TCP: disposing #0 resource(RtmpConn)(0x564f442f8130), conns=2, disposing=1, zombies=0
[2021-11-29 19:36:48.813][Trace][19008][93r3200u] RTMP client ip=192.168.50.232:45724, fd=10
[2021-11-29 19:36:48.816][Trace][19008][93r3200u] simple handshake success.
[2021-11-29 19:36:48.816][Trace][19008][93r3200u] connect app, tcUrl=rtmp://192.168.50.201:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=192.168.50.201, port=1935, app=live, args=null
[2021-11-29 19:36:48.816][Trace][19008][93r3200u] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2021-11-29 19:36:48.853][Trace][19008][93r3200u] client identified, type=fmle-publish, vhost=192.168.50.201, app=live, stream=12345, param=, duration=0ms
[2021-11-29 19:36:48.853][Trace][19008][93r3200u] connected stream, tcUrl=rtmp://192.168.50.201:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=__defaultVhost__, port=1935, app=live, stream=12345, param=, args=null
[2021-11-29 19:36:48.853][Trace][19008][93r3200u] source url=/live/12345, ip=192.168.50.232, cache=1, is_edge=0, source_id=/4394x826
[2021-11-29 19:36:48.893][Trace][19008][93r3200u] RTC bridge from RTMP, rtmp2rtc=1, keep_bframe=0, merge_nalus=0
[2021-11-29 19:36:48.893][Trace][19008][93r3200u] ignore disabled exec for vhost=__defaultVhost__
[2021-11-29 19:36:48.893][Trace][19008][93r3200u] start publish mr=0/350, p1stpt=20000, pnt=5000, tcp_nodelay=0
[2021-11-29 19:36:48.932][Trace][19008][93r3200u] 4B audio sh, codec(10, profile=LC, 2channels, 0kbps, 22050HZ), flv(16bits, 2channels, 22050HZ)
[2021-11-29 19:36:49.800][Trace][19008][93r3200u] 34B video sh,  codec(7, profile=Baseline, level=3.1, 480x640, 0kbps, 0.0fps, 0.0s)
[2021-11-29 19:36:49.802][Warn][19008][93r3200u][11] VIDEO: stream not monotonically increase, please open mix_correct.
[2021-11-29 19:36:51.383][Trace][19008][414k6k8x] Hybrid cpu=1.00%,19MB, cid=5,1, timer=62,0,0, clock=0,49,1,0,0,0,0,0,0, free=1, objs=(pkt:79,raw:75,fua:2,msg:176,oth:1,buf:50)
[2021-11-29 19:36:51.524][Trace][19008][25r2zb35] HTTP #58 192.168.50.221:49622 GET http://192.168.50.201:1985/api/v1/clients/?callback=angular.callbacks._1w, content-length=-1
[2021-11-29 19:36:53.337][Error][19008][93r3200u][11] decode_band_types: Input buffer exhausted before END element found(Resource temporarily unavailable)
[2021-11-29 19:36:53.337][Trace][19008][93r3200u] cleanup when unpublish
[2021-11-29 19:36:53.337][Trace][19008][93r3200u] cleanup when unpublish, created=1, deliver=1
[2021-11-29 19:36:53.338][Warn][19008][93r3200u][4] 1 frames left in the queue on closing
[2021-11-29 19:36:53.338][Trace][19008][93r3200u] TCP: before dispose resource(RtmpConn)(0x564f442f8130), conns=2, zombies=0, ign=0, inz=0, ind=0
[2021-11-29 19:36:53.338][Error][19008][93r3200u][4] serve error code=5011 : service cycle : rtmp: stream service : rtmp: receive thread : handle publish message : rtmp: consume message : rtmp: consume audio : bridger consume audio : recode error : decode and resample : submit to dec(-1094995529,Invalid data found when processing input)
thread [19008][93r3200u]: do_cycle() [src/app/srs_app_rtmp_conn.cpp:217][errno=4]
thread [19008][93r3200u]: service_cycle() [src/app/srs_app_rtmp_conn.cpp:414][errno=4]
thread [19008][93r3200u]: do_publishing() [src/app/srs_app_rtmp_conn.cpp:911][errno=11]
thread [19008][93r3200u]: consume() [src/app/srs_app_recv_thread.cpp:380][errno=11]
thread [19008][93r3200u]: handle_publish_message() [src/app/srs_app_rtmp_conn.cpp:1038][errno=11]
thread [19008][93r3200u]: process_publish_message() [src/app/srs_app_rtmp_conn.cpp:1059][errno=11]
thread [19008][93r3200u]: on_audio_imp() [src/app/srs_app_source.cpp:2222][errno=11]
thread [19008][93r3200u]: transcode() [src/app/srs_app_rtc_source.cpp:870][errno=11]
thread [19008][93r3200u]: transcode() [src/app/srs_app_rtc_codec.cpp:161][errno=11]
thread [19008][93r3200u]: decode_and_resample() [src/app/srs_app_rtc_codec.cpp:330][errno=11](Interrupted system call)
[2021-11-29 19:36:53.338][Trace][19008][1f3897a9] TCP: clear zombies=1 resources, conns=2, removing=0, unsubs=0
[2021-11-29 19:36:53.338][Trace][19008][93r3200u] TCP: disposing #0 resource(RtmpConn)(0x564f442f8130), conns=2, disposing=1, zombies=0
[2021-11-29 19:36:53.374][Trace][19008][366p96m7] RTMP client ip=192.168.50.232:45726, fd=10
[2021-11-29 19:36:53.377][Trace][19008][366p96m7] simple handshake success.
[2021-11-29 19:36:53.377][Trace][19008][366p96m7] connect app, tcUrl=rtmp://192.168.50.201:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=192.168.50.201, port=1935, app=live, args=null
[2021-11-29 19:36:53.377][Trace][19008][366p96m7] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2021-11-29 19:36:53.413][Trace][19008][366p96m7] client identified, type=fmle-publish, vhost=192.168.50.201, app=live, stream=12345, param=, duration=0ms
[2021-11-29 19:36:53.413][Trace][19008][366p96m7] connected stream, tcUrl=rtmp://192.168.50.201:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=__defaultVhost__, port=1935, app=live, stream=12345, param=, args=null
[2021-11-29 19:36:53.413][Trace][19008][366p96m7] source url=/live/12345, ip=192.168.50.232, cache=1, is_edge=0, source_id=/93r3200u
[2021-11-29 19:36:53.455][Trace][19008][366p96m7] RTC bridge from RTMP, rtmp2rtc=1, keep_bframe=0, merge_nalus=0
[2021-11-29 19:36:53.455][Trace][19008][366p96m7] ignore disabled exec for vhost=__defaultVhost__
[2021-11-29 19:36:53.455][Trace][19008][366p96m7] start publish mr=0/350, p1stpt=20000, pnt=5000, tcp_nodelay=0
[2021-11-29 19:36:53.492][Trace][19008][366p96m7] 4B audio sh, codec(10, profile=LC, 2channels, 0kbps, 22050HZ), flv(16bits, 2channels, 22050HZ)
[2021-11-29 19:36:53.781][Trace][19008][366p96m7] 34B video sh,  codec(7, profile=Baseline, level=3.1, 480x640, 0kbps, 0.0fps, 0.0s)
[2021-11-29 19:36:53.782][Warn][19008][366p96m7][11] VIDEO: stream not monotonically increase, please open mix_correct.
^C[2021-11-29 19:36:54.325][Trace][19008][ou01257p] sig=2, user terminate program, fast quit
[2021-11-29 19:36:54.413][Trace][19008][ou01257p] cleanup for quit signal fast=1, grace=0
[2021-11-29 19:36:54.413][Warn][19008][ou01257p][11] main cycle terminated, system quit normally.
[2021-11-29 19:36:54.512][Trace][19008][ou01257p] srs disposed
[2021-11-29 19:36:54.512][Trace][19008][ou01257p] srs terminated
  1. SRS的配置如下(Config):
listen              1935;
max_connections     1000;
daemon              off;
srs_log_tank        console;

http_server {
    enabled         on;
    listen          8081;
    dir             ./objs/nginx/html;
}

http_api {
    enabled         on;
    listen          1985;
}
stats {
    network         0;
}
rtc_server {
    enabled on;
    listen 8000;
    # @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#config-candidate
    candidate $CANDIDATE;
}

vhost __defaultVhost__ {
    rtc {
        enabled     on;
        # @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#rtmp-to-rtc
        rtmp_to_rtc on;
        # @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#rtc-to-rtmp
        rtc_to_rtmp off;
    }
    http_remux {
        enabled     on;
        mount       [vhost]/[app]/[stream].flv;
    }
    
#    play {
#        mix_correct             on;
#    }
}

重现(Replay)

重现Bug的步骤(How to replay bug?)

  1. 每次都会出现

期望行为(Expect)
期望找出原因 ,并且正常运行

nwsw7zdq

nwsw7zdq1#

信息不全,怎么推的流,用的什么视频源,命令行是什么,能否用ffmpeg重现?

麻烦补充下信息。

iyfjxgzm

iyfjxgzm2#

这个问题是我推流的代码有问题 ,导致的。麻烦你了, 谢谢

相关问题