我想使用USB帧抓取器和Matlab的图像采集工具箱录制视频。我设法录制了它,但遗憾的是视频中没有声音。我的帧抓取器有一个s-video端口,我正在使用它。我知道S-video可以捕捉视频,但我不明白它为什么不在Matlab中保存音频。我使用了一些桌面视频捕获软件,他们通过视频获得了音频。这是我目前的代码
vid=videoinput('winvideo', 1, 'YUY2_360x240');
src = getselectedsource(vid);
vid.SelectedSourceName = 'svideo';
vid.FramesPerTrigger = 1;
vid.FramesPerTrigger = Inf;
vid.LoggingMode = 'disk';
% auto save of the file by the date of the day
j=1;
while exist(fullfile(folder_name,[strrep(date,'-','_') '_' num2str(ID) '_'
num2str(j) '.avi']), 'file') == 2
j=j+1;
end
diskLogger =VideoWriter(fullfile(folder_name,[strrep(date,'-','_') '_'
num2str(ID) '_' num2str(j) '.avi']),'Motion JPEG AVI');
vid.DiskLogger = diskLogger;
setappdata(handles.connect1,'vid',vid);
%% reset used variables and reopen comport
start(vid);
getappdata(handles.connect1,'vid',vid);
stop(vid);
如何在视频中获取音频? 感谢