Why Invisible Watermarking Matters

Invisible watermarking embeds a persistent signal directly into media—subtly altering pixel values or waveforms—so that software can later detect where content originated. Unlike metadata tags, which are easily stripped during re-encoding or editing, the redundant design of a well-built watermark survives transcodes. This makes it useful for answering questions that are otherwise hard to resolve at platform scale:

  • Who published the video first? Multiple accounts may post the same clip with no visual clue about the original uploader. A watermark can identify the earliest posting.
  • Is this real or AI-generated? As generative video becomes more realistic, watermarking offers a way to infer whether content was produced by an AI system.
  • What source or tool created this? Invisible watermarks can carry information about the camera or software used to produce a video.

Visual watermarks are distracting, and metadata is fragile. Invisible watermarking is a stronger alternative for content provenance because it is both imperceptible and robust to downstream edits.

From Signal Processing to Neural Networks

Early digital watermarking research in the 1990s relied on digital signal processing techniques such as DCT and DWT, which modify an image's spectral properties to embed hidden information. These methods worked well for static images and were seen as a solved problem, but they do not hold up against the geometric transformations and filtering common on social media platforms.

Modern solutions like VideoSeal use machine learning to achieve significantly better robustness to real-world edits. However, applying such models frame-by-frame to video is computationally expensive without careful inference optimization.

Why GPUs Were Not the Obvious Answer

GPU hardware is often the default choice for ML workloads, but it is not always the best fit for video processing. Deployment environments, hardware capabilities, and existing pipeline architecture all shape the decision.

The embedding architecture in question uses FFmpeg with a custom filter that computes and applies invisible watermark masks. This filter is a reusable block that can be added to existing video processing pipelines. Moving to a separate optimized inference service for warmed-up models would have meant abandoning that flexibility—an unacceptable trade-off for this application.

Profiling the watermarking filter revealed low GPU utilization. Frame batching and threading were added to the filter, but neither meaningfully improved latency or utilization. The GPUs available for the service also lacked hardware video encoders, requiring frames to be sent back to the CPU for encoding. A software video encoder can become a major bottleneck in pipelines that use low-complexity ML models on a GPU.

Three bottlenecks stood out:

  • Data transfer overhead: Moving high-resolution input frames between CPUs and multiple GPUs complicated thread and memory optimizations and kept GPU utilization suboptimal.
  • Inference latency: Running multiple watermarking requests across several GPUs in parallel on the same host dramatically increased per-request latency.
  • Model loading time: Even though the model is small, loading it consumed a significant share of total processing time. Because of the FFmpeg dependency, warmed-up pre-loaded models on the GPUs were not an option.

Making CPUs Competitive

Given these limitations, the team investigated CPU-only inference. The embedder's neural network architecture favors GPUs, and initial end-to-end benchmarks showed CPU performance was more than two times slower. However, tuning threading parameters for the encoder, decoder, and PyTorch, as well as optimizing the sampling parameters used by the watermarking filter, led to significant gains.

With the right settings, end-to-end latency for a single CPU process came within 5% of GPU performance. The key advantage was that multiple FFmpeg processes could run in parallel on CPUs without added latency. That made it possible to calculate capacity needs precisely and build a more operationally efficient solution than a GPU-based alternative.

Load tests at increasing request rates against a pool of CPU workers confirmed the approach scaled in a distributed system. Peak performance was measured before per-request latency began to rise, and the results matched local findings. The CPU solution held up at scale with comparable performance to GPUs.

The Four-Way Trade-off

Production deployment of invisible watermarking involves juggling four competing metrics:

  • Latency: how quickly the watermarking process completes
  • Watermark detection bit-accuracy: how reliably the embedded data is decoded later
  • Visual quality: keeping the watermark invisible to the human eye
  • Compression efficiency (BD-Rate): limiting bitrate increases caused by the watermark's added entropy

Improving one metric often harms another. A stronger watermark may boost bit accuracy but can introduce visible artifacts and higher bitrate. No single solution can be optimal across all four dimensions simultaneously.

Minimizing Bitrate Impact

An invisible watermark increases the entropy of the video signal, which typically raises the bitrate required for encoding. The initial implementation showed a BD-Rate regression of about 20%, meaning viewers would need more bandwidth to watch watermarked content. To address this, the team devised a frame-selection method that determines which frames get watermarked. This approach substantially reduced BD-Rate impact while also improving visual quality and only minimally affecting watermark bit detection accuracy.

Fixing What Metrics Could Not See

Traditional quality metrics (VMAF and SSIM) reported high scores even when noticeable visual artifacts were present. The team addressed this through a custom post-processing technique and iterated on embedding settings based on crowdsourced manual inspections. This subjective evaluation proved necessary, as standard metrics could not detect the specific artifacts introduced by invisible watermarking. Throughout the tuning process, bit accuracy was monitored closely to find the right balance between invisibility and detection reliability.

Key Takeaways

The deployment journey yielded several lessons that apply beyond this specific use case:

  • CPUs can beat GPUs for narrow workloads when properly optimized. Contrary to initial assumptions, a CPU-only pipeline with tuned threading and embedding parameters proved more operationally efficient and scalable than a GPU-based approach. GPUs are still faster for raw model inference, but the overall compute and latency advantages shifted in favor of CPUs for this particular pipeline.
  • Established video quality metrics are inadequate for invisible watermarking. VMAF and SSIM missed artifacts that humans readily noticed. Manual inspection was essential, and more research is needed into a metric that can programmatically identify the visual-quality loss introduced by invisible watermarking.
  • Production quality demands more than published techniques deliver. Academic watermarking methods do not always map cleanly onto real-world use because of their impact on BD-Rate and downstream video compression. The literature had to be extended to keep bitrate low while preserving excellent detection bit accuracy.

A production-ready invisible watermarking solution was shipped with strong latency, visual quality, detection bit accuracy, and minimal BD-Rate impact. Future work will focus on improving precision and copy-detection recall through further tuning of model parameters, pre- and post-processing steps, and video encoder settings. The ultimate goal is to make invisible watermarking a lightweight filter block that plugs into any video pipeline without product-specific customization—robust content provenance with minimal effect on user experience.