ossrs / srs

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

HLS not loading on iPhones/iOS devices #3430

Closed jorbig closed 1 year ago

jorbig commented 1 year ago

Note: Please read FAQ before file an issue, see #2716

Description

Streaming works fine, except that the HLS is infinitely loading on iOS devices (both Safari and Chrome).

  1. SRS Version: all

  2. SRS Log:

No errors here.

  1. SRS Config:

Default.

Replay

Please describe how to replay the bug?

Try playing a HLS file in Safari on iOS.

Expect

I expected it to work fine, but it doesn't.

chundonglinlin commented 1 year ago

I test HLS with iphone's safari in SRS6.0.26 and it runs no problem. Can you supply more informations, likely SRS config and logs. It's very important for us to find. @jorbig Meanwhile, we hope you can read FAQ before file an issue, please see #2716.

jorbig commented 1 year ago

@chundonglinlin I should have been more specific, sorry for that. It seems to be the same issue as for aruts Nginx + RTMP module described here: https://github.com/arut/nginx-rtmp-module/issues/1656 (which was there fixed in a fork of that module).

The problem only occurs when streaming live. My config is very basic and as follows:

listen              1935;
max_connections     1000;
srs_log_tank        console;
daemon              off;

http_api {
    enabled         on;
    listen          1985;
}

http_server {
    enabled         on;
    listen          8080;
    dir             ./objs/nginx/html;
}

vhost __defaultVhost__ {
    hls {
        enabled         on;
    }
    http_remux {
        enabled     on;
        mount       [vhost]/[app]/[stream].flv;
    }
}

For streaming, I use either Adobe FMLE or Larix Broadcaster, with audio only, 32kbps AAC. It doesn't seem to throw any errors, the .m3u8 of the livestream just infinitely loads in iOS.

I've tried and reproduced this on SRS 5.0-a4 and 6.0.10 (both Windows and Docker). Could you reproduce it now as well?

chundonglinlin commented 1 year ago

Can you show me SRS logs? I cannot find error messge.

Do you test ffmpeg publish streaming ? ffmpeg -re -i doc/source.200kbps.768x320.flv -c copy -f flv rtmp://127.0.0.1:1935/live/livestream

jorbig commented 1 year ago

Sorry, I don't have error logs. The problem is not with pushing a FLV, but with livestreaming a microphone to RTMP. The HLS just keeps loading infinitely until I stop the RTMP. It's only when live streaming to rtmp://[SERVER]/live/livestream I tested it on several iOS devices (through BrowserStack), and it's the same problem. iPads and Macs work fine though. For now, I switch to MistServer, where this issue doesn't appear. But I'll hope to come back to SRS once you get this fixed.

winlinvip commented 1 year ago

Please follow issue template to file an issue, you should never skip information in template.

This issue will be eliminated, see #2716