Skip to content

Commit

Permalink
[performance] limit ffprobe read time to at most 1s after start of fi…
Browse files Browse the repository at this point in the history
…le (#3155)
  • Loading branch information
NyaaaWhatsUpDoc authored Jul 30, 2024
1 parent 87cff71 commit 0b4a951
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/media/ffmpeg.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down

0 comments on commit 0b4a951

Please sign in to comment.