Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
frames per second changes
    4 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
i have a code in which the frames per second changes and also the duration of video
clc
clear all
vidObj = VideoReader('foreman.avi');
Frames=vidObj;
numFrames = vidObj.NumberOfFrames;
pickind='bmp';
f1=fullfile('E:','rr1ames');
if (exist(f1) == 0)
    mkdir (f1);
end
for k = 1:numFrames
    a=read( Frames,k);
    strtemp=strcat('E:\rr1ames\',int2str(k),'.',pickind);
    imwrite(a,strtemp);
end
path ='E:\rr1ames\' ;
files = dir( [path '*.bmp'] );
pickind='bmp';
pickind='bmp';
writerObj = VideoWriter('rnewd2.avi');
open(writerObj)
for k = 1:numFrames
    image = ((imread(fullfile(path,files(k).name))));
      writeVideo(writerObj,image);
  end
close(writerObj);
vidObj = VideoReader('rnewd2.avi');
the result i get for foreman is
 Video Parameters: 14.99 frames per second, RGB24 176x144.
Duration-10.01
for rnewd2.avi is
 Video Parameters:  30 frames per second, RGB24 176x144.
Duration-5
plz help
1 comentario
Respuestas (1)
  Walter Roberson
      
      
 el 12 de Abr. de 2013
        You did not configure a frame rate for writerObj, so it used its default frame rate.
0 comentarios
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

