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

iOS 15 or above Safari browser cannot play pure audio HLS. #2957

Open
JalySN opened this issue Mar 8, 2022 · 4 comments
Open

iOS 15 or above Safari browser cannot play pure audio HLS. #2957

JalySN opened this issue Mar 8, 2022 · 4 comments
Assignees
Labels
Bug It might be a bug. PullRequest Has PR or solution in issue. TransByAI Translated by AI/GPT.

Comments

@JalySN
Copy link

JalySN commented Mar 8, 2022

Locating the problem, the PMT writing information defaults to including the video field. Use ffplay to locate the warning.
Could not find codec parameters for stream 1 (Video: h264 ([27][0][0][0] / 0x001B)

Upon checking the code, it was found that in the corresponding function SrsTsPacket::create_pmt, the video type should not be push_backed in the case of pure audio.

// if h.264 specified, use video to carry pcr.
if (vs == SrsTsStreamVideoH264) {
    pmt->PCR_PID = vpid;
    pmt->infos.push_back(new SrsTsPayloadPMTESInfo(vs, vpid));
}

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented Mar 12, 2022

👍 You can submit a PR, please refer to https://github.com/ossrs/srs/blob/develop/CONTRIBUTING.md for details. Make sure to maintain the markdown structure.

TRANS_BY_GPT3

@winlinvip winlinvip self-assigned this Mar 12, 2022
@winlinvip winlinvip added Bug It might be a bug. PullRequest Has PR or solution in issue. labels Mar 12, 2022
@gaecom
Copy link

gaecom commented Mar 30, 2022

iOS 15+ cannot play all HLS videos. After inspection, it is necessary to generate.

TRANS_BY_GPT3

@gaecom
Copy link

gaecom commented Mar 30, 2022

In the m3u8 file, the #EXTINF:2.000000 format should not have any numbers after the decimal point. It must be an integer or a format like 4.000, not 4.001.
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:2
#EXT-X-MEDIA-SEQUENCE:13
#EXTINF:2.000000,
abc13.ts
#EXTINF:2.000000,
abc14.ts
#EXTINF:2.000000,
abc15.ts
#EXTINF:2.000000,
abc16.ts
#EXTINF:2.000000,
abc17.ts

TRANS_BY_GPT3

@gaecom
Copy link

gaecom commented Mar 30, 2022

Because of this issue, the temporary solution can only use ffmpeg, which leads to the need to add ffmpeg for HLS segmentation, even though the original several hundred video streams were fine with SRS built-in HLS segmentation. This results in a sharp increase in hardware resource requirements.

TRANS_BY_GPT3

@winlinvip winlinvip changed the title ios 15以上safari浏览器无法播放纯音频hls iOS 15 or above Safari browser cannot play pure audio HLS. Jul 28, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug It might be a bug. PullRequest Has PR or solution in issue. TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

3 participants