Video Steganography, audio steganography.
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi everyone! I hided data in audio and put it back in video(without audio), then I extracted the audio to retrieve data but i can't get any data. Please help me!
This is my code to extract audio
[input_file, Fs] = audioread('video.avi');
audiowrite('.\audio\audio.wav', input_file, Fs);
This is my code to create video without audio.
% create video without audio
vidObj = VideoReader(vidfile);
videoOut = VideoWriter('ouput1','Uncompressed AVI');
videoOut.FrameRate = vidObj.FrameRate;
open(videoOut);
while hasFrame(vidObj)
vidFrame = readFrame(vidObj);
writeVideo(videoOut,vidFrame);
end
close(videoOut);
And this is my code to merge audio and video(without audio) into stego video.
%add audio into stego video
video_filename = 'ouput1.avi';
audio_filename = '.\audio\stego_audio.wav';
out_filename = '.\stego_video\stego_audio.avi';
videoFReader = VideoReader(video_filename);
FR = videoFReader.FrameRate;
[AUDIO,Fs] = audioread(audio_filename);
SamplesPerFrame = floor(Fs/FR);
videoFWriter = vision.VideoFileWriter(out_filename, 'AudioInputPort', true, 'FrameRate', FR);
framenum = 0;
% read every frame and add audio that(every frame)
while hasFrame(videoFReader)
videoFrame = readFrame(videoFReader);
this_audio = AUDIO(framenum*SamplesPerFrame + 1 : min(end, (framenum+1)*SamplesPerFrame), :);
if size(this_audio,1) < SamplesPerFrame
this_audio(SamplesPerFrame,:) = 0; %zero pad short frames
end
step(videoFWriter,videoFrame, this_audio);
framenum = framenum + 1;
end
delete(videoFReader);
release(videoFWriter);
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Audio and Video Data dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!