How do I add generated audio to a silent video?

조회 수: 6 (최근 30일)
Shilpa Sonawane
Shilpa Sonawane 2025년 2월 3일
댓글: Image Analyst 2025년 2월 6일
I have written following code to add generated audio into a silent video. It executes smoothly. But the audio doesn't get added into the "newvideo.avi" file.
videoFReader = vision.VideoFileReader('silent_pgwl1s.avi');
% videoFWriter = vision.VideoFileWriter('newvideo.avi','AudioInputPort',true);
videoFWriter = vision.VideoFileWriter('newvideo.avi','AudioInputPort',true);
for i=1:75
% videoFrame = step(videoFReader);
% step(videoFWriter, videoFrame,predgwo);
videoFrame= step(videoFReader);
videoFWriter(videoFrame,orgvf) ;
end
release(videoFReader);
release(videoFWriter);

채택된 답변

Image Analyst
Image Analyst 2025년 2월 3일
  댓글 수: 3
Shilpa Sonawane
Shilpa Sonawane 2025년 2월 6일
I tried the same code. But it didn't work. please guide me to resolve the problem.
Image Analyst
Image Analyst 2025년 2월 6일
@Shilpa Sonawane, sorry, I haven't tried it and I don't have time. Try calling tech support.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by