필터 지우기
필터 지우기

Video Reader and Audio

조회 수: 4 (최근 30일)
Jessica
Jessica 2018년 5월 22일
답변: Walter Roberson 2018년 5월 22일
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);

채택된 답변

Walter Roberson
Walter Roberson 2018년 5월 22일

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기

태그

제품


릴리스

R2016b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by