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

Using rtmp2trc on with aac errors cause rtmp flow to stop #4224

Open
attiliodrei opened this issue Nov 7, 2024 · 4 comments · May be fixed by #4227
Open

Using rtmp2trc on with aac errors cause rtmp flow to stop #4224

attiliodrei opened this issue Nov 7, 2024 · 4 comments · May be fixed by #4227
Labels
EnglishNative This issue is conveyed exclusively in English.

Comments

@attiliodrei
Copy link

Describe the bug
A clear and concise description of what the bug is.
#2759

Version
6.0.113

To Reproduce
sending rtmp with aac errors
like:
[aac @ 0x564254b9c040] invalid band type
[aac @ 0x559efe2df2c0] Number of bands (18) exceeds limit (13).
[aac @ 0x56264693e480] error in spectral data, ESC overflow

and
rtmp_to_rtc on;

cause flow to stop.
Screenshot 2024-10-27 alle 21 06 23

@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label Nov 7, 2024
@attiliodrei
Copy link
Author

[2024-11-07 22:19:35.804][ERROR][9][4ki2o679][4] serve error code=5011(RtcRtpMuxer)(Failed to mux RTP packet for RTC) : service cycle : rtmp: stream service : rtmp: receive thread : handle publish message : rtmp: consume message : rtmp: consume audio : bridge consume audio : recode error : decode and resample : submit to dec(-1094995529,Invalid data found when processing input)
thread [9][4ki2o679]: do_cycle() [./src/app/srs_app_rtmp_conn.cpp:263][errno=4]
thread [9][4ki2o679]: service_cycle() [./src/app/srs_app_rtmp_conn.cpp:457][errno=4]
thread [9][4ki2o679]: do_publishing() [./src/app/srs_app_rtmp_conn.cpp:1029][errno=11]
thread [9][4ki2o679]: consume() [./src/app/srs_app_recv_thread.cpp:380][errno=11]
thread [9][4ki2o679]: handle_publish_message() [./src/app/srs_app_rtmp_conn.cpp:1184][errno=11]
thread [9][4ki2o679]: process_publish_message() [./src/app/srs_app_rtmp_conn.cpp:1205][errno=11]
thread [9][4ki2o679]: on_audio_imp() [./src/app/srs_app_source.cpp:2314][errno=11]
thread [9][4ki2o679]: transcode() [./src/app/srs_app_rtc_source.cpp:999][errno=11]
thread [9][4ki2o679]: transcode() [./src/app/srs_app_rtc_codec.cpp:165][errno=11]
thread [9][4ki2o679]: decode_and_resample() [./src/app/srs_app_rtc_codec.cpp:340][errno=11](Interrupted system call)

@suzp1984
Copy link
Contributor

suzp1984 commented Nov 8, 2024

Could you record your rtmp stream to a file? then I can reproduce it.

  1. close rtmp_to_rtc conf. (rtc.rtmp_to_rtc = off, then the srs wouldn't crash.).
  2. record your rtmp stream by this cmd. (e.g. your stream is /live/livestream).
    ffmpeg -re -i rtmp://localhost/live/livestream -c copy -f flv output_video.flv.

@attiliodrei
Copy link
Author

aac.flv.zip

with rtc.rtmp_to_rtc = off , i confirm ossrs don't crash

@suzp1984
Copy link
Contributor

suzp1984 commented Nov 11, 2024

#4227 can fix this issue. you can verify by yourself.

Cause

It's the Audio source's invalid data problem.
I play the above audio source, aac.flv.zip, with latest ffmpeg, version 7.1. The same error print in the console.
ffplay aac.flv
[aac @ 0x12ae95960] error in spectral data, ESC overflow

So if the ffplay can play the audio source, it's reasonable to let SRS audio transcode the ignore similar error without kickoff the stream.

Solution

#4227 , ignore AVERROR_INVALIDDATA, the invalid data error returned from avcodec api.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EnglishNative This issue is conveyed exclusively in English.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants