Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# C#4.0 Encryption Decryption , +
I am trying to implement a windows form application in C# and most of stuff available online... but can someone tell how to implement below mentioned process - 2 for video file Decryption and stream directly to media player without saving file to disk.
 
PROCESS
 
PROCESS - 1 Video Encryption Process
Video File >> Read file >> encryption >> save to a file
 
PROCESS - 2 Video Decryption and Streaming Process
Encrypted File >> Read from file >> decryption >> stream to media player (axWindowsMediaPlayer)
 
Total Process Used
Reading file
- file-stream
- in byte array
- frame-wise
- Buffer
Encryption / Decryption
- many ways or this and many more...
Save to file
- normal algorithm
Video Streaming
- don't know Frown | :(
 
I read many stuff online but this i don't found. Secondly somebody suggest not to waste time on DRM as its not safe... someone on another forum suggest to swap initial bits so that while playing it get garbage value and not play directly and implement re-swapping programmaticly.
Posted 20-Jun-13 2:57am
Edited 20-Jun-13 3:02am
v4
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Everything you linked to concerns itself with encrypting/decrypting files, which must be written to other files and MediaPlayer won't play content from a buffer of your choosing in memory.
 
To do this without using an unencrypted file or custom media server, you'd be writing a codec to do the encryption/decryption. It would have to be part of the graph that MediaPlayer builds to play the content.
 
This is something that you really shouldn't use C# for. You'd be using C to do this and you can find some documentation on what's involved
here[^].
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

There is a way using virtualization, for example here you may find a really BIG tutotial which seems to do exact what you need: firstly it crypts video file some way, and then it is able to play directly from the encrypted source, decrypting it on the fly.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 325
1 DamithSL 265
2 CPallini 235
3 Maciej Los 190
4 Sergey Alexandrovich Kryukov 189
0 OriginalGriff 5,455
1 DamithSL 4,422
2 Maciej Los 3,860
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,010


Advertise | Privacy | Mobile
Web04 | 2.8.141216.1 | Last Updated 9 Jul 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100