Closed marcoabrate closed 4 hours ago
Hello
The error message tells us, there are no more (complete) images received from the camera (obviously). This can happen, if the CPU load is too high or the bus in the PI is full. However, 15 fps at this resolution is not too much data, so there should be no issues with USB 3 connections. I suppose, you connected the camera to the USB 3 ports of the PI 4
Example output that corrupts the recording (i.e. the number of frames saved is much smaller than seconds*FPS):
That is expected, because the SD card is not fast enough for saving so many single images per second. There is a similar issue in Windows, when Windows flushes the disc-cache, no more write operations are possible
A first step for narrowing down the issue is to use the xvimagesink instead of saving the images:
pipeline = Gst.parse_launch(
"tcambin name=source"
" ! video/x-raw,format=BGRx,width=1440,height=1080,framerate=15/1"
" ! videoconvert"
" ! xvimagesink"
)
If this works well, then the issue is at saving only. Which makes the things more complicated, because we have to read in the Gstreamer documentation about how to optimize the parameters for the used encoders. This is a pure software issue then. If I remember correctly, there were the omx* GStreamer modules for compression, which make a better use of the PI's hardware. You may try them.
Stefan
Hi @TIS-Stefan and thank you. I understand how the problem could be at the SD card level, and we did make sure to buy the fastest SD cards available to avoid bottlenecks in the saving process. I will try this xvimagesink
.
However, this problem persists when saving with the AVI and MP4 formats, do you have any ideas why this might be the case?
Hi marcoabrate,
However, this problem persists when saving with the AVI and MP4 formats, do you have any ideas why this might be the case? Currently not.
But i would like you to be sure about the connection between Raspi 4 and camera. Is the camera connected to a USB 3 Port? Also what type of cable is used? Some Cables with a Type C Connector especially for Smartphones might not work correctly with our cameras.
Also let us know your results with the xvimagesink
hi @TIS-Kevin, sorry for the late reply. The camera is connected to the Raspi 4 with the Amazon Basics usb-c to usb-3.0 cable.
running with the xvimagesink
does not generate any errors and I can see the videos without any frame dropping or other issues. At this point the problem must be at saving time, I will check the omx* GStreamer modules for compression @TIS-Stefan suggested.
Hello I guess, an SD card is too slow to save video video files with 1440x1024@15 fps. I never tried that on my own. If I would need to save video files on a PI, I would try something like a RAM disc, save the video there first and copy it later to SD card. Stefan
Describe the bug I am trying to record videos from a DMK 37AUX273 camera on a Raspberry Pi 4 model B, using Python. I am facing an issue with a recurring warning and a recurring error, both distruptive the recording by either shortening, corrupting or stopping the recording. The warning is:
and the error:
To Reproduce The warnings and errors occur multiple times with the scripts I am running. I am running three scripts to save videos as frames, AVI, and MP4 files. Here's the script that saves frames:
Example output that corrupts the recording (i.e. the number of frames saved is much smaller than seconds*FPS):
The other two scripts are mostly the same, only the pipeline changes. For AVI
and for MP4:
Expected behavior The scripts should save the videos of the specified length without errors.
computer used (please complete the following information):
thank you