Problem IOS 12 browser view mp4 over http protocol

I have a rclone service run on linux. Mp4 file on server will stream over Apache2 on http protocol all my device android, mac os x or windows are working normal but it have problem on ios. I have 2 iphone

  • ip5 run ios 11 and it can view mp4 file normally
  • ip6 plus run ios 12 it can not load mp4 file anymore. It happen on any device run ios 12
    All browser: safari, chrome, firefox, opera isn’t work
    But if i use vlc it is working normal

You are running an rclone mount then serving files with apache from that - is that correct?

What parameters are you using on your mount?

You could try using rclone serve http instead of rclone mount + apache.

i discover that if i use mount with param --vfs-cache-mode=full that ios can run file but it take to much disk

I already try rclone serve http but they are the same, it still need param --vfs-cache-mode=full to load on IOS
do you know any thing about this, it special happen on IOS 12.1 only, lower OS is working normal

Any chance you could use wireshark to see what different thing IOS 12.1 is doing compared to different versions?

i aready have wireshark log but im not familiar with these data how can i detect problem here

If you could send me a capture from the failing IOS 12.1 and a successful one from an earlier IOS I can have a look at it.

My email is nick@craig-wood.com if you want to send it privately.

I’ve send you email that contain link to WireShark package on IOS 12.1 and 11.4 can you compare it for me,
with 11.4 that because it can load a mp4 file so it a little bit heavier
thank for you help

I had a look at those.

I have to say they look almost identical. In both I can see the browser requesting the stream and rclone delivering it - about 500k before the browser decides it has had enough and closes the connection.

So I don’t think this is due to the way rclone is serving the file (I could be wrong though!)

The one thing that might be relevant is in the file that didn’t play there is a pause of over a second in the data transfer. I wonder if that is causing the problem - the data not being delivered quick enough.

You could try experimenting with --buffer-size - try --buffer-size 0 and see if that makes a difference.

Also try experimenting with --vfs-read-chunk-size and --vfs-read-chunk-size-limit

When you play the file does it start playing and then stop? If so can you try start playing it then pause it immediately wait for a bit then unpause?

i’ve try --buffer-size 0M and --buffer-size=32M --vfs-read-chunk-size=32M , it still not working

:frowning: Can you answer my other questions above?

i’m sorry i forgot, it still not work on your scenario :frowning:

Does the media play if you copy it directly to the device?

Im not quite understand yet. Can you explan more detail

If you download the mp4 to the IOS device, does it play from the IOS device directly?

yes it can work, not only that when i move to an directory in Apache or some server service (not over rclone any more) so it working normal

OK.

How about if you copy the file to a local machine say to /tmp/files/file.mp4 then run rclone serve http /tmp/files - does that work? I’m assuming you are serving the file from a remote cloud storage system - this will tell us whether it works without.

Another thing you could try is use rclone mount to mount the remote cloud storage system then use apache to serve that.

it working normal when i move file to local computer and use both rclone serve http /tmp/files and apache2

i can see that if i use these parameter --vfs-cache-mode=full it can work but look like it copy file to local when i request file over http, although iphone need to wait along time to cache file to server but it work normal, some time it wait more than one minutes

OK that is good so it isn’t do so with how rclone is serving things.

Yes rclone will copy the entire file before starting to serve it.

So it looks like the iphone is sensitive to having a pause in the download.

Here is what I think is happening

  • stream starts
  • rclone transfers about 500k of data
  • rclone pauses for a bit - here is where IOS 12 decides not to play the stream
  • rclone transfers more data

I wonder if that is happening at a chunk boundary… Can you try with --vfs-chunk-size 0 - this will turn off the chunking and hopefully make the stream smoother.