Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

H265: Stream SRT push with hardware encoding chip, SRT pull stream is normal, but RTMP pull stream can only recognize audio. #3560

Closed
pfzer opened this issue May 30, 2023 · 2 comments
Assignees
Labels
Discussion Discussion or questions. TransByAI Translated by AI/GPT. Won't fix We won't fix it.

Comments

@pfzer
Copy link

pfzer commented May 30, 2023

Note: Please read FAQ before file an issue, see #2716

Description

haisi-h265-4kp30-5m.zip
The H265 stream recorded from the encoding chip (HiSilicon or Socionext) is encoded into a TS file. Using the ffmpeg copy method, it is pushed as SRT and the SRT stream is received normally. However, when receiving the RTMP stream using VLC and PotPlayer, only the audio is recognized.

To resolve this, transcode the file using ffmpeg to H265 and then push it using ffmpeg. After this, both the SRT and RTMP streams can be received normally.

  1. SRS Version: v6.0.45

  2. SRS Log:

[BEGIN] 2023/5/30 14:20:34
[2023-05-30 14:21:13.462][INFO][2442][18953338] authors: Winlin<[email protected]> ZhaoWenjie<[email protected]> ShiWei<[email protected]> XiaoZhihong<[email protected]> WuPengqiang<[email protected]> XiaLixin<[email protected]> LiPeng<[email protected]> ChenGuanghua<[email protected]> ChenHaibo<[email protected]> and https://github.com/ossrs/srs/blob/develop/trunk/AUTHORS.md#contributors
[2023-05-30 14:21:13.462][INFO][2442][18953338] cwd=/home/yqp/avCloud/srs/srs6-yxzh/trunk, work_dir=./, build: 2023-05-17 23:43:55, configure: --srt=on --gb28181=on --apm=on --h265=on --utest=on --jobs=4, uname: Linux yx 5.4.0-148-generic #165~18.04.1-Ubuntu SMP Thu Apr 20 01:14:06 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux, osx: 0, env: 0, pkg: 
[2023-05-30 14:21:13.462][INFO][2442][18953338] configure detail: --prefix=/usr/local/srs --config=conf/srs.conf --osx=off --hls=on --hds=off --dvr=on --ssl=on --https=on --ssl-1-0=off --ssl-local=off --sys-ssl=off --transcode=on --ingest=on --stat=on --http-callback=on --http-server=on --stream-converter=on --http-api=on --utest=on --cherrypy=off --srt=on --rtc=on --h265=on --gb28181=on --simulator=off --cxx11=on --cxx14=off --backtrace=on --ffmpeg-fit=on --ffmpeg-opus=off --nasm=on --srtp-nasm=on --clean=on --gperf=off --gmc=off --gmd=off --gmp=off --gcp=off --gprof=off --static=off --shared-st=off --shared-srt=off --shared-ffmpeg=off --log-verbose=off --log-info=off --log-trace=on --log-level_v2=on --gcov=off --apm=on --debug=off --debug-stats=off --cross-build=off --sanitizer=on --sanitizer-static=off --sanitizer-log=off --cygwin64=off --single-thread=off --generic-linux=off --cc=gcc --cxx=g++ --ar=ar --ld=ld --randlib=randlib
[2023-05-30 14:21:13.462][INFO][2442][18953338] srs checking config...
[2023-05-30 14:21:13.462][INFO][2442][18953338] ips, iface[0] enp3s0 ipv4 0x11043 10.0.3.85, iface[1] enp3s0 ipv6 0x11043 fe80::8e0:81d5:46fb:d4c6%enp3s0
[2023-05-30 14:21:13.462][INFO][2442][18953338] devices, intranet enp3s0 10.0.3.85, intranet enp3s0 fe80::8e0:81d5:46fb:d4c6%enp3s0
[2023-05-30 14:21:13.462][WARN][2442][18953338][22] stats network use index=0, ip=10.0.3.85, ifname=enp3s0
[2023-05-30 14:21:13.462][WARN][2442][18953338][22] stats disk list: sda sdb xvda xvdb 
[2023-05-30 14:21:13.462][INFO][2442][18953338] you can check log by: tail -n 30 -f ./objs/srs.log
[2023-05-30 14:21:13.462][INFO][2442][18953338] please check SRS by: ./etc/init.d/srs status
[2023-05-30 14:21:13.463][INFO][2442][18953338] features, rch:on, dash:on, hls:on, hds:off, srt:on, hc:on, ha:on, hs:on, hp:on, dvr:on, trans:on, inge:on, stat:on, sc:on
[2023-05-30 14:21:13.463][INFO][2442][18953338] SRS on amd64 x86_64, conf:ljconf/srs.conf, limit:1000, writev:1024, encoding:little-endian, HZ:100
[2023-05-30 14:21:13.463][INFO][2442][18953338] mw sleep:350ms. mr enabled:on, default:0, sleep:350ms
[2023-05-30 14:21:13.463][INFO][2442][18953338] gc:on, pq:30000ms, cscc:[0,16), csa:on, tn:on(may hurts performance), ss:auto(guess by merged write)
[2023-05-30 14:21:13.463][INFO][2442][18953338] system default latency(ms): mw(0-350) + mr(0-350) + play-queue(0-30000)
[2023-05-30 14:21:13.463][WARN][2442][18953338][22] SRS/6.0.45 is not stable
[2023-05-30 14:21:13.463][INFO][2442][18953338] start daemon mode...
[2023-05-30 14:21:13.464][INFO][2443][18953338] father process exit
[2023-05-30 14:21:13.464][INFO][2444][18953338] son(daemon) process running.
[2023-05-30 14:21:13.465][INFO][2444][18953338] write pid=2444 to ./objs/srt.pid success!
[2023-05-30 14:21:13.465][INFO][2444][18953338] Thread #1(primordial): init name=srs-master-1, interval=5000ms
[2023-05-30 14:21:13.465][INFO][2444][18953338] Pool: Start threads primordial=1, hybrids=1 ok
[2023-05-30 14:21:13.465][INFO][2444][lkski216] Thread #2: run with tid=2446, entry=0x60c0000004c0, label=hybrid, name=srs-hybrid-2
[2023-05-30 14:21:13.471][INFO][2444][lkski216] TencentCloud CLS is disabled
[2023-05-30 14:21:13.471][INFO][2444][lkski216] TencentCloud APM is disabled
[2023-05-30 14:21:13.473][INFO][2442][18953338] grandpa process exit.
[2023-05-30 14:21:13.476][INFO][2444][lkski216] fingerprint=09:CE:6E:1E:A3:1D:E2:22:E9:55:18:41:F6:06:70:22:E3:20:36:FC:79:23:B9:AA:6A:FE:E6:9F:6B:62:0B:C9
[2023-05-30 14:21:13.477][INFO][2444][lkski216] CircuitBreaker: enabled=1, high=2x90, critical=1x95, dying=5x99
[2023-05-30 14:21:13.477][INFO][2444][lkski216] http flv live stream, vhost=__defaultVhost__, mount=[vhost]/[app]/[stream].flv
[2023-05-30 14:21:13.477][INFO][2444][lkski216] http: root mount to ./objs/nginx/html
[2023-05-30 14:21:13.477][INFO][2444][lkski216] server main cid=lkski216, pid=2444, ppid=2443, asprocess=0
[2023-05-30 14:21:13.478][INFO][2444][lkski216] RTMP listen at tcp://0.0.0.0:1935, fd=10
[2023-05-30 14:21:13.478][INFO][2444][lkski216] HTTP-API listen at tcp://0.0.0.0:1985, fd=11
[2023-05-30 14:21:13.478][INFO][2444][lkski216] HTTP-Server listen at tcp://0.0.0.0:8080, fd=12
[2023-05-30 14:21:13.478][INFO][2444][lkski216] signal installed, reload=1, reopen=10, fast_quit=15, grace_quit=3
[2023-05-30 14:21:13.479][INFO][2444][lkski216] http: api mount /console to ./objs/nginx/html/console
[2023-05-30 14:21:13.480][INFO][2444][lkski216] srt listen at udp://0.0.0.0:10080, fd=703606248
[2023-05-30 14:21:13.481][INFO][2444][884417s6] Hybrid cpu=0.00%,38MB
[2023-05-30 14:21:13.481][WARN][2444][60k60990][22] use private address as ip: 10.0.3.85, ifname=enp3s0
[2023-05-30 14:21:13.481][INFO][2444][60k60990] Startup query id=vid-s5mgq3z, session=vid-8582r1l, eip=10.0.3.85, wait=300s
[2023-05-30 14:21:13.481][INFO][2444][29688o49] TCP: connection manager run, conns=0
[2023-05-30 14:21:13.481][INFO][2444][gv6h494s] GB: connection manager run, conns=0
[2023-05-30 14:21:13.482][ERROR][2444][4l4863l6][11][SRT] /home/yqp/avCloud/srs/srs6-yxzh/trunk/objs/Platform-SRS6-Linux-5.4.0-GCC7.5.0-x86_64/srt-1-fit/srtcore/api.cpp:1116(accept) # : srt_accept: no pending connection available at the moment(Resource temporarily unavailable)
[2023-05-30 14:21:13.482][INFO][2444][8f256196] SRT: connection manager run, conns=0
[2023-05-30 14:21:13.482][INFO][2444][f45r26co] RTC: connection manager run, conns=0
[2023-05-30 14:21:18.466][INFO][2444][884417s6] Hybrid cpu=0.00%,38MB
[2023-05-30 14:21:18.470][INFO][2444][18953338] Process: cpu=1.00%,38MB, threads=2
[2023-05-30 14:21:20.124][WARN][2444][][11][SRT] /home/yqp/avCloud/srs/srs6-yxzh/trunk/objs/Platform-SRS6-Linux-5.4.0-GCC7.5.0-x86_64/srt-1-fit/srtcore/core.cpp:2156(processSrtMsg_HSREQ) # : HSREQ/rcv: Agent did not set rcv-TSBPD - ignoring proposed latency from peer
[2023-05-30 14:21:20.133][ERROR][2444][4l4863l6][22][SRT] /home/yqp/avCloud/srs/srs6-yxzh/trunk/objs/Platform-SRS6-Linux-5.4.0-GCC7.5.0-x86_64/srt-1-fit/srtcore/api.cpp:1116(accept) # : srt_accept: no pending connection available at the moment(Invalid argument)
[2023-05-30 14:21:20.133][INFO][2444][m1q8qn09] SRT client ip=10.0.1.28:61122, fd=703606247
[2023-05-30 14:21:20.134][INFO][2444][m1q8qn09] @srt, streamid=#!::h=live/tvsky,m=publish, stream_url=/live/tvsky, vhost=__defaultVhost__, app=live, stream=tvsky, param=
[2023-05-30 14:21:20.134][INFO][2444][m1q8qn09] new srt source, stream_url=/live/tvsky
[2023-05-30 14:21:20.134][INFO][2444][m1q8qn09] new live source, stream_url=/live/tvsky
[2023-05-30 14:21:20.135][INFO][2444][m1q8qn09] 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
[2023-05-30 14:21:20.135][INFO][2444][m1q8qn09] ignore disabled exec for vhost=__defaultVhost__
[2023-05-30 14:21:20.136][INFO][2444][m1q8qn09] http: mount flv stream for sid=/live/tvsky, mount=/live/tvsky.flv
[2023-05-30 14:21:20.497][INFO][2444][m1q8qn09] 4B audio sh, codec(10, profile=LC, 2channels, 0kbps, 48000HZ), flv(16bits, 2channels, 44100HZ)
[2023-05-30 14:21:21.166][INFO][2444][m1q8qn09] 305B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:21.166][INFO][2444][m1q8qn09] HLS: Switch video codec 10(H264) to 12(HEVC)
[2023-05-30 14:21:21.166][INFO][2444][m1q8qn09] TS: Refresh PMT when vcodec=7=>12, acodec=10=>10
[2023-05-30 14:21:21.599][INFO][2444][m1q8qn09] 300B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:22.156][INFO][2444][m1q8qn09] 300B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:22.726][INFO][2444][m1q8qn09] 300B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:23.231][INFO][2444][m1q8qn09] 300B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:23.467][INFO][2444][884417s6] Hybrid cpu=12.99%,53MB
[2023-05-30 14:21:23.475][INFO][2444][18953338] Process: cpu=15.00%,60MB, threads=2
[2023-05-30 14:21:23.742][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:24.292][INFO][2444][m1q8qn09] 305B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:24.800][INFO][2444][m1q8qn09] 305B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:25.352][INFO][2444][m1q8qn09] 305B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:25.870][INFO][2444][m1q8qn09] 300B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:26.428][INFO][2444][m1q8qn09] 300B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:26.946][INFO][2444][m1q8qn09] 300B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:27.466][INFO][2444][m1q8qn09] 300B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:27.656][WARN][2444][][11][SRT] /home/yqp/avCloud/srs/srs6-yxzh/trunk/objs/Platform-SRS6-Linux-5.4.0-GCC7.5.0-x86_64/srt-1-fit/srtcore/core.cpp:2156(processSrtMsg_HSREQ) # : HSREQ/rcv: Agent did not set rcv-TSBPD - ignoring proposed latency from peer
[2023-05-30 14:21:27.661][ERROR][2444][4l4863l6][22][SRT] /home/yqp/avCloud/srs/srs6-yxzh/trunk/objs/Platform-SRS6-Linux-5.4.0-GCC7.5.0-x86_64/srt-1-fit/srtcore/api.cpp:1116(accept) # : srt_accept: no pending connection available at the moment(Invalid argument)
[2023-05-30 14:21:27.661][INFO][2444][95j63933] SRT client ip=10.0.1.28:61123, fd=703606246
[2023-05-30 14:21:27.661][INFO][2444][95j63933] @srt, streamid=#!::h=live/tvsky,m=request, stream_url=/live/tvsky, vhost=__defaultVhost__, app=live, stream=tvsky, param=
[2023-05-30 14:21:27.661][INFO][2444][95j63933] create ts consumer, no gop cache
[2023-05-30 14:21:28.032][INFO][2444][m1q8qn09] 300B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:28.467][INFO][2444][884417s6] Hybrid cpu=14.99%,89MB, cid=3,1, timer=62,0,0, clock=1,45,2,1,1,1,1,0,0, objs=(pkt:0,raw:0,fua:0,msg:321,oth:0,buf:0)
[2023-05-30 14:21:28.480][INFO][2444][18953338] Process: cpu=13.99%,94MB, threads=2
[2023-05-30 14:21:28.537][INFO][2444][m1q8qn09] 300B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:29.073][INFO][2444][m1q8qn09] 300B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:29.592][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:30.154][INFO][2444][m1q8qn09] 300B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:30.179][INFO][2444][m1q8qn09] <- SRT_CPB Transport Stats # pktRecv=4028, pktRcvLoss=259, pktRcvRetrans=259, pktRcvDrop=0
[2023-05-30 14:21:30.179][INFO][2444][m1q8qn09] <- SRT_CPB time=10045, packets=4013, okbps=0,0,0, ikbps=0,0,0
[2023-05-30 14:21:30.183][INFO][2444][m1q8qn09] -> HLS time=10045491ms, sno=1, ts=tvsky-0.ts, dur=10002ms, dva=0p
[2023-05-30 14:21:30.683][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:31.199][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:31.739][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:32.270][INFO][2444][m1q8qn09] 300B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:32.815][INFO][2444][m1q8qn09] 300B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:33.364][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:33.468][INFO][2444][884417s6] Hybrid cpu=14.99%,124MB, cid=3,1, timer=62,0,0, clock=1,45,2,1,1,1,1,0,0, objs=(pkt:0,raw:0,fua:0,msg:321,oth:0,buf:0)
[2023-05-30 14:21:33.485][INFO][2444][18953338] Process: cpu=17.95%,131MB, threads=2
[2023-05-30 14:21:33.895][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:34.429][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:34.973][INFO][2444][m1q8qn09] 300B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:35.470][INFO][2444][m1q8qn09] 300B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:36.032][INFO][2444][m1q8qn09] 300B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:36.536][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:37.076][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:37.589][INFO][2444][801881p8] RTMP client ip=10.0.1.28:12345, fd=15, trace=, span=
[2023-05-30 14:21:37.623][INFO][2444][m1q8qn09] 300B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:37.628][INFO][2444][801881p8] complex handshake success
[2023-05-30 14:21:37.628][INFO][2444][801881p8] connect app, tcUrl=rtmp://10.0.3.85:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=10.0.3.85, port=1935, app=live, args=null
[2023-05-30 14:21:37.629][INFO][2444][801881p8] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2023-05-30 14:21:37.674][INFO][2444][801881p8] ignore AMF0/AMF3 command message.
[2023-05-30 14:21:37.674][INFO][2444][801881p8] ignore AMF0/AMF3 command message.
[2023-05-30 14:21:37.674][INFO][2444][801881p8] client identified, type=rtmp-play, vhost=10.0.3.85, app=live, stream=tvsky, param=, duration=-1ms
[2023-05-30 14:21:37.674][INFO][2444][801881p8] connected stream, tcUrl=rtmp://10.0.3.85:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=__defaultVhost__, port=1935, app=live, stream=tvsky, param=, args=null
[2023-05-30 14:21:37.674][INFO][2444][801881p8] source url=/live/tvsky, ip=10.0.1.28, cache=0/2500, is_edge=0, source_id=m1q8qn09/m1q8qn09
[2023-05-30 14:21:37.675][INFO][2444][801881p8] set fd=15 TCP_NODELAY 0=>1
[2023-05-30 14:21:37.675][INFO][2444][801881p8] dispatch cached gop success. count=0, duration=19
[2023-05-30 14:21:37.675][INFO][2444][801881p8] create consumer, active=1, queue_size=0.00, jitter=10000000
[2023-05-30 14:21:37.675][INFO][2444][801881p8] set fd=15, SO_SNDBUF=87040=>50000, buffer=100ms
[2023-05-30 14:21:37.675][INFO][2444][801881p8] start play smi=0ms, mw_sleep=100, mw_msgs=0, realtime=1, tcp_nodelay=1
[2023-05-30 14:21:37.698][INFO][2444][95j63933] -> SRT_PLA Transport Stats # pktSent=4305, pktSndLoss=0, pktRetrans=0, pktSndDrop=0
[2023-05-30 14:21:37.698][INFO][2444][95j63933] -> SRT_PLA time=10036, packets=4306, okbps=0,0,0, ikbps=0,0,0
[2023-05-30 14:21:38.216][INFO][2444][m1q8qn09] 300B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:38.469][INFO][2444][884417s6] Hybrid cpu=16.00%,159MB, cid=3,1, timer=62,0,0, clock=1,45,2,1,1,1,1,0,0, objs=(pkt:0,raw:0,fua:0,msg:321,oth:0,buf:0)
[2023-05-30 14:21:38.490][INFO][2444][18953338] Process: cpu=16.98%,166MB, threads=2
[2023-05-30 14:21:38.770][INFO][2444][m1q8qn09] 305B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:39.274][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:39.734][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:40.198][INFO][2444][m1q8qn09] -> HLS time=20057738ms, sno=2, ts=tvsky-1.ts, dur=9534ms, dva=0p
[2023-05-30 14:21:40.198][INFO][2444][m1q8qn09] <- SRT_CPB Transport Stats # pktRecv=4206, pktRcvLoss=134, pktRcvRetrans=142, pktRcvDrop=0
[2023-05-30 14:21:40.198][INFO][2444][m1q8qn09] <- SRT_CPB time=20057, packets=4205, okbps=0,0,0, ikbps=0,0,0
[2023-05-30 14:21:40.283][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:40.812][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:41.341][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:41.899][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:42.402][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:42.939][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:43.469][INFO][2444][884417s6] Hybrid cpu=14.99%,197MB, cid=4,1, timer=61,0,0, clock=0,41,4,1,1,1,1,0,0, objs=(pkt:0,raw:0,fua:0,msg:1053,oth:0,buf:0)
[2023-05-30 14:21:43.496][INFO][2444][18953338] Process: cpu=12.99%,202MB, threads=2
[2023-05-30 14:21:43.512][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:44.028][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:44.547][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:45.074][INFO][2444][m1q8qn09] 305B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:45.623][INFO][2444][m1q8qn09] 305B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:46.135][INFO][2444][m1q8qn09] 304B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:46.665][INFO][2444][m1q8qn09] 304B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:47.201][INFO][2444][m1q8qn09] 305B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:47.746][INFO][2444][m1q8qn09] 305B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:47.748][INFO][2444][95j63933] -> SRT_PLA Transport Stats # pktSent=4227, pktSndLoss=0, pktRetrans=0, pktSndDrop=0
[2023-05-30 14:21:47.748][INFO][2444][95j63933] -> SRT_PLA time=20070, packets=4227, okbps=0,0,0, ikbps=0,0,0
[2023-05-30 14:21:47.900][INFO][2444][801881p8] -> PLA time=10102984, msgs=8, okbps=0,0,0, ikbps=0,0,0, mw=100/0
[2023-05-30 14:21:48.053][INFO][2444][801881p8] TCP: before dispose resource(RtmpConn)(0x612000081040), conns=1, zombies=0, ign=0, inz=0, ind=0
[2023-05-30 14:21:48.053][WARN][2444][801881p8][104] client disconnect peer. ret=1007
[2023-05-30 14:21:48.053][INFO][2444][29688o49] TCP: clear zombies=1 resources, conns=1, removing=0, unsubs=0
[2023-05-30 14:21:48.053][INFO][2444][801881p8] TCP: disposing #0 resource(RtmpConn)(0x612000081040), conns=1, disposing=1, zombies=0
[2023-05-30 14:21:48.277][INFO][2444][m1q8qn09] 305B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:48.470][INFO][2444][884417s6] Hybrid cpu=16.98%,231MB, cid=4,1, timer=61,0,0, clock=0,41,4,1,1,1,1,0,0, objs=(pkt:0,raw:0,fua:0,msg:1053,oth:0,buf:0)
[2023-05-30 14:21:48.501][INFO][2444][18953338] Process: cpu=15.00%,238MB, threads=2
[2023-05-30 14:21:48.819][INFO][2444][m1q8qn09] 305B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:49.342][INFO][2444][m1q8qn09] 305B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:49.879][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:50.214][INFO][2444][m1q8qn09] -> HLS time=30067896ms, sno=3, ts=tvsky-2.ts, dur=9400ms, dva=0p
[2023-05-30 14:21:50.214][INFO][2444][m1q8qn09] <- SRT_CPB Transport Stats # pktRecv=4328, pktRcvLoss=219, pktRcvRetrans=219, pktRcvDrop=0
[2023-05-30 14:21:50.214][INFO][2444][m1q8qn09] <- SRT_CPB time=30067, packets=4333, okbps=0,0,0, ikbps=0,0,0
[2023-05-30 14:21:50.419][INFO][2444][m1q8qn09] 305B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:50.784][INFO][2444][95j63933] SRT: before dispose resource(srt-ts-conn)(0x60d0000077b0), conns=2, zombies=0, ign=0, inz=0, ind=0
[2023-05-30 14:21:50.786][ERROR][2444][95j63933][104] srt serve error code=6001(SrtIo)(SRT read or write failed) : srt play recv thread : srt read : wait readable : has error : error occured, socket status=SRTS_BROKEN
thread [2444][95j63933]: do_playing() [./src/app/srs_app_srt_conn.cpp:519][errno=104]
thread [2444][95j63933]: do_cycle() [./src/app/srs_app_srt_conn.cpp:131][errno=104]
thread [2444][95j63933]: recvmsg() [./src/protocol/srs_protocol_srt.cpp:801][errno=104]
thread [2444][95j63933]: wait_readable() [./src/protocol/srs_protocol_srt.cpp:872][errno=104]
thread [2444][95j63933]: check_error() [./src/protocol/srs_protocol_srt.cpp:997][errno=104](Connection reset by peer)
[2023-05-30 14:21:50.786][INFO][2444][8f256196] SRT: clear zombies=1 resources, conns=2, removing=0, unsubs=0
[2023-05-30 14:21:50.786][INFO][2444][95j63933] SRT: disposing #0 resource(srt-ts-conn)(0x60d0000077b0), conns=2, disposing=1, zombies=0
[2023-05-30 14:21:50.786][INFO][2444][95j63933] close srt_fd=703606246
[2023-05-30 14:21:50.943][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:51.479][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:51.991][INFO][2444][m1q8qn09] 305B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:52.554][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:53.067][INFO][2444][m1q8qn09] 305B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:53.470][INFO][2444][884417s6] Hybrid cpu=12.00%,265MB, cid=6,1, timer=61,0,0, clock=0,40,4,1,1,1,1,0,0, free=1, objs=(pkt:0,raw:0,fua:0,msg:931,oth:0,buf:0)
[2023-05-30 14:21:53.506][INFO][2444][18953338] Process: cpu=13.99%,273MB, threads=2
[2023-05-30 14:21:53.592][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:54.136][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:54.696][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:55.236][INFO][2444][m1q8qn09] 299B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:55.621][INFO][2444][m1q8qn09] 305B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:56.081][INFO][2444][m1q8qn09] 300B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
[2023-05-30 14:21:56.631][INFO][2444][m1q8qn09] 300B video sh, codec(12, profile=Main10, level=4, 3840x2160, 0kbps, 48830.0fps, 0.0s)
  1. SRS Config:
# SRT config.

listen              1935;
max_connections     1000;
daemon              on;
srs_log_tank        file;
srs_log_file        ./objs/srs.log;
srs_log_level       info;
pid                 ./objs/srt.pid;

http_api {
    enabled         on;
    listen          1985;
    raw_api {
        enabled on;
        allow_reload on;
        allow_query  on;
        allow_update on;
    }
}

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

srt_server {
    enabled on;
    listen 10080;
#    maxbw 1000000000;
    connect_timeout 4000;
    peerlatency 0;
    recvlatency 0;
    latency 0;
    tsbpdmode off;
    tlpktdrop off;
#    sendbuf 2000000;
#    recvbuf 2000000;
}

# @doc https://github.com/ossrs/srs/issues/1147#issuecomment-577607026
vhost __defaultVhost__ {
    tcp_nodelay on;
    min_latency on;
    play {
        gop_cache off;
        queue_length 10;
        mw_latency 100;
    }
    publish {
        mr off;
    }

    hls {
        enabled on;
        hls_path ./objs/nginx/html;
        hls_fragment 10;
        hls_window 60;
    }
    rtc {
        enabled on;
        rtmp_to_rtc on;
	    rtc_to_rtmp on;
        #bframe discard;
        #aac discard;
    }

    srt {
        enabled     on;
        srt_to_rtmp on;
    }

    http_remux {
        enabled     on;
        mount       [vhost]/[app]/[stream].flv;
    }
}

# For SRT to use vhost.
vhost srs.srt.com.cn {
}

stats {
    network         0;
    disk            sda sdb xvda xvdb;
}

haisi-h265-4kp30-5m.zip

The attached file contains a test TS stream file. Reproduction of the issue can be done by pushing the SRT stream using ffmpeg.

ffmpeg -re -stream_loop -1 -i haisi-h265-4kp30-5m.ts  -vcodec copy  -acodec copy -pes_payload_size 0 -f mpegts "srt://IP:10080?streamid=#!::h=live/livestream,m=publish"

Expect

The H265 stream generated by the encoding chip can be pushed using SRT and can be pulled using both SRT and RTMP without any issues.

haisi-h265-4kp30-5m.zip

TRANS_BY_GPT3

@winlinvip winlinvip changed the title 硬编码芯片的H265流SRT推流,拉流SRT正常,拉流RTMP只能识别到音频 H265: Stream SRT push with hardware encoding chip, SRT pull stream is normal, but RTMP pull stream can only recognize audio. Jun 10, 2023
@winlinvip winlinvip self-assigned this Jun 10, 2023
@winlinvip
Copy link
Member

You cannot utilize VLC or standard H5 players to play HEVC live streams in HTTP-FLV format. Instead, you should employ mpegts.js or a modified ffplay. Please refer to the instructions provided in #465 for proper usage.

@winlinvip winlinvip closed this as not planned Won't fix, can't repro, duplicate, stale Jun 10, 2023
@winlinvip winlinvip added Discussion Discussion or questions. Won't fix We won't fix it. labels Jun 10, 2023
@pfzer
Copy link
Author

pfzer commented Jun 12, 2023

Thank you! We have verified again using the modified ffplay, and the phenomenon remains the same: when using the stream in the attachment (H265 TS stream recorded and encoded by the chip), there is video stuttering when pushing with SRT and pulling with RTMP. However, pushing with RTMP and pulling with RTMP for playback is normal.

ffplay-srt推-rtmp拉

TRANS_BY_GPT3

@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Discussion or questions. TransByAI Translated by AI/GPT. Won't fix We won't fix it.
Projects
None yet
Development

No branches or pull requests

2 participants