Skip to content

Processing Larger Files #1089

Answered by LinasKo
Adam-Arrayen asked this question in Q&A
Apr 3, 2024 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

That's an environmental variable. Typically they're set outside the Python script. A few examples, but I recommend option 3:

  1. If you're running in a Linux / Mac terminal for just one session, you can run:
OPENCV_FFMPEG_READ_ATTEMPTS=16384
python your_python_script_with_supervision.py
  1. Or, as I did:
OPENCV_FFMPEG_READ_ATTEMPTS=16384 python your_python_script_with_supervision.py
  1. A cleaner way is to use .env files.

Create a file that's just called .env, inside it only write:

OPENCV_FFMPEG_READ_ATTEMPTS=16384

(other env variables would be in seperate lines, no need for any commas at the end or anything)

Then, when you have an env file, you need to load it in python. pip install python-dotenv

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@Adam-Arrayen
Comment options

Comment options

You must be logged in to vote
2 replies
@Adam-Arrayen
Comment options

@LinasKo
Comment options

Answer selected by Adam-Arrayen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants