Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uploaded Videos get downscaled #3191

Closed
Jogaxell opened this issue Nov 13, 2024 · 7 comments
Closed

Uploaded Videos get downscaled #3191

Jogaxell opened this issue Nov 13, 2024 · 7 comments
Assignees
Milestone

Comments

@Jogaxell
Copy link

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Upload a 4k video from your photo library to your Nextcloud via the mobile app.
  2. Download the just uploaded video.
  3. Check video size.

Expected behaviour

Tell us what should happen

The video should not be downscaled/compressed.

Actual behaviour

Tell us what happens instead, if possible also add a screenshot

The video is now compressed to 1080p.
Original video:
Image
Video downloaded from Nextcloud:
Image

I think the problem lies partly on apples side. With iCloud Photos turned on I think Nextcloud only uploads the locally stored thumbnails/downscaled videos rather than the originals stored in iCloud. The Nextcloud app should therefore be first downloading the original from iCloud to the the device, then uploading them to your Nextcloud

Logs

If applicable, you can post the iOS app or server logs (removing any sensitive information).

Reasoning or why should it be changed?

To not lose quality of uploaded files.

Environment data

iOS version: iPadOS 18.0.1
Also tested on iOS 17.0

Nextcloud iOS app version: 5.5.5.0

Server operating system: Linux 6.6.32-production+truenas x86_64

Web server: Apache, nginx

Database: PostgreSQL 13.1 (Debian 13.1-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit

PHP version: 8.2.23

Nextcloud version: 29.0.5

@Torqu3Wr3nch
Copy link

Possibly also related to issue #2164 which highlights a more generalized issue whereby the format of the files downloaded locally to the iPhone are not preserved.

Did you check to see how the files were stored on your Nextcloud server itself? Are they stored there in the original 4k format or are they also showing 1080p?

@Jogaxell
Copy link
Author

Sadly, it's stored in 1080p rather than 4k on the server itself. So the quality is permanently lost.
Image

marinofaggiana pushed a commit that referenced this issue Nov 18, 2024
Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
@marinofaggiana marinofaggiana self-assigned this Nov 18, 2024
@marinofaggiana marinofaggiana added this to the 6.1.7 milestone Nov 18, 2024
@Torqu3Wr3nch
Copy link

@marinofaggiana, this wouldn't have affected autouploads, correct? Only manually uploaded videos?

Thank you in advance.

@Jogaxell
Copy link
Author

@Torqu3Wr3nch I only discovered this issue through the autouploads.
So yes, they are also affected.

@Torqu3Wr3nch
Copy link

Torqu3Wr3nch commented Nov 30, 2024

Thank you for the reply.

Here is what's weird though: I checked my videos and my 4k video is showing as 4k. Additionally, when I download the video and examine it (on my desktop), I see that it is in fact stored as HEVC/H.265. Looking at @marinofaggiana's change, that should not be the case since AVAssetExportPresetHighestQuality compresses the video to H.264.

@Jogaxell, were your videos stored locally on your phone or were they only available on iCloud?

As far as I know, this command could just be called on download and so the files stored on your Nextcloud server itself are fine. Would you mind downloading the files on your desktop from the Nextcloud server itself and verifying if those files are correct in terms of resolution and codec (you can use VLC Media Player to check)?

I'm trying to gauge how disastrous this issue is in terms of data loss...

Thanks again!

@Jogaxell
Copy link
Author

The affected videos were only available on iCloud, not stored locally on the device.

Locally stored video are not affected for me.

As I sat earlier, the affected videos are stored in lower quality on the server itself. The screenshot is from the file system of the server.

Sadly, it's stored in 1080p rather than 4k on the server itself. So the quality is permanently lost. Image

@Jogaxell
Copy link
Author

Jogaxell commented Dec 5, 2024

Sadly, the issue is not fixed for me with.
I installed v6.1.7 from the Appstore.

Steps I took to reproduce the issue:

  1. I took a 4k Video on my iPhone
  2. I waited for the video to be uploaded to iCloud
  3. I waited for my iPad to upload my new media from iCloud to my Nextcloud
  4. Checking files

Original Video in iCloud
Image
The corresponding file on my nextcloud
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants