diff options
author | 2024-07-30 14:18:29 +0000 | |
---|---|---|
committer | 2024-07-30 16:18:29 +0200 | |
commit | 0b4a951b487c6d26a69a1044c8cd39214498ea23 (patch) | |
tree | b385c3339693611e07dae92cde9742b403d6184b | |
parent | [feature] persist worker queues to db (#3042) (diff) | |
download | gotosocial-0b4a951b487c6d26a69a1044c8cd39214498ea23.tar.xz |
[performance] limit ffprobe read time to at most 1s after start of file (#3155)
-rw-r--r-- | internal/media/ffmpeg.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/media/ffmpeg.go b/internal/media/ffmpeg.go index 1cfaf891c..0de5797ab 100644 --- a/internal/media/ffmpeg.go +++ b/internal/media/ffmpeg.go @@ -243,6 +243,11 @@ func ffprobe(ctx context.Context, filepath string) (*result, error) { // side data stored. "side_data=rotation", + // Limit to reading the first + // 1s of data looking for "rotation" + // side_data tags (expensive part). + "-read_intervals", "%+1", + // Input file. "-i", filepath, }, |