waschinski / photo-stream

Self-hosted, super simple photo stream
https://github.com/waschinski/photo-stream
MIT License
448 stars 68 forks source link

Video support #48

Open dumblob opened 1 year ago

dumblob commented 1 year ago

Any plans to support video? I envision it to look the very same except maybe to add a "triangle icon" over thumbnails so that its clear its a video.

waschinski commented 1 year ago

No plans to add video support right now, I actually don't think the libraries being used would support it.

I would also like to see HEIF/HEIC/HEVC support before supporting videos in general. What formats have you been thinking about?

dumblob commented 1 year ago

No plans to add video support right now, I actually don't think the libraries being used would support it.

Why not to use other tools for this functionality? ffmpeg works on windows, macos, *nixes, linux ...

I would also like to see HEIF/HEIC/HEVC support before supporting videos in general. What formats have you been thinking about?

h264 in mp4 container (this combination seems to have the most widespread support - by a large margin - across smartphones, tablets, and desktop browsers - in all cases incl. HW acceleration)

waschinski commented 1 year ago

Why not to use other tools for this functionality? ffmpeg works on windows, macos, *nixes, linux ...

The way image processing works right now is by using a Jekyll plugin that wraps image_processing and libvips. It's not as simple as just replacing this plugin or use an additional one for videos. I have found one project that does video processing via ffmpeg for a Jekyll site but even that uses a Python script for video conversion and requires you to convert your videos in advance. Have a look at ownvideo.

dumblob commented 1 year ago

It's not as simple as just replacing this plugin or use an additional one for videos.

Hm, why? I mean, it is not trivial but it shouldn't be difficult. Or am I missing something?

I have found one project that does video processing via ffmpeg for a Jekyll site but even that uses a Python script for video conversion and requires you to convert your videos in advance. Have a look at ownvideo.

Some (even if it would be only for a gif-thumbnail) up-front conversion will be needed one way or another (as I am not aware of any streaming/on-the-fly conversion with caching capabilities).

ownvideo looks as a good source of inspiration for video support in photo-stream (maybe renamed to "multimedia stream"... :wink:).

waschinski commented 1 year ago

Hm, why? I mean, it is not trivial but it shouldn't be difficult. Or am I missing something?

Even when video conversion is not integrated into Photo Stream, layouts need to be adjusted so videos will be embedded properly, video files need to be copied (which is all done more or less automatically right now) etc.

Some (even if it would be only for a gif-thumbnail) up-front conversion will be needed one way or another (as I am not aware of any streaming/on-the-fly conversion with caching capabilities).

ownvideo looks as a good source of inspiration for video support in photo-stream (maybe renamed to "multimedia stream"... 😉).

True, even if videos are already converted, there needs to be a thumbnail or something. I need to check if the plugin used for photos would be able to do that for videos as well (which I doubt).