VideoWriter generating unexpected results

51 visualizaciones (últimos 30 días)
Touraj Tajbakhsh
Touraj Tajbakhsh el 11 de Dic. de 2023
Comentada: Raphaël Nussbaumer el 7 de Nov. de 2024 a las 8:51
I believe the VideoWriter in R2023b has a bug. It can be reproduced with this piece of code:
v = VideoWriter('test.mp4', 'MPEG-4'); % use h264 encoding
v.FrameRate = 30;
v.Quality = 100;
open(v)
vidFrame = ones([1920, 1080, 3]);
writeVideo(v, vidFrame);
close(v)
There are black lines appearing in the output video:
I am on MacOS Sonoma 14.1.2 (M2 Ultra).
  8 comentarios
Raphaël Nussbaumer
Raphaël Nussbaumer el 7 de Nov. de 2024 a las 8:49
+1
Raphaël Nussbaumer
Raphaël Nussbaumer el 7 de Nov. de 2024 a las 8:51
Confirm @Aishwarya's solution, setting the figure size to a multiple of 8 fixed the problem
hFig = figure('position',[0 0 800 800])

Iniciar sesión para comentar.

Respuestas (0)

Productos


Versión

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by