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

Files: Thumbnails #31

Closed
4 tasks done
jesmrec opened this issue Apr 27, 2018 · 7 comments
Closed
4 tasks done

Files: Thumbnails #31

jesmrec opened this issue Apr 27, 2018 · 7 comments
Assignees
Labels
enhancement New feature or request feature:fileList

Comments

@jesmrec
Copy link
Contributor

jesmrec commented Apr 27, 2018

As an user, i want to see thumbnails, so i can check what the pic contains without downloading and opening it

  • Thumbnails for non-dowloaded images / gifs
  • Thumbnails for dowloaded images / gifs
  • Thumbnails for videos, if the server supports it
  • QA
@felix-schwarz
Copy link
Contributor

Work on this has started here: #32

Thumbnails for videos sounds interesting. Do you know which formats are supported by the server?

@michaelstingl
Copy link
Contributor

For thumbnails of video files, you need to install ffmpeg on the server. It can create static images or short GIF's. @cdamken could you point us to your solution?

@cdamken
Copy link
Contributor

cdamken commented Apr 29, 2018

@IljaN is the one helped me to configure on my server.

@felix-schwarz
Copy link
Contributor

Ok, so I assume a lot of additional formats can be added through configuration / customization that aren't contained in the stock version I currently use for testing. Not just video files, but also PDF files, Office files, etc.

While I assume most users won't have this set up, some definitely will, so the app would have to request thumbnails for every file to find out.

For a folder filled with a 1000 files without previews, that's a lot of unnecessary overhead both locally and remote.

One solution I thought about is to make the app "smart" insofar as it learns which MIME-Types it didn't get back a thumbnail for, then no longer request thumbnails for objects of the same MIME-Type. However, in the (highly likely) case someone gave a file of a supported file format a wrong suffix (say, save a PDF with a .png file name) and preview generation fails for it, thumbnails would no longer be requested for all other PNG files, either. So, nope, not a solution, either, after all.

Right now, I can see only two ways to deal with this:

  1. always request thumbnails for every file
  2. implement Preview API: expose supported file/MIME types via Capabilities endpoint core#31267 on the server and send requests out only for actually supported mime types

Other/better suggestions welcome. ❤️

/cc @DeepDiver1975 @michaelstingl

@michaelstingl
Copy link
Contributor

I'd heavily vote for owncloud/core#31267

@cdamken
Copy link
Contributor

cdamken commented Apr 30, 2018

I was checking my chat and here is the solution:

apt install ffmpeg

Add this patch:

Index: lib/private/PreviewManager.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- lib/private/PreviewManager.php	(revision 51204a304a956fa952401c7af797bf94cd2070f7)
+++ lib/private/PreviewManager.php	(date 1520353916000)
@@ -251,6 +251,7 @@
 			'OC\Preview\MarkDown',
 			'OC\Preview\MP3',
 			'OC\Preview\TXT',
+			'OC\Preview\Movie'
 		], $imageProviders));
 
 		if (in_array('OC\Preview\Image', $this->defaultProviders)) {

It could be an animation icon too if we change the line to create to:

ffmpeg -t 00:00:10 -i VID_20180305_160500.mp4 -vf scale=320:180 video.gif -hide_banner

That probably helps

@michaelstingl
Copy link
Contributor

There is also ffmpegthumbnailer that could help…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature:fileList
Projects
None yet
Development

No branches or pull requests

4 participants