Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .github/ISSUE_TEMPLATE/bug_report.md
100644 → 100755
Empty file.
Empty file modified .github/workflows/ci_linux.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/ci_mac_os.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/ci_windows.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/codeql-analysis.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/python-publish.yml
100644 → 100755
Empty file.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified .whitesource
100644 → 100755
Empty file.
Empty file modified CONTRIBUTING.md
100644 → 100755
Empty file.
Empty file modified DEVELOPMENT.md
100644 → 100755
Empty file.
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified _config.yml
100644 → 100755
Empty file.
215 changes: 121 additions & 94 deletions assets/install_ffmpeg.py
100644 → 100755

Large diffs are not rendered by default.

Empty file modified assets/logo/LICENSE-LOGO
100644 → 100755
Empty file.
Empty file modified assets/logo/logo-banner.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/logo/logo-big.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/logo/logo-info.txt
100644 → 100755
Empty file.
Empty file modified assets/logo/logo-optimized.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/logo/logo-small.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/logo/logo-source.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/rocket.mkv
100644 → 100755
Empty file.
Empty file modified assets/windows_ffmpeg_downloader_at_cwd.py
100644 → 100755
Empty file.
Empty file modified mypy.ini
100644 → 100755
Empty file.
58 changes: 58 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[project]
name = "videohash2"
version = "3.3.3"
authors = [{ name = "Akash Mahanty" }, { name = "Chico Demmenie" }]
description = "Python package for Near Duplicate Video Detection (Perceptual Video Hashing) - Get a 64-bit comparable hash-value for any video."
readme = "README.md"
license.file = "LICENSE"
requires-python = ">=3.7"
keywords = [
'videohash2',
'near duplicate video detection',
'NDVD',
'perceptual video hashing',
'video hashing',
'near duplicate video',
'compare videos',
'video',
'video diff',
]
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Information Technology',
'Operating System :: MacOS',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Operating System :: POSIX :: Linux',
'Operating System :: POSIX :: BSD',
'Topic :: Multimedia :: Video',
'Natural Language :: English',
'Topic :: Software Development :: Build Tools',
'Topic :: Scientific/Engineering :: Image Recognition',
'Typing :: Typed',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: Implementation :: CPython',
]
dependencies = ["Pillow", "ImageHash", "imagedominantcolour", "yt-dlp"]
urls = { 'Source' = 'https://github.com/demmenie/videohash2', 'Documentation' = 'https://github.com/demmenie/videohash2/wiki', 'Tracker' = 'https://github.com/demmenie/videohash2/issues' }


[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"


[tool.hatch.metadata]
allow-direct-references = true


[tool.hatch.build.targets.wheel]
packages = ["videohash2/"]
Empty file modified pytest.ini
100644 → 100755
Empty file.
Empty file modified requirements-test.txt
100644 → 100755
Empty file.
Empty file modified requirements.txt
100644 → 100755
Empty file.
3 changes: 1 addition & 2 deletions setup.cfg
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[metadata]
description-file = README.md
license_file = LICENSE
description_file = README.md

[flake8]
max-line-length = 127
Expand Down
40 changes: 0 additions & 40 deletions setup.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,51 +25,11 @@
author_email=about["__author_email__"],
url=about["__url__"],
download_url=download_url,
keywords=[
"videohash2",
"near duplicate video detection",
"NDVD",
"perceptual video hashing",
"video hashing",
"near duplicate video",
"compare videos",
"video",
"video diff",
],
install_requires=[
"Pillow",
"ImageHash",
"imagedominantcolour",
"yt-dlp",
],
python_requires=">=3.6",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Information Technology",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: POSIX :: Linux",
"Operating System :: POSIX :: BSD",
"Topic :: Multimedia :: Video",
"Natural Language :: English",
"Topic :: Software Development :: Build Tools",
"Topic :: Scientific/Engineering :: Image Recognition",
"Typing :: Typed",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
],
project_urls={
"Source": "https://github.com/demmenie/videohash2",
"Documentation": "https://github.com/demmenie/videohash2/wiki",
"Tracker": "https://github.com/demmenie/videohash2/issues",
},
)
Empty file modified tests/__init__.py
100644 → 100755
Empty file.
1 change: 0 additions & 1 deletion tests/test_collagemaker.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


def test_all():

image_list = [] # when no files(extracted frames) in frames directory
output_path = create_and_return_temporary_directory()
with pytest.raises(CollageOfZeroFramesError):
Expand Down
Empty file modified tests/test_downloader.py
100644 → 100755
Empty file.
20 changes: 12 additions & 8 deletions tests/test_framesextractor.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,28 @@ def test_all():
video_length = 52.3
interval = 1
ffmpeg_path = None
FramesExtractor(video_path, output_dir, video_length,
interval=interval, ffmpeg_path=ffmpeg_path)
FramesExtractor(
video_path, output_dir, video_length, interval=interval, ffmpeg_path=ffmpeg_path
)

with pytest.raises(FileNotFoundError):
video_path = os.path.join(script_path, "thisvideodoesnotexist.mp4")
output_dir = create_and_return_temporary_directory()
FramesExtractor(video_path, output_dir, video_length, interval=1,
ffmpeg_path=None)
FramesExtractor(
video_path, output_dir, video_length, interval=1, ffmpeg_path=None
)

with pytest.raises(FFmpegNotFound):
video_path = os.path.join(script_path, os.path.pardir, "assets", "rocket.mkv")
output_dir = create_and_return_temporary_directory()
ffmpeg_path = os.path.join(output_dir, "ffmpeg")
FramesExtractor(video_path, output_dir, video_length, interval=1,
ffmpeg_path=ffmpeg_path)
FramesExtractor(
video_path, output_dir, video_length, interval=1, ffmpeg_path=ffmpeg_path
)

with pytest.raises(FramesExtractorOutPutDirDoesNotExist):
video_path = os.path.join(script_path, "../assets/rocket.mkv")
output_dir = os.path.join(script_path, "thisdirdoesnotexist/")
FramesExtractor(video_path, output_dir, video_length, interval=1,
ffmpeg_path=None)
FramesExtractor(
video_path, output_dir, video_length, interval=1, ffmpeg_path=None
)
3 changes: 1 addition & 2 deletions tests/test_videoduration.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@


def test_video_duration():

video_path = (
this_dir
+ os.path.sep
Expand All @@ -34,4 +33,4 @@ def test_video_duration():
create_and_return_temporary_directory(),
("thisdirdoesnotexist" + os.path.sep),
)
video_duration(url="https://example.com", path=storage_path)
video_duration(url="https://example.com", path=storage_path)
4 changes: 2 additions & 2 deletions tests/test_videohash.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@


def test_all():

source1 = (
"https://raw.githubusercontent.com/demmenie/videohash2/main/assets/rocket.mkv"
)
Expand Down Expand Up @@ -144,5 +143,6 @@ def __init__(self, hash=None):
)
VideoHash(path=path)


if __name__ == "__main__":
test_all()
test_all()
Loading