gotosocial icon indicating copy to clipboard operation
gotosocial copied to clipboard

[feature] Create video preview image from a frame in the video

Open Jasdemi opened this issue 1 year ago • 1 comments

Describe the bug with a clear and concise description of what the bug is.

When viewing a status with a video attached, it does not show an image of the first frame in apps (tested with Tusky and Megalodon). There is however a preview on the GTS frontend. Example: https://jasdemi.com/@jasdemi/statuses/01HEDJ2DPD8GVFVPTDJ6569QDS

What's your GoToSocial Version?

0.12.2

GoToSocial Arch

Docker

What happened?

This is what it look like in Tusky. Screenshot_20231111-220718.

What you expected to happen?

Works as intended when opening the same status from a remote instance(mastodon.social). Screenshot_20231111-221320

How to reproduce it?

Open a status containing a video attachment.

Anything else we need to know?

No response

Jasdemi avatar Nov 11 '23 21:11 Jasdemi

Hiya! This is quite normal and not really a bug per se. Currently what we do in GtS is retrieve metadata for the video (size, width, height, length, etc) to serve via the API, but we don't actually decode the first frame of the video or anything like that in order to get a preview image. This is mainly because doing so seems to require an ffmpeg dependency, which we're reluctant to introduce because it makes deployment more complex, and/or will require us to use CGO, which makes GtS less portable overall.

If there's a way to decode the first frame of a video without ffmpeg or cgo, then we'd be able to solve this issue.

tsmethurst avatar Nov 13 '23 09:11 tsmethurst

Video thumbnails added in https://github.com/superseriousbusiness/gotosocial/commit/cde2fb6244a791b3c5b746112e3a8be3a79f39a4

Jasdemi avatar Jul 12 '24 14:07 Jasdemi