Unable to create audio compressor filter

1 回表示 (過去 30 日間)
Bernardo Marino
Bernardo Marino 2016 年 8 月 26 日
コメント済み: Walter Roberson 2022 年 8 月 5 日
Function takes as input a string, the name of the video. It's read the video with the vision.VideoFileReader function and returns the same video, using the vision.VideoFileWriter function. Both the input video that the output videos have audio. Processing of a video about 6 MB, i have the output of a video more than 1 GB. The function has no errors, but i have to compress. Using the VideoCompressor, can compress the video up to 350 MB, i would use the AudioCompressor, but by obtaining an error. This is my code, the following is the error returned.
%
function [ nFrames ] = showMovie( video )
v = VideoReader(video);
videoFReader = vision.VideoFileReader(video);
videoFWriter = vision.VideoFileWriter('FrameRate',v.FrameRate,'AudioInputPort',1,'VideoCompressor', 'MJPEG Compressor','AudioCompressor','MJPEG Compressor');
[audio,fs] = audioread(video);
op=floor(fs/v.FrameRate);
nFrames = 0;
while ~isDone(videoFReader)
nFrames=nFrames+1;
frame=step(videoFReader);
audios=audio( (nFrames-1)*op + 1 : nFrames*op , : );
step(videoFWriter,frame,audios);
end
release(videoFReader);
release(videoFWriter);
end
I can't use the property 'AudioCompressor'. When i use " videoWriter.AudioCompressor = ' % tab key " , i get:
I tried both the 'Compressor MJPEG' ,the 'DV Video Encoder' and the 'ffdshow video encoder'. I get this error:
%
Error using VideoFileWriter / step
Unable to create audio compressor filter
Error in showMovie (line 15)
step (videoFWriter, frame, audios);
  4 件のコメント
Jan
Jan 2022 年 8 月 5 日
@David Levi: The original poster did notparticipate in the forum fro 6 years now. Please ask a new question.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeAudio and Video Data についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by