GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - activeloopai/deepframe: fast random access on videos over http

BranchesTags
Open more actions menu

Latest commit

 

History

86 Commits
86 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
cmake/modules
cmake/modules
 
 
cpp
cpp
 
 
deepframe
deepframe
 
 
scripts
scripts
 
 
tests
tests
 
 
.clang-format
.clang-format
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
pyproject.toml
pyproject.toml
 
 
pytest.ini
pytest.ini
 
 
requirements-dev.txt
requirements-dev.txt
 
 
setup.py
setup.py
 
 

Repository files navigation

DeepFrame

Python module to extract frames from a video file.

Installation

pip install deepframe

API

Package provides a simple API to get video frames from a video file. The frames are returned as buffer view objects which can be converted to numpy arrays.

import deepframe
import numpy as np

# Extract whole video as a buffer view
buffer_view = deepframe.extract_frames('path/to/video.mp4')
frames = np.asarray(buffer_view)
import deepframe
import numpy as np
# Extract first 100 frames from a video file
buffer_view = deepframe.extract_frames('path/to/video.mp4', slice(0, 100))
frames = np.asarray(buffer_view)
import deepframe
import numpy as np
# Extract each 10th frame from a video file
buffer_view = deepframe.extract_frames('path/to/video.mp4', slice(0, None, 10))
frames = np.asarray(buffer_view)

C++ Build

Requirements

  • vcpkg

You also need to install python requirements. pip install -r requirements-dev.txt

VCPkg Setup

VCPkg is installed via a git repository which a VCPKG_ROOT environment variable points to. The VCPKG_ROOT can be whatever location on your machine you want.

git clone https://github.com/microsoft/vcpkg.git

cd vcpkg
export VCPKG_ROOT=`pwd`

./bootstrap-vcpkg.sh

echo "export VCPKG_ROOT=$VCPKG_ROOT" >> ~/.zshrc # or path to your shell config file
echo "export PATH=$PATH:$VCPKG_ROOT" >> ~/.zshrc # or path to your shell config file

Build

Debug and Release modes are supported. From project root run:

python scripts/build.py debug
python scripts/build.py release

After the build you can find the python package in ./build/{mode} or the latest one is always available in ./deepframe/ which is used to run the tests.

Test

For testing we use pytest. To run all tests simply call from project root.

pytest

Build wheel

From project root call

python -m build

Once the run finishes you will find the files under ./dist/ directory.

About

fast random access on videos over http

Resources

Readme
Apache-2.0 license
Activity
Custom properties

Stars

5 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.