gotosocial
gotosocial copied to clipboard
[feature] Create video preview image from a frame in the video
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.
.
What you expected to happen?
Works as intended when opening the same status from a remote instance(mastodon.social).
How to reproduce it?
Open a status containing a video attachment.
Anything else we need to know?
No response
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.
Video thumbnails added in https://github.com/superseriousbusiness/gotosocial/commit/cde2fb6244a791b3c5b746112e3a8be3a79f39a4