mayeaux / nodetube

Open-source YouTube alternative that offers video, audio and image uploads, livestreaming and built-in monetization
MIT License
2.33k stars 260 forks source link

HEIC Apple Photo Support #242

Open maltokyo opened 4 years ago

maltokyo commented 4 years ago

Hello, I noticed that I cannot upload any images from iOS / iPhone. I guess this is a super popular format, would it be possible to gain support, or any workaround I can use to add it myself?

mayeaux commented 4 years ago

Thanks for letting me know, I'll look into that

mayeaux commented 4 years ago

I just tested it myself and it worked fine. I clicked 'Select Upload' then I was able to choose between my Camera Roll etc. Can you explain the flow when it doesn't work for you?

maltokyo commented 4 years ago

Oh I just used your demo site and I could not even choose an heic file. Apologies I forgot to mention that

On Thu, 16 Apr 2020, 18:05 mayeaux, notifications@github.com wrote:

I just tested it myself and it worked fine. I clicked 'Select Upload' then I was able to choose between my Camera Roll etc. Can you explain the flow when it doesn't work for you?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mayeaux/nodetube/issues/242#issuecomment-614744856, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKS7W4LV3ECECRPRFSMQ5DRM4UFDANCNFSM4MJTO5QA .

mayeaux commented 4 years ago

How can I test this? When I (using iOS 12 so it should be using HEIC), go and try an upload all my photos show up. You're saying that when you hit Select File no images show up, or what do you see on your end? Thanks

maltokyo commented 4 years ago

Here is what I did, from this page: https://github.com/mayeaux/nodetube

Is linked your demo site: https://newtube.app

From there, created account and pressed "Upload" to test how it works.

In there it says this:

Supported File Formats

Video: .mp4, .avi, .flv, .MOV, .m4v, .ogv, .webm, .wmv, .mkv, .mov, .m2t, .MTS, .m2ts, .MPG, .AVI, .mpg
Audio: .mp3, .wav, .ogg, .m4a
Image .png, .jpg, .jpeg, .gif, .JPG, .PNG

But I try anyway to upload HEIC file.

And I CAN select it, and start the upload, but after it starts, I finally get this:

image

mayeaux commented 4 years ago

The issue is that browsers can't display .heic files, so there would have to be some serverside conversion but there's not really any good tools for that that I can find. If you want to dig into this a little bit more I'm happy to hear your suggestions.

maltokyo commented 4 years ago

Imagemagick supports for a long time now.

https://imagemagick.org/script/formats.php

mayeaux commented 4 years ago

The issue is that we would be adding a dependency for such a small feature (I had never heard of or used .heic before). If someone wanted to make a PR for it though I would accept it provided that it was supported as a flag so someone could run the app full fledged without having to install Imagemagick. I want to try and support as many file formats as possible but at the same time I want to make the installation process as simple as possible and adding a whole installation step to support .heic files isn't worth the tradeoff at the moment, though like I said if it was optionally made available through the .env.settings file I would support a PR for that.

maltokyo commented 4 years ago

Ok. I'll look at it. Which image processor do you currently use for still image manipulation?

On Fri, 17 Apr 2020, 17:22 mayeaux, notifications@github.com wrote:

The issue is that we would be adding a dependency for such a small feature (I had never heard of or used .heic before). If someone wanted to make a PR for it though I would accept it provided that it was supported as a flag so someone could run the app full fledged without having to install Imagemagick. I want to try and support as many file formats as possible but at the same time I want to make the installation process as simple as possible and adding a whole installation step to support .heic files isn't worth the tradeoff at the moment, though like I said if it was optionally made available through the .env.settings file I would support a PR for that.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mayeaux/nodetube/issues/242#issuecomment-615306049, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKS7W774FSWOTMUUATI2LTRNBX47ANCNFSM4MJTO5QA .

mayeaux commented 4 years ago

None! Browsers are really good at handling images so we don't do any post-processing of images at the moment. Though probably in the future this should be changed so that images have thumbnails so less bandwidth is used when displaying them as thumbnails. I just made a ticket for that: https://github.com/mayeaux/nodetube/issues/244

I'm still a little iffy on introducing another installation step for such a small use case but as long as it was put behind a flag it would be fine.