Back

It seems like a server is changing media file contents

  • 0
  • Storage
ftp27
17 Apr, 2023, 09:25

Hello. I store some mp4 files in DO Storage using Appwrite and noticed that one file doesn't downloads in the same binary state it was when I uploaded the video. It's odd because other files look fine, at least they are recognized as mp4 files and playing properly. I don't upload that files by myself, it is usually done by a function that decodes input files into smaller ones with ffmpeg. So I noticed that one file has been converted the wrong way so processed the input file by myself and uploaded it manually. When I tried to download the result it suddenly become broken the same way as automatically generated videos.
The server version is 1.3.1. Bucket settings:

  • Compression: None
  • Encryption: On
  • Antivirus: On
  • File Security: Off Please let me know if you need further information

P.S. Is it safe to turn Encryption off if I already have files in the storage? Will they be decrypted in the storage?

TL;DR
The user is experiencing an issue with a server whereby one file is not downloading in the same binary state as when it was uploaded. They suspect that the file was converted incorrectly. The server version is 1.3.1 and encryption is turned on. The user is unsure if turning off encryption will decrypt the files already in storage. A solution suggested by another user is to try disabling encryption to see if it resolves the problem. The user also mentions using a hex editor to compare the files before and after upload. No resolution is mentioned in the thread.
ftp27
17 Apr, 2023, 09:40

here is videos before upload and after

ftp27
17 Apr, 2023, 09:42

ffmpeg command I use ffmpeg -y -i big_video.mp4 -ss 2 -crf 28 -vf scale=216:386 -an sample.mp4

joeyouss
17 Apr, 2023, 14:55

Hi - let me look into this and be back

ftp27
18 Apr, 2023, 07:41

Thank you, @joeyouss

joeyouss
20 Apr, 2023, 09:58

Looping in @Jake

Drake
21 Apr, 2023, 21:34

How did you check the files to see that one was converted the wrong way?

ftp27
22 Apr, 2023, 09:47

I've opened it in hex editor. At least header of the file is different. I think disabling the encryption could fix the problem, but I'm not sure that files I already have in my storage will be decrypted after turning it off.

Drake
22 Apr, 2023, 15:34

Sorry, I meant how are you retrieving the file?

ftp27
23 Apr, 2023, 10:33

Yes. I download the file from storage through the admin panel. I bet it will be the same as from API requests.

Drake
23 Apr, 2023, 14:27

Btw, it should be safe to turn off the encryption. They will stay encrypted in the storage. New uploaded files will not be encrypted

Drake
23 Apr, 2023, 14:27

How big was the file that was not the same?

ftp27
24 Apr, 2023, 09:22

I've sent both files (before and after upload) above. input.mp4 - 78743 output.mp4 - 78664 So both files around 78KB

Drake
24 Apr, 2023, 13:38

Oh that's small so it shouldn't be a content range problem....you could try to see if disabling encryption will make a difference

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more