A short description of how to create your own image files from your own compressed video file. 1. Install ffmpeg and mplayer on your machine 2. Decode your video into yuv format 3. Have a matlab/C/Python routine that reads in the bytes from your yuv file More detailed information: ============================================= 1. Install ffmpeg and mplayer on your machine 1a. If you have a mac: open "terminal" and type brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-libass --with-libquvi --with-libvorbis --with-libvpx --with-opus --with-x265 and brew install mplayer ----- 1b. If you have some form of linux: apt-get install ffmpeg apt-get install mplayer ----- 1c. If you have a windows pc: Go to http://oss.netfarm.it/mplayer-win32.php Scroll down to "Build selection table", and click on "Generic link". This downloads a .z7 file, which you can uncompress. Inside the compressed folder is a "mplayer.exe" and "mencoder.exe" which you can use to play videos. Note that below, instead of "mplayer" use "./mplayer.exe" ============================================= Step 2: In a terminal or cygwin window, run: mencoder -nosound -ovc raw -of rawvideo -rawvideo w=1920:h=1080:yv12 -vf format=i420 my_video.mp4 -o myvideo_all.yuv To determine your appropriate values for "w" and "h" in the w=1920:h=1080, you can first run "mplayer my_video.mp4" and look at the reported spatial resolution of your video. If you'd rather work on a smaller image, modify the previous line by adding ",scale=960:540" to halve the size of the above image. Example: mencoder -nosound -ovc raw -of rawvideo -rawvideo w=1920:h=1080:yv12 -vf format=i420,scale=960:540 my_video.mp4 -o myvideo_all.yuv Step 2a: Verify the file using: mplayer -demuxer rawvideo -rawvideo w=1920:h=1080:i420 myvideo_all.yuv ============================================= step 3: read yuv frame in Matlab. This is just one example. There are several more efficient ways to do it than this! frame_to_read=1; % or 10, or which ever frame number rows=1080; columns=1920; fd1=fopen ('myvideo_all.yuv','rb'); % need to check if fd1~=-1 % read dummy information for ff=1:frame_to_read tmp=fread(fd1,rows*columns); % read the Y component tmp2=fread(fd1,rows*columns/2); % read the U and V components end im1=reshape(tmp,columns,rows)'; % don't forget to transpose % im1 now contains the "frame_to_read"th frame from the myvideo_all.yuv file