Script to encrypt videos immediately after being created - prevent from editing

sta

New Member
Hello,
Is there a way to upload a script in OBS that encrypts videos immediately after being created to prevent them to be edited, only readable?
Thank you
 

sta

New Member
Hello,
Encryption similar like when text docs are created, they can be open, but they can't be edit. Read only file.
 

koala

Active Member
There's no way to do this. It's not suppported by any video file format. If you can play back a video file, you can capture the playback and edit what you like.
 

sta

New Member
Hello,

Thank you for all your replies.

What I am looking for is proof that a video with a length of, for example, five minutes, with an embedded timestamp, recorded offline, has a creation date of 5 minutes before (the beginning of the timestamp) and was last modified 5 minutes after (the end of the timestamp) in order to prove that the video was only obtained via recording and not editing.
I am looking for a solution because of the limitations of DVRs regarding audio quality. DVRs encrypt their hard drives.

OBS has log files. I have looked at the log files and they provide detailed information, including when recording starts, where the files are saved, and records ends, even the audio and video capture device. If there is any editing the same thing happens correct? Every user interaction every action is saved in the log file, correct?

I was thinking of another solution:

Upload one or more scripts on OBS that encrypt recorded videos, assuring that when a video is created and saved on the disk it is already encrypted, not afterwards. Encrypt the log session file and save it in the same folder as the video, or as an alternative confirm that no editing occurred just recording, via user interaction with OBS . Obtain a checksum of the video, encrypt the checksum and save it in the same folder.

With the encryption files can’t be opened or changed, not even by me.

Is it possible to copy these files to another folder, so that they can be opened and read? It doesn’t matter if they can be edited.

Is this a viable solution? If yes, do the scripts need to be written in Python?

Please can someone provide alternatives?

Is there a way to limit OBS to only offline recording features?

Thank you.
 

koala

Active Member
There is no standardized function to prove a video has been unchanged since creation. Close to that function are DRM mechanics that control playback and re-recording of videos. To prove a video is unchanged, it has to still be DRM-controlled. This needs a DRM infrastructure.

A simple alternative method is how big files such as ISO images are distributed: the publisher creates a hash (these days sha256 or sha512, as far as I know) of the file, then publishes the hash along with the file. Users can compute the hash of the file themselves, and if has the same hash that was published by the publisher, it's the same unchanged file.
 

AaronD

Active Member
As said before, if it can be perceived by a human, ***AT ALL***, it can also be re-captured and edited. Period. The only perfect protection is to (actually) destroy the only copy. (and not just think you did)
 

sta

New Member
As said before, if it can be perceived by a human, ***AT ALL***, it can also be re-captured and edited. Period. The only perfect protection is to (actually) destroy the only copy. (and not just think you did)
Are you also referring to all the encrypted files with an OBS script, files that can't be open and edit, by any one?
How?
 

sta

New Member
There is no standardized function to prove a video has been unchanged since creation. Close to that function are DRM mechanics that control playback and re-recording of videos. To prove a video is unchanged, it has to still be DRM-controlled. This needs a DRM infrastructure.

A simple alternative method is how big files such as ISO images are distributed: the publisher creates a hash (these days sha256 or sha512, as far as I know) of the file, then publishes the hash along with the file. Users can compute the hash of the file themselves, and if has the same hash that was published by the publisher, it's the same unchanged file.
I was looking at some DRM tools and I couldn´t any that also records videos. The DRM control needs to be triggered automatically while a video is being recorded and applied immediately when is saved into the disk, and not afterwards.

Same applies to ISO files, the recording software has to support ISO format as an output while recording.

Please clarify if OBS saves into a log file all the user interactions with the application during a session, every user click, for example if the user clicks on a editing button.

Thank you
 

Suslik V

Active Member
Please clarify if OBS saves into a log file all the user interactions with the application during a session, every user click, for example if the user clicks on a editing button...
No such thing in OBS. There is standard redo/undo of user actions with the program but it is not logged.

If you recording speed-runs - you adding overlay of keyboard/mouse presses on the screen. So, users can check if your play was fair.
 
Last edited:

khaver

Member
You could create a script that uses several 3rd party tools that as soon as the recording is done, a hash is generated for the video file, the hash file is moved to a protected location, and then the video file is zipped or encrypted using the generated hash as the password. Only access to the hash would allow decrypting and playing the file. The only vulnerability is storing the hash file safely, and making sure the 3rd party tools don't secretly transmit their inputs and outputs.
 
  • Like
Reactions: sta

khaver

Member
You could also just generate a strong, random password and store it for encryption instead of running a hash on the file. Again, someone would need access to the password file to decrypt the video.
 
  • Like
Reactions: sta

AaronD

Active Member
...files that can't be open and edit, by any one?
That's useless. Might as well delete them.

For anything useful, it must be decrypted before a human can perceive it, and then it's usually trivial to put a capture device on the human-perceivable display. A literal camera pointed at a screen is somewhat of a last resort in most cases today, but it ALWAYS works. And if it's done well, you might not even realize that that's what you're watching. Transferring between film and video tape, for example, in both directions, was literally that, done well.

And there are other ways too...
 

sta

New Member
You could also just generate a strong, random password and store it for encryption instead of running a hash on the file. Again, someone would need access to the password file to decrypt the video.
Hello,

Thank you for your reply.
I don´t need to decrypt the video or the hash file.
The only thing that I need is to be able to copy and open the copies.
The copies will be created and opened by a judicial officer. Also I think the copies have the same hash as the original.
My issue: OBS allows to edit the video.
If a script can use third party tools to create a hash file only during recording, maybe that is all I need to prove the video was not edited, am I correct?
Is there a way to install OBS with only a offline recording feature?
Thank you
 

koala

Active Member
@sta From your posts, it's apparent you don't know anything about video recording and video handling, never used OBS, probably never ever even installed it, and don't know anything about how to ensure and proof data integrity. You don't even know about concepts in that regard.

If this is really about some true legal stuff, do yourself and your customer a favor and hire someone knowledgeable. Pay him money for applying his knowledge. You need a solution designer who knows storage software that is able to store and retrieve data with proofed integrity in a way that is accepted by legal and that can successfully be audited, and who is able to install and configure such a system. And you need a solution designer who has knowledge with digital video recording, so you're able to create the videos you need in the first place. These are two completely different topics, so you probably need two different experts.
 

Lawrence_SoCal

Active Member
There is a HUGE technical (though not all that practical) difference between
- Editing a video (which OBS can NOT do)
and
- capturing/playing a video and creating a NEW recording (an edited copy) from there (the original is untouched, and this is definitely something OBS Studio can do, a common use case when compositing actually. I do this every stream/recording as I combine pre-recorded content with new live video. So I'm creating a new copy of the pre-recorded content EVERY time I use OBS Studio. But again, that is NOT editing the original).

Within chain of custody type systems, my first thought is that you should be looking at a write-once, read-many (WORM) type storage solution. but even then, Koala is right, this needs a solution designer who understand the specific jurisdiction and audit/proof requirements for video. But for the sake of argument, let's say you or in a small, remote jurisdiction, with low budget (if anything), and trying to come up with something. And the judicial officer/courts do NOT have sophisticated requirements (a simple, sort of effort will suffice)... then read on.

OBS Studio is a video compositing tool. And I suspect not a good fit for your use case. What are you compositing that even makes OBS Studio an appropriate tool? If some overlay is needed, and proof video not manipulated after-the-fact, I'd be inclined to set up any overlay in the source video camera itself, and stream video directly to a WORM storage system (I've dealt with such for EU tax compliance reporting requirements regarding invoices, be prepared for large dollar values to be involved to get to a certifiable config, not to mention the operational process and training required to maintain such a system). Then your storage system has all the logs/records, audit reports, etc. You can still play a video and make edits, but WORM device will have the original, and would be your source for any 'judicial' officer/audit, etc.
And that is my $0.02 on a direct method, with IANAL caveat and certainly no understanding of your jurisdiction specific requirements
And logging ALL OBS Studio user interactions to a secure location won't be adequate, most likely, as you also need to consider what else may be happening at the Operating System level. And if you set up a system to AUDIT all user activity at OS level, that would include any application, including OBS Studio.

Any ideas I have on taking a video once finished Recording in OBS Studio, and then doing something to 'lock it down', hash recording, etc... all creates opportunity to edit (even if only seconds) before saving ... negating any 'proof', unless the 'bar' is rather low for proof. Another possibility is that your use case involves recording a screen capture (ie web conference or other source where you don't control the camera).. but at that point, you have no proof the video you are capturing is real (not manipulated in the first place). so we are back to specific requirements

So, as you can see, the source content matters. And then there is the storage and audit/source of truth considerations [for which there are many well-known, proven such solutions].
*IF* the proof level is not all that high/sophisticated... would the following suffice?
- highly secured Operating System (special training required... without this step done properly, all the rest is relatively easy to bypass) and physical security to match [or there is no 'proof' drive not taken out of computer (or booted with alternate OS, like bootable USB drive) and drive contents manipulated]
- Record using OBS to drive/partition/folder for which the user logged in ONLY has write access.
- Then separate user credentials required to Read the file (but can't delete/modify).
Anyone trained on info security knows there are ways around the above. But the above is also done in high (to very high) security environments with appropriate counter-measures in place, and it may suffice... depending on level of confidence required, content involved, burden of proof standard that applies, etc.

This stuff gets complicated, and therefore usually expensive, quick and the details are all important. There is a HUGE gulf between most likely/probably authentic, and 'I can prove this is original, unedited video'. Closing that gulf typical takes lots of money, effort, and well-trained people, physically secure systems, etc. Unless your judicial officer has low expectations/requirements, any well-trained knowledgeable IT security person will be able to poke quick holes in all but the most sophisticated (and expensive) solutions.
 

Suslik V

Active Member
OMG, you need body-cam instead of OBS. It has all you need: user interaction prohibited (runs nonstop, in one take).

Making unpredictable unique smooth visual flow (main argument for not edited footage) incompatible with the switching functions of OBS (start/pause/scene change etc).
 

sta

New Member
@sta From your posts, it's apparent you don't know anything about video recording and video handling, never used OBS, probably never ever even installed it, and don't know anything about how to ensure and proof data integrity. You don't even know about concepts in that regard.

If this is really about some true legal stuff, do yourself and your customer a favor and hire someone knowledgeable. Pay him money for applying his knowledge. You need a solution designer who knows storage software that is able to store and retrieve data with proofed integrity in a way that is accepted by legal and that can successfully be audited, and who is able to install and configure such a system. And you need a solution designer who has knowledge with digital video recording, so you're able to create the videos you need in the first place. These are two completely different topics, so you probably need two different experts.
I need a DVR with a good audio codec, that's all.
 
Top