Useful commands for managing a pip environment:
- Source the pip environment before running a Python script:
source .venv/bin/activate - Freeze dependencies:
pip freeze > requirements.txt - Install dependencies:
pip install -r requirements.txt
From the root of the project, run:
pytest -q- List available video devices:
sudo apt install v4l-utils
v4l2-ctl --list-devices- Record and save a video:
ffmpeg -f v4l2 -i /dev/video2 -r 10 -s 640x480 -t 5 output.mp4- Display info about a video file:
ffprobe output.mp4