From 1659f75ae6e491355e1d32f0f5e8b956ef70a797 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Thu, 22 Dec 2022 11:48:28 +0100 Subject: [feature] For video attachments, store + return fps, bitrate, duration (#1282) * start messing about with different mp4 metadata extraction * heyyooo it works * add test cow * move useful multierror to gtserror package * error out if video doesn't seem to be a real mp4 * test parsing mkv in disguise as mp4 * tidy up error handling * remove extraneous line * update framerate formatting * use float32 for aspect * fixy mctesterson --- internal/media/types.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'internal/media/types.go') diff --git a/internal/media/types.go b/internal/media/types.go index e7edfe643..47a545cb2 100644 --- a/internal/media/types.go +++ b/internal/media/types.go @@ -137,7 +137,12 @@ type mediaMeta struct { width int height int size int - aspect float64 + aspect float32 blurhash string small []byte + + // video-specific properties + duration float32 + framerate float32 + bitrate uint64 } -- cgit v1.2.3