Vision.VideofileWriter
Write video frames and audio samples to video file
Description
这视频FileWriter
OBJect writes video frames and audio samples to a video file. The video and audio can be compressed. The available compression types depend on the encoders installed on the platform.
笔记
This block supports code generation for platforms that have file I/O available. You cannot use this block with金宝app®桌面实时™software, because that product does not support file I/O.
This object performs best on platforms with Version 11 or later of Windows Media®Player software. This object supports only uncompressed RGB24 AVI files on Linux®and苹果电脑platforms.
此对象的生成代码依赖于预先构建的库文件。您可以在MATLAB之外运行此代码®environment, or redeploy it, but be sure to account for these extra library files when doing so. The packNGo function creates a single zip file containing all of the pieces required to run or rebuild this code. SeepackNGo
((Simulink Coder)为了more information.
要运行从对象生成的可执行文件,您可能需要将预编译的共享库文件添加到系统路径。看mATLAB CoderandSimulink Shared Library Dependencies有关详细信息。
笔记
从R2016b开始,而不是使用step
method to perform the operation defined by the System object™, you can call the object with arguments, as if it were a function. For example,y = step(obj,x)
andy = obj(x)
perform equivalent operations.
creation
句法
Description
VIDEOFWRITER = VISION.VIDEOFILEWRITER
returns a video file writer System object,videoFWriter
。它将视频帧写入未压缩的output.avi
'视频文件。每个电话step
方法写一个视频框架。
videofwriter = vision.videofilewriter(
returns a video file writer object,Filename
)videoFWriter
that writes video to a file,Filename
。这file type can be。avi
,,,,。mj2
,,,,.mp4
, 和.m4v
specified by theFileFormat
财产。
videofwriter = vision.videofilewriter(___,,,,
configures the video file writer properties, specified as one or more name-value pair arguments. Unspecified properties have default values.名称,价值
)
name
is a property name andValue
is the corresponding value.name
must appear inside single quotes (''
)。您可以指定几个name-value pair arguments in any order asname1,Value1,...,NameN,ValueN
。
Example:videofwriter = vision.videofilewriter('myfile.avi',,,,'帧,,,,。。。videoFReader.info.VideoFrameRate);
Properties
用法
句法
Description
写一个视频框架,Filename
= videoFWriter(videoFrame
)videoFrame
,,,,to the output file. The input video can be anm-by-n-by-3 TrueColor RGB视频框架或m-by-ngrayscale video frame..
写入输入视频的一帧,Filename
= videoFWriter(videoFrame
,,,,audio
)videoFrame
, 和one frame of audio samples,audio
,,,,to the output file. This applies when you set the声音的InputPort
财产为true
。
写YCBCR的一帧4:2:2视频和一个音频样本框架,Filename
= videoFWriter(videoFrame
,,,,y
,,,,CB
,,,,cr
,,,,audio
)audio
,,,,to the output file. This applies when you set the声音的InputPort
totrue
and thefilecolorspace
财产yCBcr4:2:2
'。CB和CR颜色成分的宽度必须是Y宽度的一半。
输入参数
Output Arguments
对象功能
要使用对象函数,请将系统对象指定为第一个输入参数。例如,释放名称的系统对象的系统资源OBJ
,,,,use this syntax:
释放(OBJ)