Products & Services Solutions Academia Support User Community Company

Learn more about Video and Image Processing Blockset   

Write Binary File - Write binary video data to files

Library

Sinks

Description

The Write Binary File block takes video data from a Simulink model and exports it to a binary file.

This block produces a raw binary file with no header information. It has no encoded information providing the data type, frame rate or dimensionality. The video data for this block appears in row major format.

PortInputSupported Data TypesComplex Values Supported

Input

Matrix that represents the luma (Y') and chroma (Cb and Cr) components of a video stream

  • 8-, 16- 32-bit signed integer

  • 8-, 16- 32-bit unsigned integer

No

Four Character Code Video Formats

Four Character Codes (FOURCC) identify video formats. For more information about these codes, see http://www.fourcc.org.

Use the Four character code parameter to identify the video format.

Custom Video Formats

You can use the Write Binary File block to create a binary file that contains video data in a custom format.

Dialog Box

The Write Binary File dialog box appears as shown in the following figure.

File name

Specify the name of the binary file. If the location of this file is on your MATLAB path, enter the filename. If the location of this file is not on your MATLAB path, use the Browse button to specify the full path to the file including the filename.

Video format

Specify the format of the binary video data as eitherFour character codes or Custom. See Four Character Code Video Formats or Custom Video Formats for more details.

Four character code

From the list, select the binary file format.

Line ordering

Specify how the block fills the binary file. If you select Top line first, the block first fills the binary file with the first row of the video frame. It then fills the file with the other rows in increasing order. If you select Bottom line first, the block first fills the binary file with the last row of the video frame. It then fills the file with the other rows in decreasing order.

Bit stream format

Specify whether you want your data in planar or packed format.

Number of input components

Specify the number of components in the video stream. This number corresponds to the number of block input ports.

Inherit size of components from input data type

Select this check box if you want each component to have the same number of bits as the input data type. If you clear this check box, you must specify the number of bits for each component.

Component

Specify the component names.

Component order in binary file

Specify how to arrange the components in the binary file.

Interlaced video

Select this check box if the video stream represents interlaced video data.

Write signed data to output file

Select this check box if your input data is signed.

Byte order in binary file

Use this parameter to specify whether the byte ordering in the output binary file is little endian or big endian.

See Also

Read Binary File

Video and Image Processing Blockset

To Multimedia File

Signal Processing Blockset

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS