hello i have a tft 1.3 display and a usb capture device hooked up to a raspberry pi. im…
- User
hello i have a tft 1.3 display and a usb capture device hooked up to a raspberry pi. im using ffmpeg as a pipeline to port the image of the capture card to the tft display. the command looks like this ffmpeg -f v4l2 -input_format mjpeg -video_size 640x480 -framerate 30 -i /dev/video0 -vf "scale=240:240,format=bgra" -pix_fmt bgra -vcodec rawvideo -f fbdev /dev/fb0. now i have installed opencv lite on my raspberrypi zero and i want to try to use opencv to do the same thing. can you help me with a python code that uses opencv as a pipeline between the capture card /dev/video0 and the tft buffer /dev/fb0
- Assistant
- User
im getting this: python3 framebuffer.py Traceback (most recent call last): File "/home/raspberrypi/framebuffer.py", line 42, in fb.write(frame_resized_bgra.tobytes()) OSError: [Errno 28] No space left on device
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/raspberrypi/framebuffer.py", line 48, in cv2.destroyAllWindows() cv2.error: OpenCV(4.10.0-dev) /home/raspberrypi/opencv/modules/highgui/src/window.cpp:1295: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvDestroyAllWindows'
- Assistant
- User
getting this File "/home/raspberrypi/framebuffer2.py", line 5 cap = cv2.VideoCapture(‘/dev/video0’, cv2.CAP_V4L2) ^ SyntaxError: invalid character '‘' (U+2018)
- Assistant
The error you're encountering is due to the use of a non-standard single quote character (
‘U+2018) instead of a standard single quote ('). This can happen when copying and pasting code from formatted text where typographic quotes are used.Let's correct the quotes and ensure all characters are standard:
- User
getting this error: sudo python3 framebuffer2.py Traceback (most recent call last): File "/home/raspberrypi/framebuffer2.py", line 41, in fb.write(frame_resized_bgra.tobytes()[:frame_size]) OSError: [Errno 28] No space left on device
- Assistant