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

WebRTC: Add error tips when coverting HEVC to RTC. #3425

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

chundonglinlin
Copy link
Member

When you push hevc stream by opening rtmp_to_rtc on, we'll return error tips for WebRTC not support HEVC.

Publish RTMP HEVC

[2023-02-15 17:33:40.292][ERROR][26356][5e93kr4y][4] serve error code=5036(RtcCodec)(RTC not support codec type) : service cycle : rtmp: stream service : rtmp: receive thread : handle publish message : rtmp: consume message : rtmp: consume video : bridge consume video : WebRTC not support HEVC
thread [26356][5e93kr4y]: do_cycle() [./src/app/srs_app_rtmp_conn.cpp:262][errno=4]
thread [26356][5e93kr4y]: service_cycle() [./src/app/srs_app_rtmp_conn.cpp:456][errno=4]
thread [26356][5e93kr4y]: do_publishing() [./src/app/srs_app_rtmp_conn.cpp:1024][errno=22]
thread [26356][5e93kr4y]: consume() [./src/app/srs_app_recv_thread.cpp:380][errno=22]
thread [26356][5e93kr4y]: handle_publish_message() [./src/app/srs_app_rtmp_conn.cpp:1161][errno=22]
thread [26356][5e93kr4y]: process_publish_message() [./src/app/srs_app_rtmp_conn.cpp:1189][errno=22]
thread [26356][5e93kr4y]: on_video_imp() [./src/app/srs_app_source.cpp:2468][errno=22]
thread [26356][5e93kr4y]: on_video() [./src/app/srs_app_rtc_source.cpp:996][errno=22](Interrupted system call)

Publish SRT HEVC

[2023-02-15 17:38:44.437][WARN][26356][749051kk][4] parse ts packet err=code=4019(CasterTsPse)(Invalid ts PSE payload for stream caster) : ts: ts packet decode : ts: demux payload : ts: PES fresh packet length=0, us=0, cc=5
thread [26356][749051kk]: decode() [./src/kernel/srs_kernel_ts.cpp:265][errno=4]
thread [26356][749051kk]: decode() [./src/kernel/srs_kernel_ts.cpp:630][errno=4]
thread [26356][749051kk]: decode() [./src/kernel/srs_kernel_ts.cpp:1956][errno=4]

Publish GB HEVC

@winlinvip
Copy link
Member

Please hold on this PR, because it depends on #3392

@johan149
Copy link

Wow, so fucking awesome HEVC over Webrtc, crazy guys!

@winlinvip
Copy link
Member

winlinvip commented Feb 18, 2023

Wow, so fucking awesome HEVC over Webrtc, crazy guys!

This PR is just adding some error logs to notice user that HEVC over WebRTC is not supported. 😃

However, we found that Safari supports HEVC over WebRTC, so we will try to do that in another PR.

If one day, Chrome supports HEVC over WebRTC, the HEVC should be very easy to use for both live streaming and WebRTC.

@@ -997,6 +990,11 @@ srs_error_t SrsRtcFromRtmpBridge::on_video(SrsSharedPtrMessage* msg)
return err;
}

// WebRTC NOT support HEVC, RTMP NOT support VP8/VP9.
if (format->vcodec->id != SrsVideoCodecIdAVC && format->vcodec->id != SrsVideoCodecIdAV1) {
return srs_error_new(ERROR_RTC_CODEC_ERROR, "WebRTC not support %s", srs_video_codec_id2str(format->vcodec->id).c_str());
Copy link
Member

@duiniuluantanqin duiniuluantanqin Feb 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If an error is returned here, it will cause the log to output continuously.

TRANS_BY_GPT3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TransByAI Translated by AI/GPT.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HEVC: Error empty SPS/PPS when coverting RTMP to HEVC.
4 participants