Skip to content

Commit 6afbd35

Browse files
committed
[dist] Prepare for v0.6.4 release.
1 parent e8fede7 commit 6afbd35

File tree

5 files changed

+48
-22
lines changed

5 files changed

+48
-22
lines changed

appveyor.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ install:
4646
- echo * * BUILDING WINDOWS EXE * *
4747
- echo * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
4848
# Build Windows .EXE and create portable .ZIP
49+
- python dist/pre_release.py
4950
- pyinstaller dist/scenedetect.spec
5051
- sphinx-build -b singlehtml docs dist/scenedetect/docs
5152
- mkdir dist\scenedetect\thirdparty
@@ -68,7 +69,7 @@ install:
6869
- appveyor-tools\secure-file -decrypt license65.dat.enc -secret %ai_license_secret% -salt %ai_license_salt%
6970
- appveyor DownloadFile https://www.advancedinstaller.com/downloads/advinst.msi
7071
- msiexec /i advinst.msi /qn
71-
- 'SET PATH=%PATH%;C:\\Program Files (x86)\\Caphyon\\Advanced Installer 21.5\\bin\\x86'
72+
- 'SET PATH=%PATH%;C:\\Program Files (x86)\\Caphyon\\Advanced Installer 21.8.1\\bin\\x86'
7273
# License path must be absolute
7374
- AdvancedInstaller.com /RegisterOffline "%cd%\license65.dat"
7475
# Create MSI installer

dist/.version_info renamed to dist/pre_release.py

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,40 @@
1-
# UTF-8
2-
#
3-
# TODO: Generate this using Python.
1+
# -*- coding: utf-8 -*-
2+
import os
3+
import sys
4+
import xml
5+
sys.path.append(os.path.abspath("."))
6+
7+
import scenedetect
8+
VERSION = scenedetect.__version__
9+
10+
11+
installer_aip = ''
12+
with open("dist/installer/PySceneDetect.aip", "r") as f:
13+
installer_aip = f.read()
14+
15+
aip_version = f"<ROW Property=\"ProductVersion\" Value=\"{VERSION}\" Options=\"32\"/>"
16+
17+
assert aip_version in installer_aip, f"Installer project version does not match {VERSION}."
18+
19+
with open("dist/.version_info", "wb") as f:
20+
v = VERSION.split(".")
21+
assert 2 <= len(v) <= 3, f"Unrecognized version format: {VERSION}"
22+
23+
if len(v) == 3:
24+
(maj, min, pat) = int(v[0]), int(v[1]), int(v[2])
25+
else:
26+
(maj, min, pat) = int(v[0]), int(v[1]), 0
27+
28+
f.write(f"""# UTF-8
429
#
530
# For more details about fixed file info 'ffi' see:
631
# http://msdn.microsoft.com/en-us/library/ms646997.aspx
732
VSVersionInfo(
833
ffi=FixedFileInfo(
934
# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)
1035
# Set not needed items to zero 0.
11-
filevers=(0, 6, 3, 0),
12-
prodvers=(0, 6, 3, 0),
36+
filevers=(0, {maj}, {min}, {pat}),
37+
prodvers=(0, {maj}, {min}, {pat}),
1338
# Contains a bitmask that specifies the valid bits 'flags'r
1439
mask=0x3f,
1540
# Contains a bitmask that specifies the Boolean attributes of the file.
@@ -33,13 +58,14 @@
3358
u'040904B0',
3459
[StringStruct(u'CompanyName', u'github.com/Breakthrough'),
3560
StringStruct(u'FileDescription', u'www.scenedetect.com'),
36-
StringStruct(u'FileVersion', u'v0.6.3'),
61+
StringStruct(u'FileVersion', u'{VERSION}'),
3762
StringStruct(u'InternalName', u'PySceneDetect'),
3863
StringStruct(u'LegalCopyright', u'Copyright © 2024 Brandon Castellano'),
3964
StringStruct(u'OriginalFilename', u'scenedetect.exe'),
4065
StringStruct(u'ProductName', u'PySceneDetect'),
41-
StringStruct(u'ProductVersion', u'v0.6.3')])
66+
StringStruct(u'ProductVersion', u'{VERSION}')])
4267
]),
4368
VarFileInfo([VarStruct(u'Translation', [1033, 1200])])
4469
]
4570
)
71+
""".encode())

scenedetect.cfg

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@
119119

120120

121121
[detect-hash]
122-
# Threshold value from 0.0 and 1.0 representing the normalized difference between
123-
# perceptual hashes that is required to trigger a shot change.
122+
# Threshold between 0.0 and 1.0 to set the relative difference between
123+
# hashes required to trigger a shot change. Lower values are more sensitive.
124124
#threshold = 0.395
125125

126126
# The ratio between 1 and 256 of how much low frequency information to keep.
@@ -137,11 +137,10 @@
137137

138138

139139
[detect-hist]
140-
# Threshold value from 0.0 to 1.0 representing the difference between Y channel
141-
# histograms after frame is converted to YUV. Values closer to 1.0 require higher
142-
# correlation (more similar to current frame), while lower values allow lower
143-
# correlation (higher difference between current frame).
144-
#threshold = 0.95
140+
# Threshold between 0.0 to 1.0 to set the relative difference between Y
141+
# channel histograms (YUV) required to trigger a shot change. Lower values
142+
# are more sensitive.
143+
#threshold = 0.05
145144

146145
# Number of bins between 1 and 256 to use for the histogram.
147146
#bins = 256

scenedetect/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
# Used for module identification and when printing version & about info
4949
# (e.g. calling `scenedetect version` or `scenedetect about`).
50-
__version__ = '0.7-dev0'
50+
__version__ = '0.6.4'
5151

5252
init_logger()
5353
logger = getLogger('pyscenedetect')

scenedetect/_cli/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ def _print_command_help(ctx: click.Context, command: click.Command):
155155
invoke_without_command=True,
156156
epilog="""Type "scenedetect [command] --help" for command usage. See https://scenedetect.com/docs/ for online docs."""
157157
)
158-
# We cannot make this a required argument otherwise we will reject commands of the form
159-
# `scenedetect help detect-content` or `scenedetect detect-content --help`.
158+
# *NOTE*: Although input is required, we cannot mark it as `required=True`, otherwise we will reject
159+
# commands of the form `scenedetect detect-content --help`.
160160
@click.option(
161161
'--input',
162162
'-i',
@@ -767,7 +767,7 @@ def detect_hist_command(ctx: click.Context, threshold: Optional[float], bins: Op
767767
768768
{scenedetect_with_video} detect-hist
769769
770-
{scenedetect_with_video} detect-hist --threshold 0.8 --size 64 --lowpass 3
770+
{scenedetect_with_video} detect-hist --threshold 0.1 --bins 240
771771
"""
772772
assert isinstance(ctx.obj, CliContext)
773773

@@ -800,13 +800,13 @@ def detect_hist_command(ctx: click.Context, threshold: Optional[float], bins: Op
800800
(USER_CONFIG.get_help_string("detect-hash", "size")))
801801
@click.option(
802802
"--lowpass",
803-
"-h",
803+
"-l",
804804
metavar="FRAC",
805805
type=click.IntRange(CONFIG_MAP["detect-hash"]["lowpass"].min_val,
806806
CONFIG_MAP["detect-hash"]["lowpass"].max_val),
807807
default=None,
808808
help=("How much high frequency information to filter from the DCT. 2 means keep lower 1/2 of "
809-
"the frequency data, 4 means only keep 1/4, etc....%s" %
809+
"the frequency data, 4 means only keep 1/4, etc...%s" %
810810
(USER_CONFIG.get_help_string("detect-hash", "lowpass"))))
811811
@click.option(
812812
"--min-scene-len",
@@ -817,7 +817,7 @@ def detect_hist_command(ctx: click.Context, threshold: Optional[float], bins: Op
817817
help="Minimum length of any scene. Overrides global min-scene-len (-m) setting."
818818
" TIMECODE can be specified as exact number of frames, a time in seconds followed by s,"
819819
" or a timecode in the format HH:MM:SS or HH:MM:SS.nnn.%s" %
820-
("" if USER_CONFIG.is_default("detect-hist", "min-scene-len") else USER_CONFIG.get_help_string(
820+
("" if USER_CONFIG.is_default("detect-hash", "min-scene-len") else USER_CONFIG.get_help_string(
821821
"detect-hash", "min-scene-len")))
822822
@click.pass_context
823823
def detect_hash_command(ctx: click.Context, threshold: Optional[float], size: Optional[int],

0 commit comments

Comments
 (0)