Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Combining Video and Audio signals

6 views
Skip to first unread message

Julia Krupic

unread,
Sep 9, 2008, 10:22:02 AM9/9/08
to
Hello,

I am trying to make a movie using Matlab. I get the video information using 'getframe' and I generate the sound with 'sound' command. I save the movie as .avi file, but when I replay it with media player, the audio signal is lost. Can you suggest how I can combine those to inputs to get audio+video movie in .avi format?

Thank you for your help!

Julia

Walter Roberson

unread,
Sep 9, 2008, 10:36:09 AM9/9/08
to
Julia Krupic wrote:

> I am trying to make a movie using Matlab. I get the video information using
> 'getframe' and I generate the sound with 'sound' command. I save the movie as
> .avi file, but when I replay it with media player, the audio signal is lost.
> Can you suggest how I can combine those to inputs to get audio+video movie in
> .avi format?

Matlab does not provide any function for the creation of movies with sound; I'm
certain of this for R2007a, and if I recall correctly the situation did not
change for R2008a.

Thus, in order to do what you want, you will have to use some kind of external
program to combine the video and sound.


--
Q = quotation(rand);
if isempty(Q); error('Quotation server filesystem problems')
else sprintf('%s',Q), end

wi...@mathworks.com

unread,
Sep 10, 2008, 5:02:51 PM9/10/08
to
Hi Julia,

Although MATLAB does not provide that capability, it is possible to do using Simulink.
Video and Image Processing blockset has a To Multimedia File block which can combine
audio and video into a single AVI file.

Witek Jachimczyk
(development manager for the Video and Image Processing blockset)

Julia Krupic

unread,
Sep 11, 2008, 6:48:02 PM9/11/08
to
Hello Witek,

Thank you for the suggestion. I've never used Simulink before. In order co combine video and audio what files exactli to you have to generate with malab (is it avi for video images and wav for sound?) And how do you synchronize them?

Thank you for your help!

Julia

wi...@mathworks.com wrote in message <ga9clr$ebv$1...@fred.mathworks.com>...

wi...@mathworks.com

unread,
Sep 12, 2008, 2:03:05 PM9/12/08
to
Hi Julia,

You would not have to generate any files from MATLAB. Instead you'd feed the raw numerical signals
(i.e. matrices) into a Simulink block that would record both video and audio steams simulaneously


into a single AVI file.

Witek

0 new messages