Bad performance when streaming MOV
I see an issue in the demo (and my app) where MOV files play when embedded as an asset, but they fail when streamed.
Here is an example: https://www.snapwoodapps.com/hevc.mov
This video will work in the demo when embedded as an asset.
Playing the URL will take 75 seconds to start playback. It will then rebuffer before complete, taking another 60 seconds.
This video is only 5 seconds long. It only takes 1 second to download the entire file from the server.
I have this issue with all MOV files recorded on my iPhone XS (h264 or HEVC). All MP4 files and many other formats will stream just fine over HTTP. Only MOV files from iPhone show this issue.
I can see in KSMEPlayer.sourceDidChange that the progress increments very slowly to 100 before playback will start.
I can see in the demo that it seems to alternate Range: byte requests, which seems odd:
KSPlayer: MEPlayerItem.swift:92 init(url:options:) | request: GET /hevc.mov HTTP/1.1 User-Agent: ksplayer Accept: / Range: bytes=2117051- Connection: close
KSPlayer: MEPlayerItem.swift:92 init(url:options:) | request: GET /hevc.mov HTTP/1.1 User-Agent: ksplayer Accept: / Range: bytes=33161- Connection: close
KSPlayer: MEPlayerItem.swift:92 init(url:options:) | request: GET /hevc.mov HTTP/1.1 User-Agent: ksplayer Accept: / Range: bytes=2165460-
KSPlayer: MEPlayerItem.swift:92 init(url:options:) | request: GET /hevc.mov HTTP/1.1 User-Agent: ksplayer Accept: / Range: bytes=33599- Connection: close
It seems to be getting very small chunks of data. The last in the above is only getting 438 bytes.
I tried changing probesize and maxAnalyzeDuration to no effect.