Save "fingerprint" info inside MP4 videos

1

I have a Debian server serving MP4 videos (for download, as files) and I was wondering if there is a way to save some unique "exif" information for each user that downloads a file.
I would like to do this ideally on the fly but as a first step I would like to figure out a way to do this at all.
Any suggestions?

Alex Flo

Posted 2013-05-20T10:24:36.430

Reputation: 941

Could you elaborate on why you'd need this? What kind of info would you store? – slhck – 2013-05-20T11:00:51.503

I try to make an application that will sell videos and I would like to save an unique identifier inside the file so if I find that sold file on torrents to be able to figure out the buyer that shared it. – Alex Flo – 2013-05-20T11:03:21.220

Its a simple info, like a "UserId: 231323" – Alex Flo – 2013-05-20T11:03:43.207

I know they can remove it but generally they won't be aware/won't care. If you could point me to a tool that I could use to edit/add such data would be great. – Alex Flo – 2013-05-20T11:59:38.067

Answers

1

You can simply use AtomicParsley:

AtomicParsley input.mp4 --encodedBy "John Doe for ID $RANDOM"

This will create a temporary output file. To overwrite the input file's metadata instead, add the --overWrite switch. You'll then get the following metadata:

$ mediainfo input.mp4
General
Complete name                            : input.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom
File size                                : 59.5 MiB
Duration                                 : 3mn 31s
Overall bit rate                         : 2 360 Kbps
Encoded date                             : UTC 2012-01-08 11:16:19
Tagged date                              : UTC 2013-05-20 12:04:12
Writing application                      : John Doe for ID 14077

But don't forget that the user could easily edit out any metadata that you put in the container. If you want to be absolutely safe, you'd probably rather look for digital signage / watermarking services, which watermark the actual video bitstream. Such a watermark cannot be removed.

slhck

Posted 2013-05-20T10:24:36.430

Reputation: 182 472

Thank you so much, this should solve my problem, I'll test it soon and get back. – Alex Flo – 2013-05-20T13:40:24.447