フィルターのクリア

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 Center および File ExchangeAudio 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