nadermx / backgroundremover

Background Remover lets you Remove Background from images and video using AI with a simple command line interface that is free and open source.
https://www.backgroundremoverai.com
MIT License
6.7k stars 558 forks source link

Error while input mp4 file: nb_frames attribute not present in video stream #57

Closed AqueelAhmedV closed 1 year ago

AqueelAhmedV commented 1 year ago

Relevant part of the error message:

"<HOMEDIR>/.local/lib/python3.8/site-packages/backgroundremover/utilities.py", line 80, in matte_key
    total_frames = int(info["streams"][0]["nb_frames"])
KeyError: 'nb_frames'

I think some video streams wont have nb_frames attribute and the no. of frames will have to be obtained in a different way, Please fix this error.

nadermx commented 1 year ago

What version of ffmpeg are you using?

nadermx commented 1 year ago

Try newest release https://github.com/nadermx/backgroundremover/releases/tag/v0.2.1