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

H265: Demux sps for log print and statistic streams.(#3271) #3286

Merged

Conversation

chundonglinlin
Copy link
Member

When you experience ./configure --h265=on, print detail codec infomation and statistic streams. Likely,

[2022-11-28 13:22:54.854][INFO][18226][05w7b88u] 2088B video sh, codec(12, profile=Main, level=3.1, 1280x720, 0kbps, 0.0fps, 0.0s)
[2022-11-28 13:22:54.854][INFO][18226][05w7b88u] 7B audio sh, codec(10, profile=LC, 2channels, 0kbps, 44100HZ), flv(16bits, 2channels, 44100HZ)

curl "http://127.0.0.1:1985/api/v1/streams/"

{
    "code": 0, 
    "server": "vid-5x95fw5", 
    "streams": [
        {
            "id": "vid-8upx759", 
            "name": "livestream", 
            "vhost": "vid-4034os0", 
            "app": "live", 
            "tcUrl": "rtmp://127.0.0.1:1935/live", 
            "url": "/live/livestream", 
            "live_ms": 1669641839460, 
            "clients": 1, 
            "frames": 0, 
            "send_bytes": 4425, 
            "recv_bytes": 295733, 
            "kbps": {
                "recv_30s": 0, 
                "send_30s": 0
            }, 
            "publish": {
                "active": true, 
                "cid": "75167s02"
            }, 
            "video": {
                "codec": "HEVC", 
                "profile": "Main", 
                "level": "3.1", 
                "width": 1280, 
                "height": 720
            }, 
            "audio": {
                "codec": "AAC", 
                "sample_rate": 44100, 
                "channel": 2, 
                "profile": "LC"
            }
        }
    ]
}

@chundonglinlin chundonglinlin force-pushed the feature/hevc-demux-profile-level branch from e67f095 to 565ceb3 Compare November 28, 2022 13:51
@winlinvip winlinvip changed the title H265: demux sps for log print and statistic streams.(#3271) H265: Demux sps for log print and statistic streams.(#3271) Nov 29, 2022
@winlinvip winlinvip linked an issue Nov 29, 2022 that may be closed by this pull request

if (profile_resent_flag) {
if (!bs->require(88)) {
return srs_error_new(ERROR_HEVC_DECODE_ERROR, "ptl general profile tier shall atleast 88bits");
Copy link
Member

@winlinvip winlinvip Dec 4, 2022

Choose a reason for hiding this comment

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

There is an implicit variable here, which is the actual remaining bits. So the error message should include this information.

return srs_error_new(ERROR_HEVC_DECODE_ERROR, "ptl requires 88 only %d bits", bs->bits_left());

Note: There is no need to write so many constants. The errors already include line numbers and functions, so we only need a descriptive constant. Therefore, instead of ptl general profile tier shall atleast, it can be directly changed to ptl requires or ptl profile requires.

Please also make changes in other places.

TRANS_BY_GPT3

@winlinvip winlinvip merged commit a0803b5 into ossrs:develop Dec 4, 2022
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 29, 2023
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: The codec information is incorrect.
2 participants