Unable to create audio compressor filter
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Jan
el 5 de Ag. de 2022
@David Levi: The original poster did notparticipate in the forum fro 6 years now. Please ask a new question.
Respuestas (0)
Ver también
Categorías
Más información sobre Audio and Video Data en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!