c++ encryptor (video to exe)

How can I convert a video file to a .exe with c++? not strong encryption . only convert. possible (Convert video to ex. With c ++)???
I could not get the interesting Contents on the Internet
What do you think about this and what code you suggest(simple Encryptor video to exe) ...
Last edited on
do you want it to play itself (movie + player) ?
Hi dear salem , Encrypt video file not self Extracting ??? self extrcting do many simple software ...
I want ENCRYPT video file to exe with c++ or c# ? thank for helping . I could not get the interesting Contents on the Internet
Last edited on
Hi dear jonnin . my answer is yse . I want to encrypt video file with c++ (get exe file) and then start final exe file (encryption file) and play video (specific player) . for other hand encrypt video and play encryption video with c++ code not media software ...
Thank you much
I could not get the interesting Contents on the Internet

World has changed, what you can not find in the Internet does simply not exist any more. Or maybe never did.

Question: what do you want the exe to do when running it? Display more that just an error message? Something like PowerPoint but a video instead of slides?
@vtpro
It's the same thing really.

A SFX is really just a stub unzip appended with a zip image (more or less).

It's just you replace unzip with decrypt.

The idea is the same, you tweak the code to do what you want.
DRM = (digital right managment) for video file .

like this I want to encrypt video file (to exe) and then play in special player (only simple drm) .

encrypt video to exe (with c#) . after the encryption I want creat password to run encrpyion video file this means I chose people for show this video (no powerful DRM only simple DRM Encryption) . users write pass and show video . video show in special player . if user enter wrong pass video not playing. DRM have many option but I want only programming encrypt and decrypt with password while user can not stole video in popular format(MP4,AVI,...). user can show video only with my pass .


when use SFX video file not encryption (means any one play it)

What should I content follow? (what is your plan to do this)
Last edited on
one way is to write your own compression format plugin for video players, and your compression will include encryption and the user has to 'configure' the decompressor with the password.

if you wrote the video player, you can skip that and just have it ask for the password to apply the decryption to the stream if correct.

if you want to lump the video in with the executable to play it, the the above idea working first, then just put the encrypted video into the file via a static link of a library that contains the data.

you can use a simple xor encryption for this if you want something fast and easy..
- get password
- convert password to integer
- use integer to seed a random generator
- xor each byte of video with next random value from generator

exact same code encrypts and decrypts.
Last edited on
It was an interesting way. I work on it. thanks dear jonnin
I think jonnin's on the right idea.

There are numerous video libraries for C++ that would give you all you require to build a player in C++, then simply apply standard encryption to the data as required (for which lots of C++ libraries exist).

So, what we're saying is you won't find much by making one complex inquiry on Google, you need to search for the two (maybe 3) separate things you're combining (self extracting EXE or packing data payload into EXE with resources, video playback library in C++, encryption library in C++).

Combine each of the resources you find into a single result.


Thanks Niccolo . Your answer was helpful to me .
Making DRM system requires careful study.
Thank you for your guide ...
Hi again @salem c,@jonnin,@MikeStgt and @Niccolo.

I did a lot of research and I came to the conclusion :
(Because I want a simple video protection)

I wrote an application in C # to play my video (I create with password protection for play video) then I use powerful software packer to pack my video and my app to single exe file. when user run single (final exe file) my app is run and user enter specific pass after that my video is playing for user . is it good way to protect my video from stolen . my app is login page and if user enter other pass video not play . Will this work great security?

step1 : write own player (VLC,Media player dll ,...) in c# with login password protect(with high level password protect)
step2: embed video to c# player
step3: pack video and C# app . finally create single exe file (video+app=single exe)
Final step : user enter valid pass to view video

This method has good security?
My video will be safe?
What is your opinion about the security of this method?

I want user only with my password to view the video and
without this pass he can not show video and do not copy the video to normal
Last edited on
> Will this work great security?
Who are your adversaries?
- kid in a bedroom, lots of time, possibly some skill, no $$$
- small business, not much time, possibly some skill, some $$$
- large business / multinational, not much time, lots of skill, lots of $$$
- state sponsored "Three Letter Agency", lots of time, lots of skill, lots of $$$

How much time and $$$ are you willing to spend defending your product?

How much revenue do you hope to get from people who would have stolen it anyway given the chance, being forced into being customers?

The flip-side of this is not annoying your genuine customers who would have paid for the unprotected product anyway, to the point that they're not buying it at all.

Some people will just rip off the product just for the kudos of saying they could do it.

Also, Windows leaks like a sieve.
It would be a shame if all your clever coding were somehow defeated by say someone running a screen recorder application.
thanks dear salem c.

I accept your answer but I will also develop future protection (DRM protection with C#) and I will complete the next security . my question is the security of video embedding is good with the following steps :

write simple player-embed video to player - pack it to single exe file with powerful packer

I will program the next security for example prevent recording 'powerful password protect ' and etc .

What do you think about embedding video to c# player and then packing up ?
I think anything you do can be defeated by someone determined to defeat it if you are trying to hand roll data protection from scratch with limited knowledge. Sorry, but you may as well learn this NOW as later when your stuff is stolen in 10 hours after you release it...
protecting data is challenging. Hackers are very good at stealing stuff. Its a huge field and its a never-ending battle (today's unbreakable whatever is cracked and done next year..)

let me give you a couple examples of what you are up against:
recent coders showed that you can tell the CPU to fetch data that it does not need by exploiting flaws in the 'branch prediction' of the CPU to get data out that did not really belong to you...

a few years ago a brand new, best ever, hottest thing going dvd encryption scheme was defeated by some guy at home with a magic marker.

hackers can see if you are home or not by looking at the electromagnetic profile of your home if you have a bunch of big brother wireless gadgets in your home.

and that is just a few of the things going on today.

Ill say it again: there are video codecs that have strong encryption out there, so that you can play the video in any player (by getting the codec) and providing the password. This is likely stronger than anything you can do by hand in a short time with limited knowledge of security concerns (But, I have not looked at video stuff in a while, maybe the reverse is true and the codec protections have all been cracked the way zip passwords have been broken forever ... you would want to research this). You can do any number of annoying things that will stop a casual hacker. None of them will stop a legit user stealing it by re-recording it and distributing the video, and you are unlikely to come up with anything on your own that a skilled hacker or pro can't defeat if they are determined enough to do so. I am not trying to bring you down or say your ideas are no good, just saying that data protection is a big industry, and that is true because its difficult. If just xoring your data were good enough, we wouldn't have all the other stuff :)
Last edited on
thank you dear jonnin
All that you mentioned is true and I used your experience and with your answer this will be closed because my problem with your answer is your path.
Thank you very much .
Topic archived. No new replies allowed.