Google+ 機動學論壇(TALKING MECHANISMS): 製作動畫movie轉avi

2007年6月16日 星期六

製作動畫movie轉avi


大家好,我是b94607012 生機(二) 楊善喬
可能有些人覺得每次做完作業還要將其camstudio錄製花時間,在一個機緣巧合的情況之下,發現了matlab可以直接將函式執行結果轉成avi檔。其中控制碼如下,希望對大家有所裨益!(為什麼不做一個實例看看?

Create an Audio/Video Interleaved (AVI) movie from MATLAB movie

Syntax

  • movie2avi(mov,filename)
  • movie2avi(mov,filename,param,value,param,value...)

Description

  • movie2avi(mov,filename) creates the AVI movie filename from the MATLAB movie mov.
  • movie2avi(mov,filename,param,value,param,value...) creates the AVI movie filename from the MATLAB movie mov using the specified parameter settings.

Parameter

Value

Default

'colormap'

An m-by-3 matrix defining the colormap to be used for indexed AVI movies, where m must be no greater than 256 (236 if using Indeo compression).

There is no default colormap.
'compression' A text string specifying the compression codec to use.

On Windows:
'Indeo3'
'Indeo5'
'Cinepak'
'MSVC'
'RLE'
'None'

On UNIX:
'None'

'Indeo5' on Windows. 'None' on UNIX.

To use a custom compression codec, specify the four-character code that identifies the codec (typically included in the codec documentation). The addframe function reports an error if it can not find the specified custom compressor.

'fps'

A scalar value specifying the speed of the AVI movie in frames per second (fps). 15 fps

'keyframe'

For compressors that support temporal compression, this is the number of key frames per second. 2 key frames per second.

'quality'

A number between 0 and 100 the specifies the desired quality of the output. Higher numbers result in higher video quality and larger file sizes. Lower numbers result in lower video quality and smaller file sizes. This parameter has no effect on uncompressed movies.

75

'videoname'

A descriptive name for the video stream. This parameter must be no greater than 64 characters long. The default is the filename.