Skip to content
Merged
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
4 changes: 4 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# The C runtime is linked into the executable: without it, the program needs Microsoft's Visual C++
# Redistributable (VCRUNTIME140.dll), which a fresh Windows does not have. One .exe, nothing to install.
[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]
19 changes: 13 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,17 @@ jobs:
shell: pwsh
run: choco install ffmpeg --yes --no-progress

# The executable embeds the third-party notices, generated by cargo-about.
- uses: taiki-e/install-action@v2
with:
tool: cargo-about@0.9
fallback: none

# The same checklist a developer runs: fmt, clippy -D warnings, rustdoc -D warnings, tests,
# documentation links, no video or personal path tracked, the release build and its zip. One script,
# so CI and a developer's machine cannot drift apart.
- name: Test, build and zip
# documentation links, no video or personal path tracked, then the release executable (with its
# commit and third-party notices inside) and its checksum. One script, so CI and a developer's
# machine cannot drift apart.
- name: Test and build the release executable
shell: pwsh
run: .\scripts\build.ps1 release

Expand All @@ -66,10 +73,10 @@ jobs:
$version = (Select-String -Path Cargo.toml -Pattern '^version\s*=\s*"([^"]+)"').Matches[0].Groups[1].Value
"version=$version" >> $env:GITHUB_OUTPUT

# GitHub serves every artifact as a zip of its own: level 0 keeps it a plain container around the zip.
- uses: actions/upload-artifact@v7
with:
name: quick-video-transcoder-${{ steps.version.outputs.version }}-windows-x64
path: dist/*.zip
compression-level: 0
path: |
dist/quick-video-transcoder.exe
dist/SHA256SUMS.txt
if-no-files-found: error
32 changes: 15 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
name: Release

# A tag alone produces the release: push vX.Y.Z and this runs the same checklist a developer runs, builds
# the zip from that exact commit, attests it, and publishes it with its checksum. Nothing is built or
# uploaded by hand.
# the executable from that exact commit, attests it, and publishes it with its checksum. Nothing is built
# or uploaded by hand.

on:
push:
tags: ['v*']

# Publishing, and the attestation: the OIDC token signs it, the others store it with the files it vouches
# for.
# Publishing, and the attestation: the OIDC token signs it, `attestations` stores it.
permissions:
contents: write
id-token: write
attestations: write
artifact-metadata: write

concurrency:
group: release-${{ github.ref }}
Expand Down Expand Up @@ -48,22 +46,22 @@ jobs:
}
"QVT_VERSION=$version" | Add-Content $env:GITHUB_ENV

- name: Test, build and zip
- uses: taiki-e/install-action@v2
with:
tool: cargo-about@0.9
fallback: none

# quick-video-transcoder.exe, SHA256SUMS.txt and notes.md (the changelog section of this version),
# all in dist\.
- name: Test, build and package
shell: pwsh
run: .\scripts\build.ps1 release

# The section of the changelog for this version is the release's notes; no section, no release.
- name: Checksum and notes
# No dated changelog section, no release: the tag stays without one until it is fixed.
- name: The changelog has this version's notes
shell: pwsh
run: |
$zip = "dist\quick-video-transcoder-$env:QVT_VERSION-windows-x64.zip"
$hash = (Get-FileHash $zip -Algorithm SHA256).Hash.ToLowerInvariant()
"$hash $(Split-Path -Leaf $zip)" | Set-Content -NoNewline -Encoding ascii dist\SHA256SUMS.txt
$changelog = Get-Content CHANGELOG.md -Raw
$pattern = "(?ms)^## \[$([regex]::Escape($env:QVT_VERSION))\] - \d{4}-\d{2}-\d{2}\s*$(.*?)(?=^## \[|\z)"
$match = [regex]::Match($changelog, $pattern)
if (-not $match.Success) { throw "CHANGELOG.md has no dated section for $env:QVT_VERSION" }
$match.Groups[1].Value.Trim() | Set-Content -Encoding utf8 dist\notes.md
if (-not (Test-Path dist\notes.md)) { throw "CHANGELOG.md has no dated section for $env:QVT_VERSION" }

- name: Attest the release files
uses: actions/attest@v4
Expand All @@ -76,7 +74,7 @@ jobs:
GH_TOKEN: ${{ github.token }}
run: |
gh release create $env:GITHUB_REF_NAME `
"dist\quick-video-transcoder-$env:QVT_VERSION-windows-x64.zip" `
dist\quick-video-transcoder.exe `
dist\SHA256SUMS.txt `
--title "Quick Video Transcoder $env:QVT_VERSION" `
--notes-file dist\notes.md `
Expand Down
20 changes: 18 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ src/plan.rs frame rates, sizes, ladder, budget src/estimate.rs si
src/encode.rs encode, size check, retry src/naming.rs output and partial names
src/ffmpeg/ probe, encoders, filters, hardware, decoder (preview), audio
src/player.rs preview playback src/audio.rs cpal output and clock src/thumbnails.rs strip
src/main.rs arguments, log file, crash box, window src/instance.rs one window, later launches' files
src/sendto.rs the Send to shortcut src/build_info.rs + build.rs version, commit, icon
assets/icon/ the icon: SVG source, .ico and .png from scripts/render-icon.ps1
tests/pipeline.rs end to end on synthetic clips examples/transcode.rs measurement on a video
```

Expand All @@ -57,6 +60,8 @@ tests/pipeline.rs end to end on synthetic clips examples/transcode.rs
- egui: `lost_focus()` lasts two frames, apply a text field only if the user typed in it (`time_edit`);
sliders use `SliderClamping::Edits`. Some symbols are missing from egui's fonts (arrows, most emoji): check
a screenshot after adding one.
- `QVT_PRETEND_NO_FFMPEG=1` (debug builds) shows the *FFmpeg is needed* window without uninstalling
FFmpeg. Never click *Install FFmpeg for me* while testing: it really runs winget.
- Checking the UI without driving it: `QVT_SCREENSHOT=<file.ppm>` saves the window once the queue is
estimated and the preview shows a frame, then quits. Run it on synthetic clips in a scratch folder.

Expand All @@ -65,9 +70,16 @@ tests/pipeline.rs end to end on synthetic clips examples/transcode.rs
```powershell
.\scripts\build.ps1 # fmt, clippy -D warnings, rustdoc -D warnings, tests, doc links, no video / personal path
.\scripts\build.ps1 build # + release build
.\scripts\build.ps1 release # + clean tree, zip in dist\
.\scripts\build.ps1 release # + clean tree, notices, the .exe, SHA256SUMS.txt and notes.md in dist\ (needs cargo-about)
```

- **One file.** A release is `quick-video-transcoder.exe` alone: static C runtime, icon, third-party
notices (`--licenses`, *About*) inside. FFmpeg stays outside, found on the `PATH` or installed with
winget on the user's request. Keep it that way: nothing a user must unpack or install beside it.
- **Documentation ships at its commit.** `build.rs` stamps the commit into the executable; *About* and
`--version` link the documentation *of that commit*. A change updates the README, `docs/` and module doc
comments in the same commit, or the build that carries it links stale pages forever.

- Run `test` before every commit and read its whole output; never pipe it into `Select-Object -First`.
- Commit only when asked. Messages say what and why, ending with the `Co-Authored-By` line.
- **The changelog is the agent's to write**: each line is something the user sees or does, under *Added*,
Expand All @@ -81,7 +93,11 @@ tests/pipeline.rs end to end on synthetic clips examples/transcode.rs
## Pitfalls that have already cost time

- Shell heredocs and inline strings eat backslashes: any script with a backslash goes through a file
written by an editing tool, never a heredoc.
written by an editing tool, never a heredoc. A Python heredoc editing a workflow turned `\b` into a
backspace and `\n` into a line break in `release.yml` (2026-11-23).
- A PowerShell regex built in a double-quoted string runs `$(...)` as a subexpression: the release notes
pattern did, and would have failed the first tag. Build patterns from single-quoted pieces; `build.ps1`
tests the extraction on a sample changelog every run.
- A shell started by the Claude desktop app may read `%APPDATA%` through the package's private copy: the
profiles file seen from such a shell may not be the one the application reads.
- `-hwaccel vulkan` silently falls back to software decoding for a codec Vulkan cannot decode, and
Expand Down
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,26 @@ refuses a tag without one.
is read as 59.94 fps and encoded at 29.97 fps, not 28.
- *Copy* puts encoded files on the clipboard, ready to paste into a conversation; *Show* opens their
folder.
- `install-sendto.ps1` adds the application to Explorer's *Send to* menu.
- *File → Add to Explorer's Send to menu* adds the application to *Send to*, no script needed; *Remove*
takes it away.
- One window at a time: videos sent while the window is open join its queue.
- An icon, for the program, its window, the taskbar and *Send to*, and a version in the file's
properties.
- *Help → About* shows the version and the commit it was built from, and *Help → Documentation* opens the
documentation as it was for that build.
- If FFmpeg is missing or too old, a window says how to install it, offers to do it with winget, and
checks again; FFmpeg installed while Windows was running is found without signing out.
- A log of the last two runs in the data folder, and a message naming it if the window cannot open or
the application stops.
- One file, nothing to install: the release is `quick-video-transcoder.exe` alone, the C runtime and the
third-party licences inside (*Help → About*). Replacing the file updates it.

### Fixed

- The buttons' symbols are monochrome again, drawn with the window's own fonts instead of the
system's colour emoji.
- A GPU encoder is only used if it accepts the options the encode needs (B-frames, lookahead,
multipass), so an older GPU no longer fails every estimate.
- AV1 on the CPU (SVT-AV1) works: its encode was refused for a peak rate it does not support.
- With only CPU encoders, the queue no longer pauses for minutes to measure parallel encodes: one encode
at a time, which already uses every core.
10 changes: 8 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,16 @@ FFmpeg on the `PATH` for the end-to-end test. Before committing, run the same ch
```powershell
.\scripts\build.ps1 # fmt, clippy, rustdoc, tests, doc links, no video or personal path tracked
.\scripts\build.ps1 build # the same, then a release build
.\scripts\build.ps1 release # from a clean tree: the same, then the zip in dist\
.\scripts\build.ps1 release # from a clean tree: the same, then the release .exe and its checksum in dist\
```

Warnings are errors, in clippy and in rustdoc.
Warnings are errors, in clippy and in rustdoc. The C runtime is linked statically (`.cargo/config.toml`),
so the executable runs without the Visual C++ Redistributable. The third-party notices it embeds need
[cargo-about](https://github.com/EmbarkStudios/cargo-about) (`cargo install cargo-about --locked --features cli`);
`about.toml` lists the licences accepted. The icon and the version block are compiled in by `build.rs`
with `rc.exe` from the Windows SDK (installed with the MSVC build tools); without it the build still works,
without an icon. After editing `assets/icon/quick-video-transcoder.svg`, run `.\scripts\render-icon.ps1`
(needs Microsoft Edge) and commit the three files.

Measuring the size fitting on a real video, without the window (the video is only read; the output folder
must exist and differ from the video's):
Expand Down
51 changes: 36 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,35 @@ Nothing is ever overwritten: an output name that exists gets ` (2)`, and the sou

## Requirements

- Windows 10 or 11 (64-bit). Linux and macOS build, but are not tested.
- [FFmpeg](https://ffmpeg.org/download.html) 7 or later on the `PATH`, for instance the *full* build from
[gyan.dev](https://www.gyan.dev/ffmpeg/builds/) or `winget install Gyan.FFmpeg`. GPU tone mapping needs
an FFmpeg built with libplacebo and Vulkan (the gyan.dev full build is); without it the CPU filters are
used.
- A GPU encoder makes it fast: NVIDIA NVENC, Intel Quick Sync or AMD AMF. The CPU encoders work too.
- Windows 10 or 11 (64-bit), with a graphics driver supporting DirectX 12 or Vulkan. Linux and macOS
build, but are not tested.
- [FFmpeg](https://ffmpeg.org/download.html) 7 or later, a separate free program. If it is missing, the
application says so and, when Windows' package manager winget is there, offers to install it for you
(the `Gyan.FFmpeg` package, for your account only); it is then found without signing out. To install it
yourself: `winget install --id Gyan.FFmpeg -e` in Terminal, or the *release full* build from
[gyan.dev](https://www.gyan.dev/ffmpeg/builds/) with its `bin` folder added to the `Path`. GPU tone
mapping needs an FFmpeg built with libplacebo and Vulkan (the gyan.dev full build is); without it the
CPU filters are used.
- A GPU encoder makes it fast: NVIDIA NVENC, Intel Quick Sync or AMD AMF. The CPU encoders work too,
slowly. **Tested on NVIDIA GPUs only**: Quick Sync and AMF are detected and used, but have not been
tried on real hardware yet.

## Install

1. Download the zip from the [latest release](https://github.com/Geeooff/quick-video-transcoder/releases/latest)
and extract it where you keep your tools.
2. To add it to Explorer's *Send to* menu, run the script that comes with it:
Nothing to install: the program is one file.

```powershell
.\install-sendto.ps1
```
1. Download `quick-video-transcoder.exe` from the
[latest release](https://github.com/Geeooff/quick-video-transcoder/releases/latest) and put it where
you keep your tools.
2. Start it. The program is not signed, so the first time Windows may show *Windows protected your PC*:
click *More info*, then *Run anyway*. To check the download first, compare it with `SHA256SUMS.txt` on
the release page, or verify where it was built with
`gh attestation verify quick-video-transcoder.exe --repo Geeooff/quick-video-transcoder`.
3. *File → Add to Explorer's Send to menu*. Moved the file? Do it again: the shortcut follows.
*File → Remove from Explorer's Send to menu* takes it away.

`.\install-sendto.ps1 -Remove` takes it away.
To update, replace the file with the new one (same name: the *Send to* shortcut keeps working). Only one
window opens: videos sent while it is open join its queue.

## Use

Expand All @@ -59,7 +70,15 @@ Nothing is ever overwritten: an output name that exists gets ` (2)`, and the sou
application measures it once, in a few seconds, the first time it runs on a GPU.
5. *Copy* on an encoded video, then paste it into the conversation.

Keyboard shortcuts are under *Help*.
Keyboard shortcuts are under *Help*, with *About* (the version, and this documentation as it was for
that version).

## When something goes wrong

The application keeps a log of its last two runs in its data folder (*Profiles → Open profiles.toml
folder*): `quick-video-transcoder.log` and `quick-video-transcoder.previous.log`. *View → Log* shows the
current one in the window. If the window cannot open or the application stops, a message says why and
names the log; attach it to an [issue](https://github.com/Geeooff/quick-video-transcoder/issues).

## Profiles

Expand Down Expand Up @@ -109,4 +128,6 @@ for what is documented and how to measure it.

## License

MIT. See [LICENSE](LICENSE). FFmpeg is not included; it has its own licenses.
MIT. See [LICENSE](LICENSE). The libraries built in are listed with their licences in the program
(*Help → About*, *third-party libraries and their licences*). FFmpeg is not included; it has its own
licenses.
34 changes: 34 additions & 0 deletions about.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Quick Video Transcoder: third-party notices</title>
<style>
body { font-family: system-ui, sans-serif; max-width: 60rem; margin: 2rem auto; padding: 0 1rem; color: #222; }
h1 { font-size: 1.4rem; } h2 { font-size: 1.1rem; margin-top: 2.5rem; }
ul.used { columns: 3; font-size: 0.9rem; }
pre { white-space: pre-wrap; background: #f4f4f4; padding: 1rem; font-size: 0.8rem; }
</style>
</head>
<body>
<h1>Third-party notices</h1>
<p>Quick Video Transcoder is built with the open-source libraries below, under the licences that
follow. FFmpeg is not included: it is a separate program, installed by the user.</p>
<h2>Licences used</h2>
<ul>
{{#each overview}}
<li><a href="#{{id}}">{{name}}</a> ({{count}})</li>
{{/each}}
</ul>
{{#each licenses}}
<h2 id="{{id}}">{{name}}</h2>
<p>Used by:</p>
<ul class="used">
{{#each used_by}}
<li><a href="{{#if crate.repository}}{{crate.repository}}{{else}}https://crates.io/crates/{{crate.name}}{{/if}}">{{crate.name}} {{crate.version}}</a></li>
{{/each}}
</ul>
<pre>{{text}}</pre>
{{/each}}
</body>
</html>
22 changes: 22 additions & 0 deletions about.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# cargo-about: the licences the third-party notices may contain (scripts\build.ps1 release fails on any
# other, so a dependency under a new licence is a decision, not an accident).
accepted = [
"MIT",
"Apache-2.0",
"Apache-2.0 WITH LLVM-exception",
"BSD-2-Clause",
"BSD-3-Clause",
"BSL-1.0",
"ISC",
"Zlib",
"Unicode-3.0",
"Unicode-DFS-2016",
"OFL-1.1",
"Ubuntu-font-1.0",
"MPL-2.0",
"CC0-1.0",
"MIT-0",
]
targets = ["x86_64-pc-windows-msvc"]
ignore-build-dependencies = true
ignore-dev-dependencies = true
Binary file added assets/icon/quick-video-transcoder-256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icon/quick-video-transcoder.ico
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions assets/icon/quick-video-transcoder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading