| Signal Processing Blockset™ | ![]() |
Write video frames and/or audio samples to multimedia file
Signal Processing Sinks
dspsnks4
The To Multimedia File block writes video frames and/or audio samples to a multimedia (.avi) file. Video processing requires the Video and Image Processing Blockset™ product.
You can also compress the video frames or audio samples by selecting a compression algorithm. You can connect as many of the input ports as you want. Therefore, you can control what type of video and/or audio is sent to the multimedia file.
Note This block supports code generation for platforms that have file I/O available. This excludes RTWin (Real-Time Windows Target™ software, which does not support file I/O). This block performs best on platforms with Version 9.0 or later of DirectX® software and Version 9.0 or later of Windows Media® software. On UNIX® and Linux® platforms, this block supports only uncompressed RGB24 AVI files whose size is less than 2 GB. |
| Port | Input | Supported Data Types | Supports Complex Values? |
|---|---|---|---|
Image | M-by-N-by-3 matrix RGB signal. To record M-by-N intensity video, use the Matrix Concatenate block to create an RGB signal. |
| No |
R, G, B | Matrix that represents one plane of the RGB video stream. Inputs to the R, G, or B port must have the same dimensions and data type. | Same as Image port | No |
Audio | Vector of audio data |
| No |
For the block to display video data properly, double- and single-precision floating-point pixel values must be between 0 and 1. For any other data type, the pixel values must be between the minimum and maximum values supported by their data type.
Use the Output file name parameter to specify the name of the multimedia file to which to write. This file is saved in your current directory. To specify a different file, click the Browse button, and then navigate to the new file.
Use the Write parameter to specify whether the block writes video frames and/or audio samples to the multimedia file. The choices are Video and audio, Video only, or Audio only.
Use the Audio compressor parameter to specify the type of compression algorithm to use to compress the audio data. This compression reduces the size of the multimedia file. Choose None (uncompressed) to save uncompressed audio data to the multimedia file. The other items available in this parameter list are the audio compression algorithms installed on your system. For information about a specific audio compressor, see its documentation.
Use the Video compressor parameter to specify the type of compression algorithm to use to compress the video data. This compression reduces the size of the multimedia file. Choose None (uncompressed) to save uncompressed video data to the multimedia file. The other items available in this parameter list are the video compression algorithms installed on your system. For information about a specific video compressor, see its documentation.
Use the Image signal parameter to specify how the block accepts a color video signal. If you select One multidimensional signal, the block accepts an M-by-N-by-3 color video signal. To record M-by-N intensity video, use the Matrix Concatenate block to create an RGB signal. If you select Separate color signals, additional ports appear on the block. Each port accepts one M-by-N plane of an RGB video stream.
Note All the To Multimedia File block input signals must have the same frame period. You might need to adjust the frame size of the audio signal so that the frame period of the video signal is the same as the frame period of the audio signal. To calculate the frame size, divide the frequency of the audio signal (samples per second) by the frame rate of the video signal (frames per second). |

Specify the name of the multimedia file to which to write. This file is saved in your current directory. To specify a different file, click the Browse button, and then navigate to the new file.
Specify whether the block writes video frames and/or audio samples to the multimedia file. The choices are Video and audio, Video only, or Audio only.
Select the type of compression algorithm to use to compress the audio data.
Select the type of compression algorithm to use to compress the video data.
Specify how the block accepts a color video signal. If you select One multidimensional signal, the block accepts an M-by-N-by-P color video signal, where P is the number of color planes, at one port. If you select Separate color signals, additional ports appear on the block. Each port accepts one M-by-N plane of an RGB video stream.
| From Multimedia File | Signal Processing Blockset |
| To Wave File | Signal Processing Blockset |
| Frame Rate Display | Video and Image Processing Blockset |
| To Video Display | Video and Image Processing Blockset |
| Video To Workspace | Video and Image Processing Blockset |
| Video Viewer | Video and Image Processing Blockset |
![]() | To Audio Device | To Wave Device | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |