Skip to content

Add Environment Variable to Configure Maximum Video Frame Count - #853

Open
msdsm wants to merge 1 commit into
QwenLM:mainfrom
msdsm:feature/user-defined-frame-limit
Open

Add Environment Variable to Configure Maximum Video Frame Count#853
msdsm wants to merge 1 commit into
QwenLM:mainfrom
msdsm:feature/user-defined-frame-limit

Conversation

@msdsm

@msdsm msdsm commented Feb 26, 2025

Copy link
Copy Markdown

Overview

This PR adds the ability to configure the maximum number of frames extracted from videos in Qwen2.5-VL through an environment variable QWEN_VL_MAX_FRAMES. This enhancement improves the analysis of long videos by allowing users to extract more frames based on their hardware capabilities.

Changes

  • Added environment variable QWEN_VL_MAX_FRAMES to override the default FPS_MAX_FRAMES value
  • Added informative logging when a custom value is used
  • Added detailed frame extraction logging for debugging purposes

Background & Motivation

When processing long videos (2+ hours), the current fixed limit of 768 frames provides insufficient temporal resolution. For example, a 2-hour video would only have about 1 frame every 9.4 seconds, making fine-grained event detection difficult. This change allows users with adequate hardware to increase the frame limit for better video analysis.

Related Issues

Closes #852

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant