jameszah / ESP32-CAM-VideoCam

Easy Install Video Camera App for ESP32-CAM
GNU General Public License v3.0
18 stars 5 forks source link

.bin file cannot be edited #1

Closed monroed11 closed 1 year ago

monroed11 commented 1 year ago

Hi, Apologies for asking, but do you have the .ino file for the latest version 60.4? I do not know how to edit this file. Thanks in advance

jameszah commented 1 year ago

https://github.com/jameszah/ESP32-CAM-Video-Recorder-junior/tree/master/v60

I was making a bunch of changes, but got onto some other things. This should be very close to the pre-compiled version.

It is important that you have updated esp32-arduino 2.04 -- various things broke from 1.6 --> 2.0.

monroed11 commented 1 year ago

Apologies for the late reply and thank you for uploading the v60. I have been trying to stream and record using different resolutions but unable to do so. I just opened a new issue regarding this.

jameszah commented 1 year ago

You cannot do that. The jpg is made in the camera with very fast hardware. You can write software to convert it to a rgb bitmap, change the size, convert it back to jpg and then record or transmit it, but that would take 100 - 500 milliseconds. I think that is why you need big heavy computers to transcribe video into different formats. 😀

monroed11 commented 1 year ago

I found this link regarding down-sampling an image: https://gist.github.com/408881465/6c6f5a3363bab5ee29f1b581982da464

But I am having a hard time incorporating on the code you posted.

jameszah commented 1 year ago

That is reducing the size of a bitmap. But you are starting with a jpeg, so first you have to convert it to bitmap (laborious), and then reduce the size, and then convert it back to a jpeg (very laborious).

You can configure the camera to give you a bitmap, but bitmaps are about 10 times the size of a jpeg, so storing or transmitting the image is more time-consuming,

You can find the library (and code) here in the esp32-camera library.

https://github.com/espressif/esp32-camera/blob/master/conversions/include/img_converters.h

monroed11 commented 1 year ago

Thank you so much for taking the time to explain to me. What I did is, if streaming is activated, use VGA resolution. Else, HD resolution if recording. At least I somehow achieved the FPS for both recording and streaming that I want.