Play videos from memory?

Just starting out? Need help? Post your questions and find answers here.
ricardo
Addict
Addict
Posts: 2402
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Play videos from memory?

Post by ricardo »

Hi,

Its possible to build the executable with some videos included and then play them from memory?
I dont want to write it to the disc to be able to play it because people can copy the videos.


Thanks in advance for any advice
ARGENTINA WORLD CHAMPION
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Play videos from memory?

Post by JHPJHP »

Hi ricardo,

See if either of the following examples work for you: Services, Stuff, and Shellhook
- folder: /Stuff/MovieData/

The ADS folder example uses an Alternate Data Stream to conceal the video file.
- the current executable: MovieData.exe will not work because zip files do not include ADS
-- if I chose to compress using WinRAR the option to include ADS is available
- recompile the file: MovieData.pb (MovieData.exe) then add the ADS by running the file: ADS.pb

The DS folder example uses a DataSection to conceal the video file.
- the example highlights PureDataConverter by ts-soft

NB*: In both examples the temp file is created in the current directory, but this should be changed for better concealment.
Last edited by JHPJHP on Thu Jan 08, 2015 10:31 pm, edited 5 times in total.
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4637
Joined: Sun Apr 12, 2009 6:27 am

Re: Play videos from memory?

Post by RASHAD »

Hi
1- Create your videos in a format that do Not need any special codecs
2- Dowload the free copy of (AudioVideo_To_Exe)
3- Run the program And create an encrypted movie file With any password you like
4- Run the movie file from your main program you will Not need even the player

No one can run it without the proper password
Give it a try maybe it will suite you
Egypt my love
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Play videos from memory?

Post by JHPJHP »

Hi RASHAD,

Is this the utility: http://www.videotoexe.com/index.html?
What's the difference between the free version and paid version?
The free trial version is full functional but is locked to expire after 30 days, and a watermark of our website address will be added on every video you record. The paid version never expires and no watermark will be added on video. Paid users are entitled to get FREE technical support and FREE software upgrades.
I believe the password option is only available with the paid version:
- I can't find it under settings
Enable Registration
If you enable registration, if someone want to play the video, he must ask the password(registration key) from you, otherwise he cannot play the video
After you create the video-executable, open the temp directory under your user profile (C:\Users\[PROFILE]\AppData\Local\Temp\). Run the video-executable and a new folder will be created. Inside the new folder will be the file: av2e, add the proper video extension and you have a copy of your video file.
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4637
Joined: Sun Apr 12, 2009 6:27 am

Re: Play videos from memory?

Post by RASHAD »

Hi JHPJHP
Yes you are right
I am trying to let him protect his movie
Beside this is the first time I face something like that
I spent a few hours comparing between such software (But as you knew free version is not enough to have a full picture)
But I came to conclusion that (VaySoft Video to EXE) is the best
It let you run the final movie with a command using your key
That means he can run the file from within his software and the file is full protected (I guess)

Edit :Amazing I could run the output exe file from memory :mrgreen:
And that mean you got your problem solved

ricardo it worth it my friend $45 :)
Egypt my love
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

Re: Play videos from memory?

Post by heartbone »

In Linux you might be able to include binary the video, then at runtime create a ramdisk (which mounts it), chmod the file permissions so that it is secure, and write the video onto it for playback.
And if that is possible, then it should be doable in Windows®.
Keep it BASIC.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Play videos from memory?

Post by JHPJHP »

Hi RASHAD,

Wouldn't the DataSection and LoadMovie function (compiled to an executable) provide similar results?
- adding a password to the DataSection / executable, including encoding is simple with PureBasic

VaySoft Video to EXE is creating a temp file same as my DataSection example:
- updated my post to include additional example: ADS (Alternate Data Stream)
JHPJHP wrote:After you create the video-executable, open the temp directory under your user profile (C:\Users\[PROFILE]\AppData\Local\Temp\). Run the video-executable and a new folder will be created. Inside the new folder will be the file: av2e, add the proper video extension and you have a copy of your video file.
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4637
Joined: Sun Apr 12, 2009 6:27 am

Re: Play videos from memory?

Post by RASHAD »

@heartbone
I thought about that but creating virtual disk with windows needs to boot the system

@JHPJHP
I tested your point of view with VaySoft
You can not run the file created in the user temp directory
You can not copy it to someplace else
It will be deleted after finishing play

Result = LoadMovie(#Movie, Filename$)
LoadMovie() needs a file name
How can you get a file name to a memory segment?
Unless mapping file can solve this problem

I think what I just got is the best solution to protect your own movie(For now)

Edit :I did not test your last peaces of good work
Maybe it has some answers
But always I like short cut
Last edited by RASHAD on Thu Jan 08, 2015 11:24 pm, edited 1 time in total.
Egypt my love
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Play videos from memory?

Post by JHPJHP »

While the movie / executable was playing I copied the temp file to a new location, added the .avi extension, and the temp file played just fine.
- the temp file is deleted after playing same as the DataSection example

Either way I'm good. :)
Last edited by JHPJHP on Thu Jan 08, 2015 11:40 pm, edited 1 time in total.
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4637
Joined: Sun Apr 12, 2009 6:27 am

Re: Play videos from memory?

Post by RASHAD »

@JHPJHP
You are talking about some other software
I could not copy the file while it was played
Try VaySoft Video to Exe
Egypt my love
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Play videos from memory?

Post by JHPJHP »

Hi RASHAD,

I stand corrected, VaySoft Video to Exe has a few more levels of security and a bunch of useful options... nice find.

Sorry I missed that you found another/better solution:
RASHAD wrote:But I came to conclusion that (VaySoft Video to EXE) is the best
Cheers!
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4637
Joined: Sun Apr 12, 2009 6:27 am

Re: Play videos from memory?

Post by RASHAD »

Hi JHPJHP
You are a very good programmer specially in some field
Why do not you try to find a solution to create an instant RAM Disk without restart ?
I think you can do it
Say YES I will try :D
Egypt my love
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

Re: Play videos from memory?

Post by heartbone »

RASHAD wrote:@heartbone
I thought about that but creating virtual disk with windows needs to boot the system
Are you sure?
Because Paragon manages to accomplish attaching new physical drives. I thought virtual drives would be easier.
RASHAD wrote:Hi JHPJHP
You are a very good programmer specially in some field
Why do not you try to find a solution to create an instant RAM Disk without restart ?
I think you can do it
Say YES I will try :D
I was thinking the same thing about you.
Keep it BASIC.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Play videos from memory?

Post by JHPJHP »

Hi RASHAD, heartbone,

Thank you for those kind words.

I started a small project using ImDisk, and the results are promising.
- see: PureBasic Interface to ImDisk

Cheers!
Last edited by JHPJHP on Sun Jan 11, 2015 12:26 am, edited 1 time in total.
PB Fanatic
User
User
Posts: 49
Joined: Wed Dec 17, 2014 11:54 am

Re: Play videos from memory?

Post by PB Fanatic »

ricardo wrote:Its possible to build the executable with some videos included and then play them from memory?
I dont want to write it to the disc to be able to play it because people can copy the videos.
Question: if the videos are small and have no sound, for example a tutorial, then a possible workaround is to convert them to an animgif and just play that within your app. I've even seen a three-minute long "Lord of the Rings" animgif and it was quite a fun little "movie" to watch.
Post Reply