Skip to content

Conversation

@msdsm
Copy link

@msdsm msdsm commented Feb 26, 2025

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Configurable Maximum Frame Limit for Long Video Processing

1 participant