ghostframe
no key Open studio
field note · 2026-09-28

How to verify a cleaned file yourself

Byte-level checks, decoder round-trips, and the PSNR number that tells you if quality held.

You do not need ghostframe to check ghostframe. Two minutes and a terminal are enough. Everything below runs locally.

1. Look for the carriers

On Linux or macOS, the strings are readable even without a parser:

strings -n 6 cleaned.jpg | grep -iE 'c2pa|jumbf|synthid|trainedAlgorithmic|gemini|imagen'

No output means no plain-text provenance remains. For a structural check, count the JPEG markers:

xxd -l 64 cleaned.jpg

You should see FFD8, then FFE0 (JFIF) if it was preserved, then colour data. An FFEB marker is an APP11 segment — that is the C2PA carrier.

2. Decode it

ffprobe -v error -show_entries stream=codec_name,width,height -of default=nw=1 cleaned.jpg
ffmpeg -v error -i cleaned.mp4 -f null -

A clean exit means the container is coherent. For MP4 this also proves the stco offsets still point at real media data after the C2PA box was replaced.

3. Compare pixels

ghostframe reports PSNR during the rewrite. To reproduce it independently, decode both files to raw and compare:

ffmpeg -v error -i original.png -f rawvideo -pix_fmt rgb24 a.raw
ffmpeg -v error -i cleaned.png  -f rawvideo -pix_fmt rgb24 b.raw
python3 - <<'PY'
import numpy as np
a = np.fromfile('a.raw', dtype=np.uint8).astype(np.float64)
b = np.fromfile('b.raw', dtype=np.uint8).astype(np.float64)
mse = ((a - b) ** 2).mean()
print('PSNR', round(10 * np.log10(255 ** 2 / mse), 2), 'dB')
PY

Standard strength should land near 43.9 dB when the output is lossless. If you chose JPEG output, the encoder adds its own loss and the number will be lower — that is compression, not the rewrite.

4. Check the tail

Some generators append a trailer after the image end-of-file marker. Scan the last kilobytes too:

tail -c 4096 cleaned.jpg | strings -n 6 | grep -iE 'c2pa|manifest|uuid'

What you cannot check

You cannot verify SynthID removal without the detector key. What you can verify is the mechanism — that the coefficients were rewritten inside a bounded envelope, that the file rebuilt cleanly, and that the visual content is preserved to a measured degree. Claiming more than that would be guessing.

Open the studio All notes