ESP32-CAM-Video-Recorder-junior icon indicating copy to clipboard operation
ESP32-CAM-Video-Recorder-junior copied to clipboard

Text data overlay on video

Open andremgodoy opened this issue 3 years ago • 4 comments

Hello. Thanks for this amazing contribution !! I'm currently building up a car camera with V58 and would like also to include some gps data in the bottom of screen like speed, direction angle and etc.. Where and how could I do this to the frame buffer? Thank you in advance. Andre M Godoy.

andremgodoy avatar May 04 '22 03:05 andremgodoy

I'm adding that in a future release. Basically, you have to convert every jpg from the camera to a bmp, then use some espressif routines to add the text, then convert back to jpg, and put it back into the stream that writes to the sd card. It is quite time consuming and requires lots of psram for the buffers. You might do every 10th or 100th frame, or put a small frame between 2 regular frames with just the text data. Some video players accept that but others get confused. I haven't really come up with a solution yet. Stay tuned. ...

jameszah avatar May 05 '22 04:05 jameszah

Indeed its crazy time consuming. I tried some combinations and even at CIF, I got around 1fps... not really feasible. Then, I have considered to perhaps create an additional text file with .srt extension containing the information in a format of subtitles.... I will try it out to see if it works. Thanks again !

andremgodoy avatar May 06 '22 00:05 andremgodoy

Good idea - I hadn't read the srt spec - it looks straightforward.
Amusing that there seems to be nothing more official than this: http://forum.doom9.org/archive/index.php/t-73953.html

jameszah avatar May 06 '22 14:05 jameszah

I tried some coding to create an SRT file and it's working like a charm =) Thank you for your prompt answers !!

andremgodoy avatar May 11 '22 01:05 andremgodoy

Some example code over here, if anyone is looking - it overlays time, altitude, acceleration for small rockets,

https://github.com/jameszah/ESP32-CAM-RocketCam

jameszah avatar Sep 15 '22 16:09 jameszah