Reputation: 1
I'm having problems implementing steganographic methods for video. I am trying to implement a simple LSB coder and decoder in YUV components using Hamming code (7,4) for error correction. My code can only decode the secret message from video frames stored on disk (but not from those extracted from reconstructed stego-video). I think that there will be a problem in the conversion to video and back to frames because it changes the pixels of the images only a little bit but it is fatal for LSB because Hamming code corrects only 1-bit errors. So the message is not readable after extracting the stego-frames containing the message from the stego-video. But I don't understand why, because I avoid any compression.
How to process a video and frames to solve my problem with unreadable message after reconstruction of stego-video?
I am writing this code in Python using OpenCV. I also tried to process video with cv2.VideoWriter but it was not any better. So I decided to use ffmpeg for reconstruction of video.
#recreate video from frames
call([ffmpeg_path, "-r", str(fps), "-i", "frames/frame_%d.png" , "-vcodec", str(codec), "-b", str(bitrate),"-crf", "0","-pix_fmt", "yuv420p", f"tmp/video.{extension}", "-y"])
I want to preserve the original format and at the same time preserve as many parameters of the original video as possible.
Upvotes: 0
Views: 61