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

Does SRS support push HEVC/H.265 over WebRTC(whip) using OBS ? #4263

Open
Zhanghailin1995 opened this issue Dec 23, 2024 · 5 comments
Open
Labels
EnglishNative This issue is conveyed exclusively in English.

Comments

@Zhanghailin1995
Copy link

Describe the bug
Does SRS support push HEVC/H.265 over WebRTC using OBS ? I don't know whether SRS or OBS does not support push HEVC/H.265 over WebRTC ?

Version
SRS 6.0.155

@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label Dec 23, 2024
@suzp1984
Copy link
Contributor

I think it's a bug, HEVC/H.264 over WebRTC is supported by SRS, but when it is the WHIP publish, the code will force RTC downgrade to H.264 during SDP negotiation.

} else if (remote_media_desc.is_video()) {
std::vector<SrsMediaPayloadType> payloads = remote_media_desc.find_media_with_encoding_name("H264");
if (payloads.empty()) {
return srs_error_new(ERROR_RTC_SDP_EXCHANGE, "no found valid H.264 payload type");

There's a recent related issue #4259 , which is publish by GB28181 with HEVC, but play offer said SRS only support H.264.
Maybe adjust the SDP negotiation can fix this issue, I'll try later.

@Zhanghailin1995
Copy link
Author

I think it's a bug, HEVC/H.264 over WebRTC is supported by SRS, but when it is the WHIP publish, the code will force RTC downgrade to H.264 during SDP negotiation.

} else if (remote_media_desc.is_video()) {
std::vector<SrsMediaPayloadType> payloads = remote_media_desc.find_media_with_encoding_name("H264");
if (payloads.empty()) {
return srs_error_new(ERROR_RTC_SDP_EXCHANGE, "no found valid H.264 payload type");

There's a recent related issue #4259 , which is publish by GB28181 with HEVC, but play offer said SRS only support H.264. Maybe adjust the SDP negotiation can fix this issue, I'll try later.

I made a mistake, I didn't add codec=hevc in the whip url parameters. After I did this, It worked

@suzp1984
Copy link
Contributor

oh, I just knows that.
repeat the solution: use the whip url with codec: http://localhost:1985/rtc/v1/whip/?app=live&stream=livestream&codec=hevc

@Zhanghailin1995
Copy link
Author

oh, I just knows that. repeat the solution: use the whip url with codec: http://localhost:1985/rtc/v1/whip/?app=live&stream=livestream&codec=hevc

push stream was successful, but it still cannot be played normally in Chrome, even though I have turned on hardware-accelerated video decode flag. can you try it?

@Zhanghailin1995
Copy link
Author

I I found a way to play the hevc stream over WebRTC in chrome. Add two param to start chrome "--enable-features=WebRtcAllowH265Receive --force-fieldtrials=WebRTC-Video-H26xPacketBuffer/Enabled".

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

No branches or pull requests

3 participants