Urgent.News

What's breaking now, across thousands of outlets.

Tech

How to Add a Watermark to a Video With FFmpeg (Sized to the Video, Proven With pytest)

To add a watermark to a video with FFmpeg, feed the logo as a second input, scale it relative to the video width, lower its alpha with colorchannelmixer , and place it with overlay using main_w / overlay_w expressions. Map the original audio with -map 0:a? and copy it so only the picture is re-encoded. Below is a ~60-line Python wrapper plus four pytest checks that sample real pixels to prove…

To embed a watermark in a video using FFmpeg, feed the logo as a second input and scale it relative to the video width. Lower the alpha channel of the logo and position it using overlay expressions. Preserve the original audio by mapping it with -map 0:a and copying it, so only the picture is re-encoded. The Python wrapper provided above probes the video dimensions and calculates the watermark size based on a specified width ratio, opacity, and margin ratio. It then generates the appropriate FFmpeg command line to produce the watermarked video file.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Beyond Binary: A Layered Architecture of Clinical Decision Support

Beyond Binary: A Layered Architecture for Clinical Decision Support Summary Diagnostic errors and missed findings are among the leading causes of preventable harm in hospitals, yet most AI-powered…

  • Diagnosis errors and missed findings cause most preventable hospital damages
  • Current AI-based CDSS tools provide binary outputs without uncertainty quantification
  • Proposed three-layer CDSS architecture addresses these problems

Beyond Binary: A Layered Clinical Decision Support Architecture

Beyond Binary: A Layered Clinical Decision Support Architecture Abstract Diagnostic errors and missed findings remain a leading source of preventable harm in hospitals, yet most AI clinical decision…

  • Bayesian Diagnostic Reasoning layer calculates posterior probabilities of diagnoses
  • TimesFM time-series forecasting layer provides dynamic clinical risk monitoring
  • Quantum Approximate Optimization Algorithm layer helps optimize treatment combinations

As VR theaters improve, one question remains

As VR theaters improve, one remaining question arises. UploadVR reported that Quest's Horizon OS 2.10 PTC update is being rolled out, which includes a new Theater environment for media viewing and a…

SteamVR improves streaming image quality — and what about scientific VR?

SteamVR improves streaming image quality — and what about scientific VR? Valve has released a beta update of SteamVR which improves the image quality transmitted to all autonomous headsets compatible with Steam Link (Meta Quest, HTC Vive Focus, PICO).

  • SteamVR beta update improves image quality for autonomous VR headsets like Meta Quest.
  • Three key factors: resolution per eye, latency, stability, color and depth fidelity.

Freeze the Clock Before You Refactor: Characterization Tests for Impure Code

Legacy code is rarely untestable. It is usually just unseeded. A characterization test that reads the wall clock will flake on day two. So freeze the inputs first, then pin the outputs. This is the order that survives review.

  • Characterization tests focus on freezing impure code behavior
  • Inventory impurity via text search, not profiling
  • Frozen behavior verified before code changes

More from Monday 9 November →