Skip to content

iOS app video player fails to open valid /remote.php/direct URL, no GET/HEAD request is sent #4093

@alisahin33

Description

@alisahin33

Description

The Nextcloud iOS app fails to stream videos from my server. When tapping a video, the app requests a direct URL successfully, but the embedded VLC/MobileVLCKit player fails with:

"Your input can't be opened. VLC is unable to open the MRL ..."

The important part is that after the app receives the direct URL, no GET or HEAD request is sent to /remote.php/direct/... according to Nginx access logs.

The same video opens correctly after downloading it locally inside the iOS app.

Environment

Nextcloud Server: 33.0.2
Nextcloud iOS app: 33.0.7.5
iOS: 18.7 / 26.4.1 was seen in app logs
Server setup: Docker, Apache Nextcloud container behind Nginx reverse proxy
Access domain: Tailscale domain cloud.tail6ac7b1.ts.net
PHP: 8.4.20
Web server: Nginx 1.27.5 reverse proxy -> Nextcloud Apache container
Database: MariaDB 10.11

Steps to reproduce

  1. Open Nextcloud iOS app.
  2. Navigate to a video file.
  3. Tap the video to stream it without downloading.
  4. The iOS app calls:

POST /ocs/v2.php/apps/dav/api/v1/direct

  1. The request succeeds and returns a direct URL.
  2. The embedded player opens but fails with:

"VLC is unable to open the MRL"

  1. Nginx access logs show no GET or HEAD request to the returned /remote.php/direct/... URL.

Expected behaviour

The iOS app should open/play the video stream using the valid direct URL.

Actual behaviour

The app receives the direct URL successfully, but the embedded VLC/MobileVLCKit player fails before making any request to /remote.php/direct/...

Verified server-side tests

The generated direct URL works from curl and from iOS Safari.

curl GET + Range works:

GET /remote.php/direct/... with Range: bytes=0-1023
returns HTTP 206 Partial Content.

HEAD + Range initially returned HTTP 500, but I worked around it in Nginx using proxy_method GET for /remote.php/direct/. After that, HEAD + Range also returns HTTP 206.

Even after that fix, the iOS app still fails before sending any GET/HEAD request to /remote.php/direct/...

Additional tests

  • Browser with logged-in session can play the video.
  • Direct URL is reachable from iOS Safari.
  • Downloaded video plays correctly inside the iOS app.
  • Remuxed the original iPhone .mov file to .mp4 with ffmpeg using:

ffmpeg -i input.mov -map 0:v:0 -map 0:a:0 -c copy -tag:v hvc1 -movflags +faststart output.mp4

The remuxed MP4 still fails in the iOS app with the same VLC/MRL error.

Relevant iOS app logs

The iOS app log shows:

Request started: POST https://cloud........
Network response request: https://cloud.........direct, result: success(197 bytes)

After that, there is no request to /remote.php/direct/... in the Nginx access logs.

Relevant Nginx observation

When using Safari/curl, the /remote.php/direct URL is reached and returns data.
When using the Nextcloud iOS app player, the direct URL token shown in the VLC/MRL error never appears in Nginx logs.

I found another similar report where videos also fail to stream in the iOS app while the same files play correctly in the web interface. My case seems related, but in my logs the direct URL is generated successfully and the generated /remote.php/direct token never reaches Nginx access logs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions