Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • P PyAV
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 37
    • Issues 37
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 26
    • Merge requests 26
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PyAV
  • PyAV
  • Issues
  • #878
Closed
Open
Issue created Jan 24, 2022 by Administrator@rootContributor

VideoFrame.to_image() doesn't work properly if width/height is specified

Created by: animetosho

Overview

VideoFrame.to_image() permits width and height parameters, according to documentation, however, if specified, they cause issues.

Expected behavior

Either width/height is not supported in to_image, or it resizes the frame to specified dimensions.

Actual behavior

If the width/height is smaller than original dimensions, a runtime error (ValueError: not enough image data) is thrown. If it's larger, it resizes, but doesn't change the image's dimensions, giving messed up output.

Investigation

The to_image function uses the frame's original dimensions when constructing the image, as opposed to the after-reformatted dimensions.

(it may also be worth checking the other functions which pass the parameters onto reformat for similar issues)

Versions

  • PyAV runtime: 8.1.0
Assignee
Assign to
Time tracking