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

RTMP: Pushing stream failed, indicating decode SPS. #2281

Closed
dft2000 opened this issue Apr 12, 2021 · 5 comments · Fixed by #2544
Closed

RTMP: Pushing stream failed, indicating decode SPS. #2281

dft2000 opened this issue Apr 12, 2021 · 5 comments · Fixed by #2544
Assignees
Labels
Bug It might be a bug. TransByAI Translated by AI/GPT.
Milestone

Comments

@dft2000
Copy link

dft2000 commented Apr 12, 2021

Streaming failed. Every time I try to stream, it reports a parsing SRS error and exits directly. I also tried turning off parse-srs, but it still gives the same error. Thank you.

Please describe the issue you are facing.

  1. SRS version: 3.0.156
  2. The log of SRS is as follows:

Please provide the log details here.

[2021-04-12 12:45:17.531][Trace][18217][5607481n] RTMP client ip=172.20.164.29:51110, fd=11
[2021-04-12 12:45:17.560][Trace][18217][5607481n] complex handshake success
[2021-04-12 12:45:17.560][Trace][18217][5607481n] connect app, tcUrl=rtmp://172.20.100.65:19350/live, pageUrl=, swfUrl=, schema=rtmp, vhost=172.20.100.65, port=19350, app=live, args=null
[2021-04-12 12:45:17.560][Trace][18217][5607481n] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2021-04-12 12:45:17.658][Trace][18217][5607481n] client identified, type=fmle-publish, vhost=172.20.100.65, app=live, stream=st2, param=, duration=0ms
[2021-04-12 12:45:17.658][Trace][18217][5607481n] connected stream, tcUrl=rtmp://172.20.100.65:19350/live, pageUrl=, swfUrl=, schema=rtmp, vhost=__defaultVhost__, port=19350, app=live, stream=st2, param=, args=null
[2021-04-12 12:45:17.658][Trace][18217][5607481n] source url=/live/st2, ip=172.20.164.29, cache=1, is_edge=0, source_id=/02e75k75
[2021-04-12 12:45:17.750][Trace][18217][5607481n] ignore the disabled transcode:
[2021-04-12 12:45:17.751][Trace][18217][5607481n] hls: win=60000ms, frag=5000ms, prefix=, path=/data/rtmp, m3u8=[app]/[stream].m3u8, ts=[app]/[stream]-[seq].ts, aof=2.00, floor=0, clean=1, waitk=1, dispose=0ms, dts_directly=1
[2021-04-12 12:45:17.751][Trace][18217][5607481n] ignore disabled exec for vhost=__defaultVhost__
[2021-04-12 12:45:17.751][Trace][18217][5607481n] start publish mr=0/350, p1stpt=20000, pnt=5000, tcp_nodelay=0
[2021-04-12 12:45:17.812][Trace][18217][5607481n] got metadata, width=960, height=540, vcodec=7, acodec=10
[2021-04-12 12:45:17.812][Trace][18217][5607481n] Drop ts segment, sequence_no=0, uri=st2-0.ts, duration=0ms
[2021-04-12 12:45:17.812][Trace][18217][5607481n] cleanup when unpublish
[2021-04-12 12:45:17.812][Trace][18217][5607481n] TCP: before dispose resource(RtmpConn)(0x151c5c0), conns=1, zombies=0, ign=0, inz=0, ind=0
[2021-04-12 12:45:17.812][Error][18217][5607481n][4] serve error code=3001 : service cycle : rtmp: stream service : rtmp: receive thread : handle publish message : rtmp: consume message : rtmp: consume video : meta update video : demux SPS/PPS : decode SPS
thread [18217][5607481n]: do_cycle() [src/app/srs_app_rtmp_conn.cpp:233][errno=4]
thread [18217][5607481n]: service_cycle() [src/app/srs_app_rtmp_conn.cpp:430][errno=4]
thread [18217][5607481n]: do_publishing() [src/app/srs_app_rtmp_conn.cpp:924][errno=11]
thread [18217][5607481n]: consume() [src/app/srs_app_recv_thread.cpp:403][errno=11]
thread [18217][5607481n]: handle_publish_message() [src/app/srs_app_rtmp_conn.cpp:1027][errno=11]
thread [18217][5607481n]: process_publish_message() [src/app/srs_app_rtmp_conn.cpp:1055][errno=11]
thread [18217][5607481n]: on_video_imp() [src/app/srs_app_source.cpp:2369][errno=11]
thread [18217][5607481n]: video_avc_demux() [src/kernel/srs_kernel_codec.cpp:767][errno=11]
thread [18217][5607481n]: avc_demux_sps_pps() [src/kernel/srs_kernel_codec.cpp:827][errno=11](Interrupted system call)
  1. The configuration of SRS is as follows:

Please provide the configuration details here.

vhost __defaultVhost__ {
        chunk_size      4096;
        publish {
            parse_sps   off;
        }
        hls {
                enabled         on;
                hls_path        /data/rtmp;
                hls_fragment    5;
                hls_window     60;
                hls_storage    disk;
                #hls_m3u8_file  [app]/[stream]/index.m3u8;
                #hls_ts_file    [app]/[stream]/[stream]-[seq].ts;
                #hls_mount      /[app]/[stream]/index.m3u8;
                hls_cleanup     on;
        }
        http_remux {
                enabled     on;
                mount       [vhost]/[app]/[stream].flv;
        }
        dvr {
                enabled             off;
                dvr_path            /data/rtmp/[app]/[app].[stream].[timestamp].flv;
                dvr_plan            session;
                #dvr_duration        30;
                #dvr_wait_keyframe   on;
        }
        http_hooks {
        enabled         on;
        on_dvr          http://127.0.0.1:8085/api/v1/dvrs;

Replay

Please maintain the markdown structure.

How to replay bug?

Please maintain the markdown structure.

1. Push ffmpeg stream to srs3. As follows

Please maintain the markdown structure.
\bin\ffmpeg.exe -v 40 -i test.flv -copyts -c:v copy -c:a copy -f flv rtmp://172.20.100.65:19350/live/st2

test.mp4

Expected behavior (Expect)

Please maintain the markdown structure.

Describe your expectation

Please maintain the markdown structure.

TRANS_BY_GPT3

@winlinvip winlinvip added the Bug It might be a bug. label Apr 19, 2021
@winlinvip
Copy link
Member

winlinvip commented Apr 19, 2021

In the bug, it is mentioned that the file is test.flv, but the uploaded file is in mp4 format. Can you confirm if we can use this mp4 file to reproduce the issue?

If we can reproduce the issue, it might be due to a specific problem with the stream. Please confirm if it can be reproduced, as it will help in resolving the issue faster.

TRANS_BY_GPT3

@winlinvip winlinvip changed the title 推流失败,提示decode SPS RTMP: 推流失败,提示decode SPS Apr 19, 2021
@dft2000
Copy link
Author

dft2000 commented Apr 21, 2021

The file in the bug is test.flv, but the uploaded file is in mp4 format. Can we confirm if this mp4 can be used to reproduce the issue?

If it can be reproduced, it may be due to a special issue with the stream. Please confirm if it can be reproduced, as it will help resolve the problem faster.

It can be reproduced. This MP4 file is just a re-encapsulation of the test.flv. I have tested and obtained the same results.

TRANS_BY_GPT3

@duiniuluantanqin
Copy link
Member

duiniuluantanqin commented May 8, 2021

In the provided file, there are 2 SPS (Sequence Parameter Set) in avcC. The function part of SRS that parses SPS needs to be made compatible.

TRANS_BY_GPT3

@duiniuluantanqin
Copy link
Member

duiniuluantanqin commented May 10, 2021

Reference a0c09d8, you can try merging and testing it yourself.

However, there is a hidden danger:
Although your file has 2 sps/pps, the content is the same, so you can choose either one. If you encounter 2 different sps, I am not sure how to choose. If you have any related documents, please send them over for reference.

TRANS_BY_GPT3

@duiniuluantanqin
Copy link
Member

duiniuluantanqin commented Sep 3, 2021

#2544
已处理' translates to 'Already processed.

TRANS_BY_GPT3

@winlinvip winlinvip changed the title RTMP: 推流失败,提示decode SPS RTMP: Pushing stream failed, indicating decode SPS. Jul 28, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug It might be a bug. TransByAI Translated by AI/GPT.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants