Closed deepak-kiran closed 1 year ago
Hi @deepak-kiran , Yes in the decode section of the video steganography I have passed the frame in the decode function .
def decode_vid_data(frame_):
cap = cv2.VideoCapture('stego_video.mp4')
max_frame=0;
while(cap.isOpened()):
ret, frame = cap.read()
if ret == False:
break
max_frame+=1
print("Total number of Frame in selected Video :",max_frame)
print("Enter the secret frame number from where you want to extract data")
n=int(input())
vidcap = cv2.VideoCapture('stego_video.mp4')
frame_number = 0
while(vidcap.isOpened()):
frame_number += 1
ret, frame = vidcap.read()
if ret == False:
break
if frame_number == n:
extract(frame_)
return
It is necessary to pass that frame in decode function to just show that the encode function works well and do it task in encoding secret message in a particular frame.
_Ideally In the decode function, we just need to pass the stegovideo to get the secret code as done in other steganographic techniques like Image, Text and Audio, but the problem lies that after encoding the message and the RC4 encryption, the stego video format is not supported in python3 as of now which gives individual frame, that's why it can't be decoded normally like other decode function .
The stego_video is correct and holds our secret message and is similar to the cover video, it's just python3 don't support that video format to execute and extract each frame from it .
Hence in order to just show that the encode function works well and the message is encoded and encrypted into the frame of video, I passed the frame in decode.
_Moreover, If you make a cpp code for encode and decode for Video Steganography, You won't need to pass frame in that, It's just that cpp supports the format of stegovideo to extract and work on frame, Till now python3 didn't support it.
Hope you understand it . Feel Free to ask any other queries .
Thanks @Priyansh-15
If RC4 is removed does it work without passing the frame?
On Wed, Feb 1, 2023, 1:54 PM Priyansh Sharma @.***> wrote:
Hi @deepak-kiran https://github.com/deepak-kiran , Yes in the decode section of the video steganography I have passed the frame in the decode function .
def decode_viddata(frame): cap = cv2.VideoCapture('stego_video.mp4') max_frame=0; while(cap.isOpened()): ret, frame = cap.read() if ret == False: break max_frame+=1 print("Total number of Frame in selected Video :",max_frame) print("Enter the secret frame number from where you want to extract data") n=int(input()) vidcap = cv2.VideoCapture('stego_video.mp4') frame_number = 0 while(vidcap.isOpened()): frame_number += 1 ret, frame = vidcap.read() if ret == False: break if framenumber == n: extract(frame) return
It is necessary to pass that frame in decode function to just show that the encode function works well and do it task in encoding secret message in a particular frame.
Ideally In the decode function, we just need to pass the stego_video to get the secret code as done in other steganographic techniques like Image, Text and Audio, but the problem lies that after encoding the message and the RC4 encryption, the stego video format is not supported in python3 as of now which gives individual frame, that's why it can't be decoded normally like other decode function .
The stego_video is correct and holds our secret message and is similar to the cover video, it's just python3 don't support that video format to execute and extract each frame from it .
Hence in order to just show that the encode function works well and the message is encoded and encrypted into the frame of video, I passed the frame in decode.
Moreover, If you make a cpp code for encode and decode for Video Steganography, You won't need to pass frame in that, It's just that cpp supports the format of stego_video to extract and work on frame, Till now python3 didn't support it.
Hope you understand it . Feel Free to ask any other queries .
Thanks @Priyansh-15 https://github.com/Priyansh-15
— Reply to this email directly, view it on GitHub https://github.com/Priyansh-15/Steganography-Tools/issues/5#issuecomment-1411644823, or unsubscribe https://github.com/notifications/unsubscribe-auth/AS2YSDRCBU545SWNE4DW5GTWVIMVXANCNFSM6AAAAAAUNIWNHU . You are receiving this because you were mentioned.Message ID: @.***>
No @deepak-kiran , It's not because of that we are doing any particular encryption on text, I have tried many encryption algorithms on data to be encoded in any type of steganographic technique . It doesn't affect the encoding algorithm.
This also make it easy to understand that for the encoded algorithm , the type of input doesn't really matters, whether it's a plain text or encrypted text because we are doing encryption before encoding so according to me it won't be the case .
Hope you understand it Thanks @Priyansh-15
Thank you for the clarification.
On Wed, Feb 1, 2023, 2:04 PM Priyansh Sharma @.***> wrote:
No @deepak-kiran https://github.com/deepak-kiran , It's not because we are doing any particular encryption on text, I have tried many encyption algorithms on data to be encoded in any type of steganographic technique .
This also make it easy to understand that for the encoded algorithm , the type of input doesn't really matters, whether it's a plain text or encrypted text because we are doing encryption before encoding so according to me it won't be the case .
Hope you understand it Thanks @Priyansh-15 https://github.com/Priyansh-15
— Reply to this email directly, view it on GitHub https://github.com/Priyansh-15/Steganography-Tools/issues/5#issuecomment-1411655043, or unsubscribe https://github.com/notifications/unsubscribe-auth/AS2YSDSGL3GY35Z4UUPIGA3WVINXVANCNFSM6AAAAAAUNIWNHU . You are receiving this because you were mentioned.Message ID: @.***>
Well.. you have passed variable frame ( i.e "a") in decode function for decoding which is taken from Encode video function. Generally we perform Encode and decode in different devices where there won't be value frame while decoding in a new device. Which throws a error.