[performance] limit ffprobe read time to at most 1s after start of file (#3155)

This commit is contained in:
kim 2024-07-30 14:18:29 +00:00 committed by GitHub
parent 87cff71af9
commit 0b4a951b48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -243,6 +243,11 @@ func ffprobe(ctx context.Context, filepath string) (*result, error) {
// side data stored. // side data stored.
"side_data=rotation", "side_data=rotation",
// Limit to reading the first
// 1s of data looking for "rotation"
// side_data tags (expensive part).
"-read_intervals", "%+1",
// Input file. // Input file.
"-i", filepath, "-i", filepath,
}, },