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.
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