Video Reader and Audio
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Jessica
le 22 Mai 2018
Réponse apportée : Walter Roberson
le 22 Mai 2018
I am using the below code to merge multiple videos together. Is it possible to save the audio from one of the videos to the merged (new) video?
vid1 = VideoReader(LeftVideo,'CurrentTime',TimeOffset_L);%Left
vid2 = VideoReader(RightVideo,'CurrentTime',TimeOffset_R);%Right
videoPlayer = vision.VideoPlayer;
outputVideo = VideoWriter(OutPutVideo);
outputVideo.FrameRate = vid1.FrameRate;
open(outputVideo);
for i=1:60
img1 = readFrame(vid1);
img2 = readFrame(vid2);
imgt=[img1 img2];
step(videoPlayer, imgt);%play video
writeVideo(outputVideo, imgt); %record new video
end
release(videoPlayer);
close(outputVideo);
0 commentaires
Réponse acceptée
Walter Roberson
le 22 Mai 2018
https://www.mathworks.com/help/matlab/ref/videowriter.html VideoWriter cannot write audio.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Audio I/O and Waveform Generation 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!