Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added support for google specific arguments for video analysis#2110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

Sumered
Copy link
Contributor

Added support for Google models specific arguments when processing video, those arguments are:

  • media_resolution, which is model setting, settings this to LOW instead of default HIGH results in ~3x lower amount of input tokens consumed for video input.
  • fps, which is video specific settings, set by setting vendor_metadata in FileUrl/BinaryContent, controls frame sampling. Default is 1.0 for Google models, setting this to lower value decrease amount of input video tokens, setting it to higher value increase analysis quality in highly dynamic videos.
  • start_offset, which is video specific settings, set by setting vendor_metadata in FileUrl/BinaryContent, controls start offset of video. Useful for capping token consumption per video. According to docs it needs to contain s at the end, ex. 300s
  • end_offset, which is video specific settings, set by setting vendor_metadata in FileUrl/BinaryContent, controls end offset of video. Useful for capping token consumption per video.

Official Google docs for those new arguments:
https://ai.google.dev/gemini-api/docs/video-understanding

@Sumered
Copy link
ContributorAuthor

I'm still not exactly sure why are those tests failing, so I would be thankful if you could provide me with an explanation on what to do with those?

@DouweMDouweMforce-pushed thegoogle-video-processing-arguments branch from3fd7b6b toa77242eCompareJuly 3, 2025 18:47
@DouweMDouweMforce-pushed thegoogle-video-processing-arguments branch from85efece tof763cc8CompareJuly 3, 2025 22:45
@DouweMDouweMforce-pushed thegoogle-video-processing-arguments branch fromf763cc8 tod8db5b0CompareJuly 3, 2025 22:48
@DouweM
Copy link
Contributor

@Sumered It took me a lot of head-scratching and 2 different patches, but I finally got things to work with the latestgoogle-genai!

Sumered reacted with heart emoji

@DouweMDouweM merged commit036428c intopydantic:mainJul 7, 2025
18 checks passed
@DouweM
Copy link
Contributor

@Sumered Thanks Kacper!

@SumeredSumered deleted the google-video-processing-arguments branchJuly 8, 2025 03:56
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@DouweMDouweMDouweM requested changes

Assignees

@DouweMDouweM

Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@Sumered@DouweM

[8]ページ先頭

©2009-2025 Movatter.jp