Borrar filtros
Borrar filtros

how to add text to an mp4 using videoReader?

1 visualización (últimos 30 días)
james Brown
james Brown el 8 de Ag. de 2018
I'll start by saying I don't have insertText so have been using text(). The code I have so far is:
v = VideoReader('1.mp4');
vidWidth = v.Width;
vidHeight = v.Height;
mov = struct('cdata',zeros(vidHeight,vidWidth,3,'uint8'),'colormap',[]);
k = 1;
while hasFrame(v)
mov(k).cdata = readFrame(v);
k = k+1;
end
hf = figure;
set(hf,'position',[150 150 vidWidth vidHeight]);
text(0.5,0.5,'LLLLLLL');
hold on
movie(hf,mov,1,v.FrameRate);
hold off
it seems the text is getting written behind the video and not being added directly to the video. have tried bringing the text to the front in case that was the problem to no avail. does anyone have any ideas?

Respuestas (0)

Categorías

Más información sobre Language Support en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by