Skip to content
← All tutorials

Tutorial · Video

Watermark an AI video in one call, then send it through WhatsApp and YouTube

Mark a 1080p Kling clip with the Python SDK, then re-encode it, cut it, share it on WhatsApp, upload it to YouTube and crop it. The watermark survives everything except the crop, and YouTube keeps the Content Credentials.

0:36 video · Real run on 30 November 2026 · Markproof

0:36 · text on screen, no narration

In short

  • One SDK call marks a 1080p AI video (a Kling clip): a watermark in every frame (and in the audio track, when a clip has one), plus signed Content Credentials (C2PA). It comes back at 1080p, and the 5-second clip used 6 calls.
  • The watermark survived a 720p re-encode, a 2-second cut, a WhatsApp share and a YouTube upload that came back at 360p. YouTube even kept the Content Credentials, as a chain with ours inside.
  • It did not survive the 4:5 feed crop. Cropping is the edit to watch for.

1. Install the SDK

You need Python 3, the SDK at version 0.4 or later (it uploads videos for you), and a Markproof API key: sign up and copy it from your dashboard (250 free calls a month). Keep the key on your server, in an environment variable.

Terminal
pip install "markproof>=0.4"

2. Mark the video

The input is the MP4 exactly as the video model delivered it: 1920×1080, 5 seconds, no watermark and no Content Credentials. Videos are too big for an inline request, so the SDK sends the file through a direct upload, and the marked MP4 comes back as a download link (valid for about an hour):

mark.py
import osimport requestsfrom markproof import Markproof client = Markproof(api_key=os.environ["MARKPROOF_API_KEY"])marked = client.mark("clip.mp4", generator_name="my-video-app", model_name="kling-v2")open("clip.marked.mp4", "wb").write(requests.get(marked.file_url).content)print(marked.verify_url, marked.calls_used)
Output
https://markproof.co/v/NXEK5W0M 6

Marking took 40 seconds. Video is billed per started second, so this 5.04-second clip used 6 calls. The marked file is still 1920×1080 (H.264; this clip has no sound, and a clip with an audio track gets that marked too), and checking it finds watermark NXEK5W0M and valid Content Credentials. Download the marked clip and drop it into the free checker to see it detected.

3. Put it through what happens to video

Three edits with ffmpeg, then each copy goes back through the API:

Terminal
# A typical platform re-encode: 720p, H.264 at 1.5 Mbit/sffmpeg -i clip.marked.mp4 -vf scale=-2:720 -c:v libx264 -b:v 1500k -c:a aac edit-720p.mp4# A 2-second cut from the middleffmpeg -ss 1.5 -t 2 -i clip.marked.mp4 -c:v libx264 -crf 20 -c:a aac edit-cut2s.mp4# The 4:5 feed crop (keeps the middle 80% of the width)ffmpeg -i clip.marked.mp4 -vf "crop=ih*4/5:ih" -c:v libx264 -crf 20 -c:a aac edit-crop45.mp4
verify.py
for name in ["edit-720p.mp4", "edit-cut2s.mp4", "edit-crop45.mp4"]:    result = client.verify(name)    print(name, result.watermark.detected, result.watermark.watermark_code, result.c2pa.present)

The two round trips were done by hand with the same Kling clip, marked on 20 November (code 5B257SD4): it was sent on WhatsApp and saved back, and uploaded to YouTube as an unlisted video, then downloaded from YouTube Studio. Both copies were checked again with the live API on 30 November.

CopyWhat happened to itWatermarkContent Credentials
Marked originalNothingFound (NXEK5W0M)Signed, valid
Re-encoded to 720pH.264 at 1.5 Mbit/sFound (NXEK5W0M)Gone
A 2-second cutTrimmed from the middleFound (NXEK5W0M)Gone
Shared on WhatsAppSent and saved back; still 1080pFound (5B257SD4)Stripped
Uploaded to YouTubeRe-encoded to 640×360 at 533 kb/sFound (5B257SD4)Kept, as a chain
Cropped to 4:5864×1080, the middle of the frameLostGone

As a control, the unmarked original from the video model shows no watermark and no Content Credentials.

What this shows, and what it doesn't

The watermark survives what platforms usually do to a video: re-encoding to a lower resolution and bitrate, cutting, and stripping metadata. It didn't survive a crop that removed a fifth of the width. In this WhatsApp test the app kept the file at 1080p (it stripped the metadata but didn't recompress), so it shows survival of the metadata strip, not of WhatsApp's heavier compression. YouTube's 360p copy is the real recompression test.

YouTube's copy is also the only one that kept Content Credentials: YouTube added its own signed manifest (Google LLC, transcoded) with ours as the parent ingredient, so "AI-generated, Kling via fal.ai" is still in the file. Every other copy lost them. That's why the watermark is one of three layers: Content Credentials carry the signed detail when they survive, and Markproof keeps a record of every file it marks, which your audit reports can export.

Marking audio instead? See Tutorial 2: watermark an AI voice. This is technical guidance, not legal advice.

Check your own output in seconds.

Drop a file into the free checker to see whether it carries a watermark and Content Credentials. Then mark your files with one API call: 250 free calls a month, no card required.