MATLAB: VideoWriter with 4k images

4kfractalsimage processingimages

Is there any way to use 4k images to make 4k videos with the VideoWriter function? Is outputs an error message saying its maximal resolution if (close to) 1080p. Or any other way to assemble 4k videos from 4k images with matlab? I used the function to create 1080p videos from 1080p images and it worked very well.

Best Answer

  • In R2017a,
    obj = VideoWriter('test.avi');
    data = rand(4096);
    does not give any error message.
    If I switch to obj = VideoWriter('test2.mp4', 'MPEG-4') then it allows me to write one frame but for the second one gives the non-specific error,
    Error using VideoWriter/writeVideo (line 369)
    Could not write a video frame.