Replies: 9 comments 58 replies
-
|
Do you mean to embed this into the stored JPEG image file? Starting the camera driver alone grabs about 700 kB of PSRAM. This is already enough to prevent decoding the 1600x1200 max. image size in 16 bit color depth of the OV2640 sensor of the widely used cheap ESP32 cam boards with 4 MB PSRAM. Thus it might be possible to use a smaller image size and then this will create a degradation of image quality by decoding and reencoding. A theoretical and quite hacky approach could be to exchange the last few MCU‘s of the JPEG stream and print the date string into the lower right corner of the image. I am not even sure, that this is really possible to achieve. Overall I would definitely prefer to move these steps to stronger hardware and just use sane naming conventions for the image files. Even a Raspberry Pi is a hardware monster in comparison to an ESP32. |
Beta Was this translation helpful? Give feedback.
-
|
Does tasmota have direct access to the framebuffer of the images before they are encoded to jpeg? 1600x1200x8bit is already ~3x700kB, so maybe not. |
Beta Was this translation helpful? Give feedback.
-
|
if this is used as evidence I would not alter the original jpeg encoding of the cam. Could be important to qualify it as unmodified. Isn’t KDENlive a GUI tool? Have you looked into ffmpeg to produce video from images from the commandline? I would write a 2 line cron script on the Pi to wget the image and then add the time to metadata with exiftool. Or if you insist to have the time visible in the video, use convert commandline tool to add text to an image (I would still keep the original for evidence). Your special usecase - one small image every 5s - might be doable on the esp. For video in general to decode jpeg, add text and encode in realtime I don't think it could work. Prove me wrong :) |
Beta Was this translation helpful? Give feedback.
-
|
I have also been looking for any alternative ESP32-CAM module firmware that has a timestamp feature... and so far I have only found this one Arduino sketch. I believe it overlays the timestamp in the framebuffer before writing the image to the jpeg stream. Of course this is also useless to me because it does not have any of the Tasmota features I need to use such as camera controls like white balance and exposure adjustment... also doesn't have Rules... I use these Tasmota features to set camera settings at sunrise and sunset to keep exposure as constant as possible throughout the time lapse sequence. But maybe the code could be useful... wish I knew more about coding or I would attempt to make this work myself, but under the circumstances I just don't have the time to learn how to do this on my own.... that and I don't currently have another ESP32-CAM module to test alternative firmware on :-( |
Beta Was this translation helpful? Give feedback.
-
|
This is obviously the crappiest image possible and only 240*240, but it proves, that the data flow is possible.
I will have to rework parts of cam and img module, which have some issues with the latest updates to JPEGDEC (a while ago). The principle may also work with the webcam driver using wcstore command. |
Beta Was this translation helpful? Give feedback.
-
|
I am still testing some things. The camera seems to be out of focus, I just grabbed this from the drawer. I have no idea about the blocky artefacts at the bottom ATM. Anyway ... 1280x720 pixels are in reach and in the first few minutes writing to an SD-card there was no obvious memory leak. Here is a bit of code to show how much there is to do: This will not work with the current official But maybe you can adapt it for the |
Beta Was this translation helpful? Give feedback.
-
|
So I've been experimenting with using Claude AI to try building Tasmota Berry scripts that can perform a timestamp overlay, and it keeps telling me that "it isn't possible since Berry can't access the framebuffer directly". However, the AI also kept telling me that it could modify the Tasmota webcam driver to allow for creating a date/time stamp on the image while it's still in the framebuffer and it spit this out... although I don't have enough coding knowledge to know how to integrate this code into the existing driver, and no idea if it will work either way... |
Beta Was this translation helpful? Give feedback.
-
|
It was a complete fresh |
Beta Was this translation helpful? Give feedback.
-
|
OK... after re-reading over this entire thread, I started over in VS Code, created a new fresh folder where a fresh DL of Tasmota-Development 15.1.0.3 is unzipped. There is definitely a noticeable lag (about 2 seconds as sfromis noted) between the time the Pi requests an image, and the time it is finally displayed on the Pi. This lag is causing the Pi and Tasmota to throw errors when there is no image ready to grab from the ESP32. This is causing far too many lost frames for it to be usable for compiling timelapse vids, but I'm assuming I can only fix this by getting a better ESP32 or by reducing the Also, the timestamp in the picture, does NOT match the time the picture was requested (which is also the timestamp in the image filename). The timestamps in the images are reflecting the lag-time after being processed by the Berry script... this is not what I was hoping for :-( |
Beta Was this translation helpful? Give feedback.




Uh oh!
There was an error while loading. Please reload this page.
-
I believe it would be very useful to many users if the Tasmota32 WebCam build had a feature which would overlay a basic date & timestamp on the webcam image. I believe the usefulness of this is self apparent, and I am actually surprised that this feature doesn't already exist. Trying to use a 3rd-party Linux app to add a timestamp to an already existing image is clunky and time-consuming at best. And tying to add timestamps to an image sequence of thousands of images taken for compiling into a time-lapse video is excruciatingly slow and cumbersome... Is there some reason that Tasmota can't place a timestamp on it's image stream? If this feature can't be added to the base code, can it be done using Berry? And if so are there any working Berry code examples of how this could be done?

Was thinking of something like this timestamp at the top of the image...
Beta Was this translation helpful? Give feedback.
All reactions