ios icon indicating copy to clipboard operation
ios copied to clipboard

Unable to playback (streaming) videos

Open rmufr opened this issue 8 years ago • 8 comments

I found the cause of the issue and filed an issue report in sabre-io/http. But it doesn't seem to have much echo since then: root cause issue in sabre-io/http

Expected behaviour

Finger tap on the video item that is not in local cache, it opens the player and the video playback starts almost immediately

Actual behaviour

Finger tap on the video item that is not in local cache, it opens the player, but show black screen, the playback never starts.

Steps to reproduce

Nextcloud server runs on a 32bit OS, then within the NC iOS app, finger tap on any video item that is not in local cache. Note that this issue also breaks video playback of the webUI within the iOS device browser (tested with Safari and Chrome iOS)

iOS version

12.0.1

App version

2.22.4.0

Server configuration

Operating system: Raspbian Stretch, up to date, running on a RPI3 Linux 4.14.71-v7+ #1145 SMP Fri Sep 21 15:38:35 BST 2018 armv7l GNU/Linux Web server: nginx/1.14.0 Database: MariaDB 10.1.23 PHP version: 7.0.30 Nextcloud version: (see Nextcloud admin page) 14.0.3

rmufr avatar Oct 16 '18 10:10 rmufr

Can you give us some logs from PHP / Nginx / Nextcloud

Knot3n avatar Oct 16 '18 12:10 Knot3n

Hi, I observed that in iOS app or in iOS Safari, a video playback starts always with the client requesting the first 2 bytes of the video file. Here's the Nginx log (done with NC13 but it's the same with NC14) of this request:

80.12.xx.xx - - [20/Mar/2018:13:20:41 +0100] “GET /remote.php/webdav/Nextcloud.mp4 HTTP/2.0” resp status=206, body_bytes_sent=65535 “-” “Mozilla/5.0 (iPhone; CPU iPhone OS 11_2_6 like Mac OS X) AppleWebKit/604.5.6 (KHTML, like Gecko) Version/11.0 Mobile/15D100 Safari/604.1” “-” “myserver.dtdns.net” sn=“myserver.dtdns.net” rt=0.249 ua=“unix:/run/php/php7.0-fpm.sock” us=“206” ut=“0.197” upstream_response_length=“462877” cs=- Req.Content-Range=“bytes=0-1” Resp.range=bytes 0-1/462413 Accept-ranges=bytes stype=video/mp4

As I highlight in this log, the client requests bytes 0-1, the server replies partial content ok (206), with the response range header "bytes 0-1/462413". But the body_bytes_sent=65536, which is inconsistent (it should be =2). In fact, the server send the whole stream instead of the first 2 bytes, and the iOS client closes the connexion.

rmufr avatar Oct 16 '18 13:10 rmufr

Strange, I cant reproduce that failure.

Can you show me the vhost for this instance?

Knot3n avatar Oct 16 '18 13:10 Knot3n

Note that, it only occurs with the NC server running on a 32bit OS

rmufr avatar Oct 16 '18 13:10 rmufr

Here's my nginx vhost. Basically it's the default nginx conf from Nextcloud 14 documentation. nginx_vhost.txt

rmufr avatar Oct 16 '18 14:10 rmufr

Uhm, did you test a fresh install ?

When yes, maybe the 32bit is the problem but i hope or think not.

Knot3n avatar Oct 16 '18 17:10 Knot3n

It is, indeed. As I mentioned in my first post, I found the cause of the issue in sabre-io code, and filed an issue for that. Here's the link : issue on sabre. But they don't seem to care too much at the moment. I also proposed a quickfix here, cancelling the 32Bit OS test that causes the issue.

rmufr avatar Oct 16 '18 19:10 rmufr

I have had a similar problem, where the combination of Letsencrypt, Nginx, HTTP/2 and iOS for some reason screws up 206 range requests, but not regular 200 requests. All my problems have been solved by disabling HTTP/2 in nginx. It's not HTTP/2 alone that is the problem though, since it can work perfectly with Charles debugging proxy (which uses HTTP/2). Very strange...

wiegell avatar Jun 21 '21 19:06 wiegell