Author Topic: convert yuv sequences to a single yuv video file  (Read 937 times)

Offline naeem561

  • Newbie
  • *
  • Posts: 3
  • Matlab Forum
    • View Profile
convert yuv sequences to a single yuv video file
« on: June 01, 2010, 06:40:53 PM »
Hi,
i have downloaded some yuv sequences from http://www.cipr.rpi.edu/resource/sequences/ (http://www.cipr.rpi.edu/resource/sequences/) .
i need to convert these sequences to a single yuv video or a matlab video file.
please tell me how to do it.

I would really appreciate your help.

Thanks
Naeem       

Offline naeem561

  • Newbie
  • *
  • Posts: 3
  • Matlab Forum
    • View Profile
Re: need help with code to convert yuv sequences to a mat file
« Reply #1 on: June 02, 2010, 08:48:15 AM »
I am trying to use the code below to convert yuv sequences into a single matlab video file.
but when i run the code it shows error "Invalid file identifier".

can someone please point out the mistake it would be a great help.

clear;
 %***************
for i=1:150
     i
indx=num2str(i,'%11.3d');

fid = fopen(['C:\video_sim\test_seq\tennis\tt',indx,'.yuv'],'r');
s  = fread(fid,[352 240],'uchar');
fclose(fid);
frames_t(:,:,i)=s;
end
frames=frames_t;
  for j = 1:150
       imshow(frames_t(:,:,j)/255);
        Frm(j) = getframe;
  end
fp_sec=10;
movie(Frm,2,fp_sec)



Matlab and SimuLink Development Forum

Re: need help with code to convert yuv sequences to a mat file
« Reply #1 on: June 02, 2010, 08:48:15 AM »