Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1st second in AVI is from a previous video #57

Open
jmn4472 opened this issue Apr 1, 2024 · 3 comments
Open

1st second in AVI is from a previous video #57

jmn4472 opened this issue Apr 1, 2024 · 3 comments

Comments

@jmn4472
Copy link

jmn4472 commented Apr 1, 2024

Hi all,
All is working correctly with that fabulous project, exception with the AVI files sent to Telegram. It seems that the 1st second is coming from a previous AVI (a bit hard to certify). I see clearly a change in what is recorded after one second (or around one second). For example a person is present in the 1st second but suddenly has disappeared in the rest of the video.
I used INO 9.6 IDE 1.8.19 with AI ThinkerESP32 CAM board selected. Partition scheme is "Huge APP 3MB NO OTA/1MB SPIFFS".
In the Cam, the speed to record is the default.
The board is not from AI Thinker but from Aliexpress. Could the issue be due to the use of the wrong board selected?
Regards

@jameszah
Copy link
Owner

jameszah commented Apr 2, 2024

I take it that you compiled and downloaded it. There is a issue with the defaults changing in the newer versions of the library.
You could add these six lines to fetch and discard the old images in the queue. Just before this line about "should take zero time".

fb_next = get_good_jpeg(); // should take zero time

   fb_next = get_good_jpeg();
   esp_camera_fb_return(fb_next);
   fb_next = get_good_jpeg();
   esp_camera_fb_return(fb_next);
   fb_next = get_good_jpeg();
   esp_camera_fb_return(fb_next);

    fb_next = get_good_jpeg();               // should take zero time    
    last_frame_time = millis();
    start_avi();

@jmn4472
Copy link
Author

jmn4472 commented Apr 2, 2024

Yes, compiled and working very well but this behaviour. I will install these lines next days.
On another project named "ESP32-CAM-Video-Recorder" you recommand to install C1 220µF between +5V and GND on the ESP32 and a 10K resistor IO13 and Vout of the PIR. Do you think these are still mandatory?

@jameszah
Copy link
Owner

jameszah commented Apr 2, 2024

The capacitor is to prevent brownouts - if you have a good power supply, you can skip it.
The 10k is to reduce the current from the pir, as we just need the voltage level, not the current.
Some of those pir boards will give you lots of current to drive lights or big circuits.
I think it is more necessary if you are using an sd card, as the sd card is tied to io13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants