MATLAB: How to convert video file to bitstream in matlab

video

Hi, Do you know, how can i convert a video file with avi format to bitstream in Matab? i should convert avi file to bitstream and then send it as 2048-by-1 column vectors to a channel. it would be appreciated if you could help me.

Best Answer

You can use fopen/fread/fclose to read the file as a stream of bytes, which you can then convert to bits and send in whatever format you like.
Note that the receiving end might need to write the received data to a file in order to be able to display the AVI. This is because there is a difference between the video file (that you are asking to send) and the video content, and most commonly systems only have operations to display individual frames (decoded content) from memory, or to decode AVI files from files; in cases where they have operations to decode AVI streams, the streams are not going to be in the same format as files.