ossrs / srs

SRS is a simple, high-efficiency, real-time video server supporting RTMP, WebRTC, HLS, HTTP-FLV, SRT, MPEG-DASH, and GB28181.
https://ossrs.io
MIT License
24.86k stars 5.29k forks source link

Bugfix: HEVC SRT stream supports multiple PPS fields. v6.0.76 #3722

Closed xengine-qyt closed 10 months ago

xengine-qyt commented 11 months ago

Please describe the summary for this PR.

when the srs have multiple pps in hevc.the srs can't parse for this. problem fixed this #3604


Co-authored-by: chundonglinlin chundonglinlin@163.com Co-authored-by: john hondaxiao@tencent.com

chundonglinlin commented 11 months ago

I'm glad to know that the code modifications I provided worked perfectly for supporting multiple PPS fields. But the gb28181 and utest codes failed the testing because the interface is reused.

xengine-qyt commented 11 months ago

OK ,modified.

xiaozhihong commented 11 months ago

Is it possible for you to generate a new pull request to add support for multiple PPS in H.264? Thank you.

xengine-qyt commented 11 months ago

yes,of course,just for the h264 of ts?

xiaozhihong commented 11 months ago

yes,of course,just for the h264 of ts?

Include ts, rtmp and webrtc.

The code below should be refactor. https://github.com/ossrs/srs/blob/73dd8af4c99b528b2d9f9bb59339084efa30c0c3/trunk/src/kernel/srs_kernel_codec.cpp#L2213-L2224

xengine-qyt commented 11 months ago

why refactor?

xiaozhihong commented 11 months ago

why refactor?

Because PR needs to ensure integrity and fully address the issues of multiple PPS, if there are multiple PPS here, the code will be overwritten.

TRANS_BY_GPT3

chundonglinlin commented 11 months ago

Two experts, there are also multiple issues with h264's PPS, and there were comments explaining the support for 264 at that time. Should we just confirm and improve this PR or open a new PR to make changes? @xengine-qyt @xiaozhihong

TRANS_BY_GPT3

xengine-qyt commented 11 months ago

why refactor?

Because PR needs to ensure integrity and fully address the issues of multiple PPS, if there are multiple PPS here, the code will be overwritten.

TRANS_BY_GPT3

sorry, I haven't read the code here, so I don't know much about it

chundonglinlin commented 11 months ago

why refactor?

Because PR needs to ensure integrity and fully address the issues of multiple PPS, if there are multiple PPS here, the code will be overwritten. TRANS_BY_GPT3

sorry, I haven't read the code here, so I don't know much about it

Can the h264 pps be modified? The h264 pps is stored using vector<char>, and when numOfPictureParameterSets > 0, it will be overwritten multiple times and only the last pps is recorded. @xengine-qyt ' Please ensure to maintain the markdown structure.

TRANS_BY_GPT4

xengine-qyt commented 11 months ago

why refactor?

Because PR needs to ensure integrity and fully address the issues of multiple PPS, if there are multiple PPS here, the code will be overwritten. TRANS_BY_GPT3

sorry, I haven't read the code here, so I don't know much about it

Can the h264 pps be modified? The h264 pps is stored using vector<char>, and when numOfPictureParameterSets > 0, it will be overwritten multiple times and only the last pps is recorded. @xengine-qyt ' Please ensure to maintain the markdown structure.

TRANS_BY_GPT4

sorry,i have no mulit pps device for h264,I am afraid that the modify is not correct, I recommend you to modify it.

xiaozhihong commented 11 months ago

why refactor?

Because PR needs to ensure integrity and fully address the issues of multiple PPS, if there are multiple PPS here, the code will be overwritten. TRANS_BY_GPT3

sorry, I haven't read the code here, so I don't know much about it

Can the h264 pps be modified? The h264 pps is stored using vector<char>, and when numOfPictureParameterSets > 0, it will be overwritten multiple times and only the last pps is recorded. @xengine-qyt ' Please ensure to maintain the markdown structure. TRANS_BY_GPT4

sorry,i have no mulit pps device for h264,I am afraid that the modify is not correct, I recommend you to modify it.

Um, okay, thank you very much for the PR, we will handle the rest of the modifications.