Skip to content

v0.1.8

Choose a tag to compare

@YKLovePython YKLovePython released this 06 Nov 16:26
· 21 commits to main since this release

Failure modes, mostly. The kind that leave you with a file you think is fine.

  • A failed, cancelled, or interrupted encode no longer leaves a half-written video at the output path. It writes a hidden .part file next to the destination and only renames it once FFmpeg exits cleanly
  • Ctrl+C stops the running FFmpeg instead of leaving it behind, and prints cancelled with exit code 130
  • The local web app has a Cancel button, and closing the tab stops the encode after a ten-second grace period instead of letting FFmpeg run to completion
  • The web app can switch the player between the original and the compressed file, and warns when the browser cannot decode H.265
  • The web app retires the oldest uploads past the tenth, so a tab left open all day does not fill the temp directory
  • Replacing an output that another program has open now fails with a clear message and keeps the finished file, instead of deleting it
  • The version now comes from package.json alone. scripts/bump-site.mjs syncs the site and READMEs, and a test fails if they drift
  • The local app refuses a text file, an image, or an empty file with a readable message, instead of accepting it and failing later with a path to ffprobe
  • Uploaded file names are reduced to a bare file name, so nothing like ../../evil.mp4 can reach the download header
  • Malformed request bodies return 400 instead of 500, and impossible byte ranges return 416 instead of a broken stream
  • Both the CLI and the web app now say when tracks are dropped: extra audio tracks, subtitles, surround audio downmixed to stereo, and frame rates above 60 fps
  • --out refuses to overwrite the input file, and --crf, --preset, --codec, and --port are validated before encoding starts
  • Low-frame-rate sources are left alone. A 5 fps timelapse used to be forced up to 10 fps, which duplicated frames and inflated the bitrate the planner assumed

Install

npx halfsize@0.1.8 video.mp4 --to 20mb

Full changelog: https://github.com/YKLovePython/halfsize/blob/main/CHANGELOG.md