Repository navigation
feat: Windows context menu, HDR handling and AV1 input (v1.3.0) - #16
Merged
Merged
Conversation
…ching Segment A copied its audio, which ends on an AAC packet boundary past its last video frame. The concat demuxer offsets segment B by A's full duration, leaving a 40-100 ms video gap at the split and video lagging audio for the second half. Segments are now encoded without audio and the stitch maps the source audio in one piece, via a shared build_audio_args.
The Linux FFmpeg build links libva/libdrm dynamically. On minimal installs without them every FFmpeg call failed in the loader and the user saw only 'Failed to extract video info'. compress_video now starts ffprobe once and, on a loader error, stops with the missing library and install commands.
installer/windows.iss adds a per-user Video-Compression submenu for video files (20 MB, 50 MB, 100 MB, 1 GB, Custom...). The codec is chosen on a setup page; silent installs (WinGet) use HEVC unless /CODEC=h264 is given. --custom asks for the target size on the console. The release workflow builds the installer on the Windows job.
The concat demuxer places the second segment at the first one's reported duration, which includes its start offset. That offset follows the first source frame's duration, so a source that holds its first frame (a screen recording held it 467 ms) shifted everything after the split by ~450 ms. The list now gives the first segment's duration as the split time.
FFmpeg 9 lists encoders as 'A....D aac'; the check only matched 'A.....' and 'A...D.', so audio above 160 kbps was always copied instead of re-encoded to 128 kbps AAC.
Explorer ignored SystemFileAssociations\video on a machine where VLC owns .mp4, so the submenu never appeared. Each extension now points at one shared submenu key through ExtendedSubCommandsKey.
…ile versions numeric
HEVC on a hardware encoder now stays 10-bit (p010, Main 10) with the source's BT.2020 and PQ/HLG tags; before, downscaled encodes dropped to 8-bit while still tagged HDR. H.264 and CPU encodes tone-map HDR to BT.709 SDR with zscale and tonemap after scaling. The build now requires zscale and tonemap from ffmpeg-minimal-builds.
An 8-bit HDR source now stays 8-bit (Main) with its HDR tags instead of being widened to 10-bit.
rc1 and rc2 also registered .wmv, .ts, .mts, .m2ts, .mpg and .mpeg, which the bundled FFmpeg cannot read. Installing over them removes those entries. The README lists the supported types and the unsupported inputs.
The installer/ directory made setuptools discover two top-level packages, so pip install -e . failed, in CI and for installs from source.
Audio is copied unless it is lossless, or is above 160 kbps and would take more than 10% of the target. When it is re-encoded, the video budget reserves 128 kbps instead of the source bitrate. - Audio without a reported bitrate (MKV, WebM) is measured from its packets, so FLAC no longer overshoots the target. - Audio FFmpeg cannot decode (ALAC, MP2) is copied instead of failing.
Adds an HDR & Color tab: what the three terms mean, what the app does with each combination, why tone mapping stays on the CPU, and rc4 benchmarks. Also fixes two page bugs: table cells ignored their color classes, and the tab bar overflowed on narrow screens.
- HLG: zscale's default agamma=1 applies the system gamma per channel. With agamma=0 a phone HLG clip goes from dE 1.4-2.0 to 0.12 against a BT.2100 reference. 4K60 tone mapping takes 1.4-1.5x as long. PQ keeps the default, which is already correct there. - Sources without primaries or matrix tags failed with 'no path between colorspaces'. BT.2020 is assumed for them, and only for them.
ffprobe's stream entry can show the container's tags while the frames have none, and zscale only sees the frames'. Such files still failed to convert. The transfer is now filled in the same way as primaries and matrix.
Safe boxes are turned off, because rich otherwise draws rounded boxes square in legacy Windows consoles, such as the one the right-click menu opens.
The bundled FFmpeg needs NVIDIA driver 610 for NVENC, and the Linux executables need glibc 2.38.
NVENC needs driver 610 since v1.1.4. Re-measure the dataflow and HDR benchmarks on release executables, match the BPP calculator to the app and correct the VA-API overshoot advice.
The CPU path returned a failure, so the exit code was 1. A cancelled CPU encode or GPU stitch also left an unplayable partial file.
Since v1.1.6-pre an existing file or folder named like a size was taken as a path, so a run could use the wrong size or overwrite the input video. Folder names and names without an extension are now rejected.
SimpNick6703
commented
Nov 23, 2026
SimpNick6703
left a comment
Owner
Author
There was a problem hiding this comment.
Reviewed PR #16 — overall the changes are clean, well-tested, and all CI/build checks pass. Left 6 inline comments covering two edge-case bugs (Ctrl+C at the --custom prompt and single-quote escaping in the concat list) plus a few minor improvements (early-exit ordering before audio/HDR probes, _tonemap_args type narrowing, preserving codec choice on silent installer upgrades, and updating the README test table).
A temp folder under a user name such as O'Brien made stitching fail.
Silent upgrades, as WinGet runs them, reset H.264 users to HEVC. The choice is now stored with the install and used unless /CODEC is passed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes for v1.3.0: a Windows right-click installer, HDR10 and HLG handling, AV1 input, a budget-aware audio rule, and fixes for the stutter at the split point and for rotated videos being written sideways.
Pre-release for feedback: v1.3.0-rc5, built from this branch at a526b7a. The rounded tables, the Ctrl+C and file name fixes, the installer note and the documentation updates came after rc5. This stays a draft while feedback comes in.
Requirements
What to try
VideoCompression-Setup-win64-1.3.0-rc5.exe, then right-click a video (under Show more options on Windows 11)._compress-error.logfile if one fails.Changes
Windows installer
.mp4,.mkv,.mov,.avi,.webm,.m4v,.flvand.3gp.--customflag for the Custom menu entry.HDR and AV1
agamma=0, so the system gamma is applied on luminance. HDR10 keeps the faster default, which is already correct for it.zscale.Fixes
'(for example a user named O'Brien).20is always a size. Since v1.1.6-pre an item named20in the working directory changed the target, and could make the app overwrite the input.Console
Build and docs
build.pyrequires thezscaleandtonemapfilters.pyproject.tomlpackages onlyvideocompress, sopip install -e .works with theinstaller/directory present.tools/bench_vitals.pyis removed.Behaviour changes to review
/CODECoverrides it. A first silent install uses HEVC.Benchmarks
RTX 4060 laptop (NVENC), release executables.
rc5 against v1.2.0, HEVC. The 110 MB rows are the mean of two runs, the others one run:
Cost of converting HDR to SDR, 8.5 s 4K60 HDR10 at 20 MB, mean of two runs:
HLG to H.264, 4K60:
HLG colour error (dE against an independent BT.2100 reference, lower is better):
Testing
/CODECkeep the choice across upgrades, and uninstalling leaves nothing behind.Not tested
Known issues, not fixed here
.ts,.mts,.m2ts,.wmv,.mpg,.mpeg, and VP8, ProRes or FLV1 video are not supported.Before publishing v1.3.0
main, so publish after merging.