Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
20th February 2019, 00:51 | #21 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
also probably need use of Limiter() plug at some point (on both key and Target clip). Maybe I got it wrong on needing single bit shift, I'm not sure but suspect that may require a Left shift of 7, rather than a left shift of 1 (so that most significant bit of 8 bit clip is in bit 14, with bit 15=0. Might also need random bits set in 15 and bit 6, to encourage x264 to think it is detail and not to screw with it. I'm kinda interested to see if we can get this working, although zip with password would be a helluva lot easier. EDIT: Currently, have tried encrypt/encode from original JohnMeyer Parade mp4 (~22.5MB) to 10 bit x264 CRF 18 Preset=Slower, and result was a whopping 980MB, so a wee bit bigger than original source. This was kinda expected, we will be wanting to experiment with some kind of multi blurring on the random key, will still obfuscate encrypted clip nicely, but with (hopefully) better compression. Might even try pixelating the random clip, with additional blurring, lots to try out. We are gonna hav'ta 'suck-it-and-see' what happens.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 20th February 2019 at 17:24. |
|
3rd March 2019, 15:36 | #23 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
(I modded the KEY clip genny to be a bit smoother, still no joy at all). Code:
Function EncryptPrep(clip c) { Return c.ConvertToYV12.Limiter(min_luma=16, max_luma=235, min_chroma=16, max_chroma=240 ) } Function GenRandomKey(clip c,int Seed,Int "Rad",int "Y_Lim",Int "UV_Lim") { Rad=Default(Rad,4) Y_Lim=Default(Y_Lim,20) UV_Lim=Default(UV_Lim,20) W=round(c.Width/(Rad*4))*4 H=round(c.Height/(Rad*4))*4 RandomSource(Length=c.FrameCount,Width=W,Height=H,Seed=Seed) BicubicResize(c.Width,c.Height,1,0) ConvertToYV12 Limiter(min_luma=16+Y_Lim, max_luma=235-Y_Lim, min_chroma=16+UV_Lim, max_chroma=240-UV_Lim ) return Last } SECRET_KEY = 123456789 AviSource("D:\Parade.avi").Trim(1000,-2000).EncryptPrep() #Return Last RAD=4 LIM=20 KEY = GenRandomKey(SECRET_KEY,Rad=RAD,Y_Lim=LIM,UV_Lim=LIM) #Return KEY ENCRYPTED = MT_Logic(KEY,"xor",y=3,u=3,v=3) # Encrypt Return ENCRYPTED # Result of Encypted.Limiter.Decrypt suggests part problem is Illegal YUV colors created by Encryption. #Return ENCRYPTED.Limiter.MT_Logic(KEY,"xor",y=3,u=3,v=3) return ENCRYPTED.MT_Logic(KEY,"xor",y=3,u=3,v=3) # Decrypt Single frame after encrypt Encypted.Limiter.Decrypt Encypted..Decrypt, same as original EDIT: Actually, the UT_Video compressed Encrypted clip is smaller than the original UT_Video encoded clip (422MB instead of 432MB, but that might be down to using Limiter on the original clip before encrypting). EDIT: Changing RAD to 16 produces a rather fancy effect random KEY frame. and then encrypted
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 3rd March 2019 at 16:06. |
|
13th March 2019, 03:10 | #24 | Link |
Registered User
Join Date: Nov 2016
Posts: 151
|
Code:
function deconstruct(clip original, clip modified, Int "Seed" , Int "blk") { # needs scramble/descramble: https://forum.doom9.org/showthread.php?p=1868405#post1868405 modified coloryuv(levels="TV->PC") MT_Logic(original,"xor",y=3,u=3,v=3) scramble(seed=seed,blk=blk) } function reconstruct(clip original, clip deconstructed, Int "Seed" , Int "blk") { # needs scramble/descramble: https://forum.doom9.org/showthread.php?p=1868405#post1868405 deconstructed descramble(seed=seed,blk=blk) MT_Logic(original,"xor",y=3,u=3,v=3) coloryuv(levels="PC->TV") } WARNING: deconstructed video MUST be lossless/uncompressed; its size could be 50/60% bigger than original clip (using the same compression) Thanks to StainlessS for his help! |
Thread Tools | Search this Thread |
Display Modes | |
|
|