User avatar
peepo
Posts: 306
Joined: Sun Oct 21, 2012 9:36 am

Re: How to add text-overlay with raspivid?

Wed Feb 12, 2014 8:35 am

depending on your skills and requirements:
https://github.com/tasanakorn/rpi-mmal-demo

is relatively painless way in, though there are other methods about.

~:"

TESKAn
Posts: 11
Joined: Tue May 21, 2013 8:09 pm

Re: How to add text-overlay with raspivid?

Wed Feb 12, 2014 2:27 pm

I managed to get it working by displaying video from camera on one layer and drawing text with OGL on another layer.

ChiYuan
Posts: 2
Joined: Mon Feb 10, 2014 6:25 pm

Re: How to add text-overlay with raspivid?

Wed Feb 12, 2014 11:14 pm

I'm hoping to get it work based on Raspivid.c. I'm not sure if modify encode callback would be enough since it doesn't get whole frame pixels. Any hints? If it is going to be too much of changes, I'd possibly need to start from scratch then.

lagurus
Posts: 46
Joined: Wed Aug 07, 2013 8:02 am

Re: How to add text-overlay with raspivid?

Thu Feb 13, 2014 9:56 am

TESKAn wrote:I managed to get it working by displaying video from camera on one layer and drawing text with OGL on another layer.
Are you able to save H264 video with text-overlay (1920x1080 with 30fps)? Or you are talking "only" about displaying preview with
text-overlay?

TESKAn
Posts: 11
Joined: Tue May 21, 2013 8:09 pm

Re: How to add text-overlay with raspivid?

Thu Feb 13, 2014 10:38 am

Double post...
Last edited by TESKAn on Thu Feb 13, 2014 10:40 am, edited 1 time in total.

TESKAn
Posts: 11
Joined: Tue May 21, 2013 8:09 pm

Re: How to add text-overlay with raspivid?

Thu Feb 13, 2014 10:39 am

Only display text over video preview. To be able to save video with overlay, you should convert video to OGL texture and use it on some surface and then save that as video. I got that working too with a ugly hack by combining video - to - texture demo and raspivid, but it did not work in real - time.
To get something usable, get camera working with OMX to get video directly to texture on GPU.

RpiName
Posts: 716
Joined: Sat Jul 06, 2013 3:14 am

Re: How to add text-overlay with raspivid?

Sun Jun 08, 2014 10:55 pm

JBAnovling wrote:Is it possible to add a text-overlay directly to the video captured with raspivid ?
Not with raspivid, but with this driver, yes:
http://www.linux-projects.org/modules/n ... toryid=162

this is a demo:
http://linux-projects.org/downloads/exa ... l_demo.mkv

Return to “Camera board”