树莓派3 srs4 ffmpeg 推流,一配置 hls参数 几个包 srs就崩溃了

zlwx9yxi  于 2022-12-31  发布在  其他
关注(0)|答案(5)|浏览(215)

注意:提问前,请先看FAQ(Please read FAQ before file an issue) #2716

描述(Description)
树莓派3 srs4 ffmpeg 推流,一配置 hls参数 几个包 srs就崩溃了

  1. SRS版本(Version): 4.0release
  2. SRS的日志如下(Log):
    srs端
[2021-12-10 20:03:03.314][Trace][31203][4z3841i0] new source, stream_url=/live/livestream
[2021-12-10 20:03:03.314][Trace][31203][4z3841i0] source url=/live/livestream, ip=127.0.0.1, cache=1, is_edge=0, source_id=/
[2021-12-10 20:03:03.414][Trace][31203][4z3841i0] hls: win=60000ms, frag=10000ms, prefix=, path=./objs/nginx/html, m3u8=[app]/[stream].m3u8, ts=[app]/[stream]-[seq].ts, aof=2.00, floor=0, clean=1, waitk=1, dispose=0ms, dts_directly=1
[2021-12-10 20:03:03.414][Trace][31203][4z3841i0] ignore disabled exec for vhost=__defaultVhost__
[2021-12-10 20:03:03.415][Trace][31203][4z3841i0] start publish mr=0/350, p1stpt=20000, pnt=5000, tcp_nodelay=0
[2021-12-10 20:03:03.466][Trace][31203][4z3841i0] got metadata, width=960, height=540, vcodec=7, acodec=10
[2021-12-10 20:03:03.466][Trace][31203][4z3841i0] 52B video sh,  codec(7, profile=High, level=3.1, 960x540, 0kbps, 0.0fps, 0.0s)
[2021-12-10 20:03:03.466][Trace][31203][4z3841i0] 7B audio sh, codec(10, profile=LC, 2channels, 0kbps, 44100HZ), flv(16bits, 2channels, 44100HZ)
[2021-12-10 20:03:05.065][Trace][31203][p709kfe3] Hybrid cpu=4.00%,12MB
[2021-12-10 20:03:10.064][Trace][31203][p709kfe3] Hybrid cpu=5.00%,13MB
[2021-12-10 20:03:11.991][Trace][31203][d0916406] HTTP #0 192.168.3.205:54169 GET http://192.168.3.232:8080/live/livestream.flv, content-length=-1
[2021-12-10 20:03:11.991][Warn][31203][d0916406][2] http miss file=./objs/nginx/html/live/livestream.flv, pattern=/, upath=/live/livestream.flv
[2021-12-10 20:03:12.003][Trace][31203][d0916406] TCP: before dispose resource(HttpStream)(0x2a445b0), conns=2, zombies=0, ign=0, inz=0, ind=0
[2021-12-10 20:03:12.003][Warn][31203][d0916406][104] client disconnect peer. ret=1007
[2021-12-10 20:03:12.003][Trace][31203][84192ha6] TCP: clear zombies=1 resources, conns=2, removing=0, unsubs=0
[2021-12-10 20:03:12.003][Trace][31203][d0916406] TCP: disposing #0 resource(HttpStream)(0x2a445b0), conns=2, disposing=1, zombies=0
Segmentation fault

推送端

frame=  179 fps= 25 q=-1.0 size=    1224kB time=00:00:07.04 bitrate=1424.1kbits/frame=  192 fps= 25 q=-1.0 size=    1291kB time=00:00:07.56 bitrate=1399.2kbits/frame=  204 fps= 25 q=-1.0 size=    1357kB time=00:00:08.05 bitrate=1379.5kbits/frame=  217 fps= 25 q=-1.0 size=    1411kB time=00:00:08.56 bitrate=1350.2kbits/frame=  229 fps= 25 q=-1.0 size=    1473kB time=00:00:09.07 bitrate=1329.2kbits/frame=  242 fps= 25 q=-1.0 size=    1544kB time=00:00:09.56 bitrate=1321.7kbits/av_interleaved_write_frame(): Broken pipe
[flv @ 0x18e1010] Failed to update header with correct duration.
[flv @ 0x18e1010] Failed to update header with correct filesize.
Error writing trailer of rtmp://127.0.0.1/live/livestream: Broken pipe
frame=  250 fps= 25 q=-1.0 Lsize=    1588kB time=00:00:09.88 bitrate=1316.8kbits/s speed=   1x    
video:1423kB audio:156kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.600417%
Conversion failed!
  1. SRS的配置如下(Config):
listen              1935;
max_connections     1000;
daemon              off;
srs_log_tank        console;
http_api {
    enabled         on;
    listen          1985;
}
http_server {
    enabled         on;
    listen          8080;
    dir             ./objs/nginx/html;
}
vhost __defaultVhost__ {
    hls {
        enabled         on;
        hls_fragment    10;
        hls_window      60;
        hls_path        ./objs/nginx/html;
        hls_m3u8_file   [app]/[stream].m3u8;
        hls_ts_file     [app]/[stream]-[seq].ts;
    }
}

其他

./configure
./configure   --srt=on --https=on --cherrypy=on

都试验过,现象一样
配置文件不加 hls 段,只支持rtmp 就正常

文件生成正常

pi@raspberrypi:~/src/srs/trunk $ ls -l ./objs/nginx/html/live
total 2164
-rw-r--r-- 1 pi pi 1746520 Dec 10 20:03 livestream-0.ts.tmp
-rw-r--r-- 1 pi pi   35344 Dec 10 19:57 livestream-32.ts
-rw-r--r-- 1 pi pi   33464 Dec 10 19:57 livestream-33.ts
-rw-r--r-- 1 pi pi   26696 Dec 10 19:57 livestream-34.ts
-rw-r--r-- 1 pi pi   33840 Dec 10 19:57 livestream-35.ts
-rw-r--r-- 1 pi pi   32336 Dec 10 19:57 livestream-36.ts
-rw-r--r-- 1 pi pi   34404 Dec 10 19:57 livestream-37.ts
-rw-r--r-- 1 pi pi   34216 Dec 10 19:57 livestream-38.ts
-rw-r--r-- 1 pi pi   36284 Dec 10 19:57 livestream-39.ts
-rw-r--r-- 1 pi pi   47940 Dec 10 19:57 livestream-40.ts
-rw-r--r-- 1 pi pi  123704 Dec 10 19:57 livestream-41.ts.tmp
-rw-r--r-- 1 pi pi     122 Dec 10 19:46 livestream.html
-rw-r--r-- 1 pi pi     434 Dec 10 19:57 livestream.m3u8
pi@raspberrypi:~/src/srs/trunk $
pb3skfrl

pb3skfrl1#

Coredump请上传附件和二进制,或者提供bt堆栈信息。

v440hwme

v440hwme4#

树莓派 4 也这样
郁闷啊
应该是 客户端 ffmpeg 推流参数 里 -vcodec copy -acodec copy ;造成的srs 奔溃

gpfsuwkq

gpfsuwkq5#

麻烦给下bt,我没有树莓派的环境,看不了bt。

请百度下怎么看core的bt。

相关问题