How to convert video to bitstream with matlab function?

Hello! Somebody knows how to convert a video to bitstream by using function in matlab?
Thanks

Answers (1)

vidcontent = fileread('YourVideoFile.avi');
bitstream = reshape(dec2bin(vidcontent,8).', [], 1) - '0';

2 Comments

How to reverse this process? means how to get the video from the bit stream in receiver end?
reconstructed_vid = dec2bin(reshape(char(bitstream + '0'), 8, []).');

Sign in to comment.

Asked:

on 30 Oct 2015

Commented:

on 31 Oct 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!