美文网首页
Matlab: 读写视频

Matlab: 读写视频

作者: Gavin先生 | 来源:发表于2020-11-03 09:56 被阅读0次

    matlab 读写视频参考code

    video_in_obj = VideoReader('input.mp4');
    video_ot_obj = VideoWriter('output.mp4', 'MPEG-4');
    video_ot_obj.FrameRate = video_in_obj.FrameRate;
    video_ot_obj.Quality = 100;
    open(video_ot_obj);
    
    % loop processing
    while hasFrame(video_in_obj)
    
        % read frame
        frame_in = readFrame(video_in_obj);
    
        % processing frame
        frame_ot = frame_in;
    
        % write frame
        writeVideo(video_ot_obj, frame_ot);
    end
            
    % close video
    close(video_ot_obj);
    

    相关文章

      网友评论

          本文标题:Matlab: 读写视频

          本文链接:https://www.haomeiwen.com/subject/zgkbvktx.html