im starting a new page as the old one is a bit outdated.

playing with the (in)(not)famous TTGO T-Journal

goal: creating a tamper-proof system for scientific data by linking them and their metadata to an unfalsifiable signature in the blockchain.

more informations on this research page: BIDI2021


Receiving the HTTP Stream (multipart/x-mixed-replace | Content-Type: image/jpeg ):

vlc #(IP of the board)

Saving a Picture with FFMPEG:

ffmpeg -y -i -ss 0 -vframes 1 -vcodec mjpeg -f image2 tomato.jpg

Saving + Adding a SHA256 MetaData:

ffmpeg -y -i -ss 0 -vframes 1 -vcodec mjpeg -f image2 tomato.jpg && exiv2 -M"set Exif.Photo.UserComment F902F4FD763A551D5387C224D34A9C9A0B383850386EC1509EB232A49DE5D5F9" tomato.jpg

Reading the MetaData:

exiv2 tomato.jpg
File name: tomato.jpg
File size: 8974 Bytes
MIME type: image/jpeg
Image size: 800x600
Exif comment: F902F4FD763A551D5387C224D34A9C9A0B383850386EC1509EB232A49DE5D5F9



Install Arduino IDE

Install ESP32 in the Board manager and choose “ESP32 Dev”“ or install manually thanks to (Debian)

I had this error:

 File "/home/me/Arduino/hardware/espressif/esp32/tools/esptool/", line 38, in <module>
    import serial
ImportError: No module named serial

I have fix this issue with following steps:

    Download the pyserial package from:
    tar zxvf pyserial-3.0.tar.gz
    cd pyserial
    sudo python install

Open the .ino file after downloading code from

Compile and Transfer

using the esp-cam32 AI-thinker module.


output of CameraWebServer

gstreamer to file

gst-launch-1.0 souphttpsrc location= do-timestamp=true ! multipartdemux ! image/jpeg,width=640,height=480 ! matroskamux ! filesink location=mjpeg.mkvD

The above pipeline reads a motion JPEG stream from an IP camera using the HTTP protocol, encoded as mime/multipart image/jpeg parts, and writes a Matroska motion JPEG file. The width and height properties are set in the caps to provide the Matroska multiplexer with the information to set this in the header. Timestamps are set on the buffers as they arrive from the camera. These are used by the mime/multipart demultiplexer to emit timestamps on the JPEG-encoded video frame buffers. This allows the Matroska multiplexer to timestamp the frames in the resulting file.

or aas simple as

install conda env

sudo apt install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6
wget -P /tmp
bash /tmp/
conda create --name opencv  -c conda-forge opencv 
conda activate opencv
pip install opencv-contrib-python

copypaste this to this

invest time in - library which can be used to serve up RTSP streams from resource constrained MCUs