Skip to main content
Arduino

Return to Question

edited title
Link
jsotola
  • 1.5k
  • 2
  • 12
  • 20

How many FPS I can theoriticallytheoretically get for streaming frame from OV7670 with this setup?

miscalculated
Source Link

Setup:

OV7670 -> STM32F103... --USART--> ESP01 --UDP--> Gateway --> Internet --> Server

I want to achieve a real-time streaming experience.

Here is my analysis:

  • According to the OV7670 datasheet, the camera supports 30 FPS for a ×ばつ480 image.

  • Based on the ESP8266 (ESP01) datasheet and using the built-in firmware with AT commands, I can enable transparent mode for UART-WIFI passthrough with UDP. This means any incoming data from the MCU through UART will be directly forwarded to the server through UDP.

  • The datasheet also states that the AT commands can adjust the baud rate up to a maximum of ×ばつ40 baud. If one baud is represented by 9 bits (including 1 stop bit)(削除) If one baud is represented by 9 bits (including 1 stop bit), then the theoretical bit rate is 41.472 Mb/s. (削除ここまで) For safety, thenuse ×ばつ39 baud rate which the theoretical bit rate is 414.4724928 Mb/s.

  • Since I’m using UDP as the transport protocol, I need to limit the UDP buffer size. Inspired by YouTube video streams that also use UDP, I found 1357 bytes to be an effective packet size when I Analyzed this with Wireshark.

  • If I configure the OV7670 in RGB555 (15-bit) format, then 1 pixel = 16 bits = 2 bytes, leaving 1 unused bit as the most significant bit (MSB) of the first byte.

  • To maximize the unused 1 bit, I plan to use it as a flag to indicate the beginning of a frame. If set to zero, the pixel is not the start of a new frame; if set to one, it indicates the start of a new frame.

  • Using this bytestream, the MCU's task as a frame buffer (I prefer say byte buffer) is to simply forward per 1357 bytes from the camera (including setting the frame indicator flag) to USART through DMA for faster since it's direct memory access. The MCU waits for the buffer to fill (up to 1357 bytes) before sending it to the ESP8266.

  • The server will reconstruct this bytestream into image frames, given that it understands the custom protocol.

  • At a resolution of ×ばつ240, eachEach frame would require ×ばつ2(削除) ×ばつ2 (削除ここまで) ×ばつ2 bytes for (削除) QVGA (削除ここまで) QCIF, or 1(削除) 1.2288 (削除ここまで) 0.22883072 Mbit per frame. Therefore,(削除) 30 FPS = 36.864 Mb/s (削除ここまで) 3015 FPS = 364.864608 Mb/s, which comfortably fits within the ESP8266's USART-WIFI UDP passthrough capability of 414.4724928 Mb/s.

Is there anything I missed with my setup/calculation? Assume the network is reliable and UDP packet loss is tolerable (handled by server).

Setup:

OV7670 -> STM32F103... --USART--> ESP01 --UDP--> Gateway --> Internet --> Server

I want to achieve a real-time streaming experience.

Here is my analysis:

  • According to the OV7670 datasheet, the camera supports 30 FPS for a ×ばつ480 image.

  • Based on the ESP8266 (ESP01) datasheet and using the built-in firmware with AT commands, I can enable transparent mode for UART-WIFI passthrough with UDP. This means any incoming data from the MCU through UART will be directly forwarded to the server through UDP.

  • The datasheet also states that the AT commands can adjust the baud rate up to a maximum of ×ばつ40 baud. If one baud is represented by 9 bits (including 1 stop bit), then the theoretical bit rate is 41.472 Mb/s.

  • Since I’m using UDP as the transport protocol, I need to limit the UDP buffer size. Inspired by YouTube video streams that also use UDP, I found 1357 bytes to be an effective packet size when I Analyzed this with Wireshark.

  • If I configure the OV7670 in RGB555 (15-bit) format, then 1 pixel = 16 bits = 2 bytes, leaving 1 unused bit as the most significant bit (MSB) of the first byte.

  • To maximize the unused 1 bit, I plan to use it as a flag to indicate the beginning of a frame. If set to zero, the pixel is not the start of a new frame; if set to one, it indicates the start of a new frame.

  • Using this bytestream, the MCU's task as a frame buffer (I prefer say byte buffer) is to simply forward per 1357 bytes from the camera (including setting the frame indicator flag) to USART through DMA for faster since it's direct memory access. The MCU waits for the buffer to fill (up to 1357 bytes) before sending it to the ESP8266.

  • The server will reconstruct this bytestream into image frames, given that it understands the custom protocol.

  • At a resolution of ×ばつ240, each frame would require ×ばつ2 bytes, or 1.2288 Mbit per frame. Therefore, 30 FPS = 36.864 Mb/s, which comfortably fits within the ESP8266's USART-WIFI UDP passthrough capability of 41.472 Mb/s.

Is there anything I missed with my setup/calculation? Assume the network is reliable and UDP packet loss is tolerable (handled by server).

Setup:

OV7670 -> STM32F103... --USART--> ESP01 --UDP--> Gateway --> Internet --> Server

I want to achieve a real-time streaming experience.

Here is my analysis:

  • According to the OV7670 datasheet, the camera supports 30 FPS for a ×ばつ480 image.

  • Based on the ESP8266 (ESP01) datasheet and using the built-in firmware with AT commands, I can enable transparent mode for UART-WIFI passthrough with UDP. This means any incoming data from the MCU through UART will be directly forwarded to the server through UDP.

  • The datasheet also states that the AT commands can adjust the baud rate up to a maximum of ×ばつ40 baud. (削除) If one baud is represented by 9 bits (including 1 stop bit), then the theoretical bit rate is 41.472 Mb/s. (削除ここまで) For safety, use ×ばつ39 baud rate which the theoretical bit rate is 4.4928 Mb/s.

  • Since I’m using UDP as the transport protocol, I need to limit the UDP buffer size. Inspired by YouTube video streams that also use UDP, I found 1357 bytes to be an effective packet size when I Analyzed this with Wireshark.

  • If I configure the OV7670 in RGB555 (15-bit) format, then 1 pixel = 16 bits = 2 bytes, leaving 1 unused bit as the most significant bit (MSB) of the first byte.

  • To maximize the unused 1 bit, I plan to use it as a flag to indicate the beginning of a frame. If set to zero, the pixel is not the start of a new frame; if set to one, it indicates the start of a new frame.

  • Using this bytestream, the MCU's task as a frame buffer (I prefer say byte buffer) is to simply forward per 1357 bytes from the camera (including setting the frame indicator flag) to USART through DMA for faster since it's direct memory access. The MCU waits for the buffer to fill (up to 1357 bytes) before sending it to the ESP8266.

  • The server will reconstruct this bytestream into image frames, given that it understands the custom protocol.

  • Each frame would require (削除) ×ばつ2 (削除ここまで) ×ばつ2 bytes for (削除) QVGA (削除ここまで) QCIF, or (削除) 1.2288 (削除ここまで) 0.3072 Mbit per frame. Therefore,(削除) 30 FPS = 36.864 Mb/s (削除ここまで) 15 FPS = 4.608 Mb/s, which comfortably fits within the ESP8266's USART-WIFI UDP passthrough capability of 4.4928 Mb/s.

Is there anything I missed with my setup/calculation? Assume the network is reliable and UDP packet loss is tolerable (handled by server).

added 55 characters in body
Source Link

Setup:

OV7670 -> STM32F103... --USART--> ESP01 --UDP--> Gateway --> Internet --> Server

I want to achieve a real-time streaming experience.

Here is my analysis:

  • According to the OV7670 datasheet, the camera supports 30 FPS for a ×ばつ480 image.

  • Based on the ESP8266 (ESP01) datasheet and using the built-in firmware with AT commands, I can enable transparent mode for UART-WIFI passthrough with UDP. This means any incoming data from the MCU through UART will be directly forwarded to the server through UDP.

  • The datasheet also states that the AT commands can adjust the baud rate up to a maximum of ×ばつ40 baud. If one baud is represented by 9 bits (including 1 stop bit), then the theoretical bit rate is 41.472 Mb/s.

  • Since I’m using UDP as the transport protocol, I need to limit the UDP buffer size. Inspired by YouTube video streams that also use UDP, I found 1357 bytes to be an effective packet size when I Analyzed this with Wireshark.

  • If I configure the OV7670 in RGB555 (15-bit) format, then 1 pixel = 16 bits = 2 bytes, leaving 1 unused bit as the most significant bit (MSB) of the first byte.

  • To maximize the unused 1 bit, I plan to use it as a flag to indicate the beginning of a frame. If set to zero, the pixel is not the start of a new frame; if set to one, it indicates the start of a new frame.

  • Using this bytestream, the MCU's task as a frame buffer (I prefer say byte buffer) is to simply forward per 1357 bytes from the camera (including setting the frame indicator flag) to USART through DMA for faster since it's direct memory access. The MCU waits for the buffer to fill (up to 1357 bytes) before sending it to the ESP8266.

  • The server will reconstruct this bytestream into image frames, given that it understands the custom protocol.

  • At a resolution of ×ばつ240, each frame would require ×ばつ2 bytes, or 1.2288 Mbit per frame. Therefore, 30 FPS = 36.864 Mb/s, which comfortably fits within the ESP8266's USART-WIFI UDP passthrough capability of 41.472 Mb/s.

Is there anything I missed with my setup/calculation? Assume the network is reliable and UDP packet loss is tolerable (handled by server).

Setup:

OV7670 -> STM32F103... --USART--> ESP01 --UDP--> Gateway --> Internet --> Server

I want to achieve a real-time streaming experience.

Here is my analysis:

  • According to the OV7670 datasheet, the camera supports 30 FPS for a ×ばつ480 image.

  • Based on the ESP8266 (ESP01) datasheet and using the built-in firmware with AT commands, I can enable transparent mode for UART-WIFI passthrough with UDP. This means any incoming data from the MCU through UART will be directly forwarded to the server through UDP.

  • The datasheet also states that the AT commands can adjust the baud rate up to a maximum of ×ばつ40 baud. If one baud is represented by 9 bits (including 1 stop bit), then the theoretical bit rate is 41.472 Mb/s.

  • Since I’m using UDP as the transport protocol, I need to limit the UDP buffer size. Inspired by YouTube video streams that also use UDP, I found 1357 bytes to be an effective packet size when I Analyzed this with Wireshark.

  • If I configure the OV7670 in RGB555 (15-bit) format, then 1 pixel = 16 bits = 2 bytes, leaving 1 unused bit as the most significant bit (MSB) of the first byte.

  • To maximize the unused 1 bit, I plan to use it as a flag to indicate the beginning of a frame. If set to zero, the pixel is not the start of a new frame; if set to one, it indicates the start of a new frame.

  • Using this bytestream, the MCU's task as a frame buffer (I prefer say byte buffer) is to simply forward per 1357 bytes from the camera (including setting the frame indicator flag) to USART. The MCU waits for the buffer to fill (up to 1357 bytes) before sending it to the ESP8266.

  • The server will reconstruct this bytestream into image frames, given that it understands the custom protocol.

  • At a resolution of ×ばつ240, each frame would require ×ばつ2 bytes, or 1.2288 Mbit per frame. Therefore, 30 FPS = 36.864 Mb/s, which comfortably fits within the ESP8266's USART-WIFI UDP passthrough capability of 41.472 Mb/s.

Is there anything I missed with my setup/calculation? Assume the network is reliable and UDP packet loss is tolerable (handled by server).

Setup:

OV7670 -> STM32F103... --USART--> ESP01 --UDP--> Gateway --> Internet --> Server

I want to achieve a real-time streaming experience.

Here is my analysis:

  • According to the OV7670 datasheet, the camera supports 30 FPS for a ×ばつ480 image.

  • Based on the ESP8266 (ESP01) datasheet and using the built-in firmware with AT commands, I can enable transparent mode for UART-WIFI passthrough with UDP. This means any incoming data from the MCU through UART will be directly forwarded to the server through UDP.

  • The datasheet also states that the AT commands can adjust the baud rate up to a maximum of ×ばつ40 baud. If one baud is represented by 9 bits (including 1 stop bit), then the theoretical bit rate is 41.472 Mb/s.

  • Since I’m using UDP as the transport protocol, I need to limit the UDP buffer size. Inspired by YouTube video streams that also use UDP, I found 1357 bytes to be an effective packet size when I Analyzed this with Wireshark.

  • If I configure the OV7670 in RGB555 (15-bit) format, then 1 pixel = 16 bits = 2 bytes, leaving 1 unused bit as the most significant bit (MSB) of the first byte.

  • To maximize the unused 1 bit, I plan to use it as a flag to indicate the beginning of a frame. If set to zero, the pixel is not the start of a new frame; if set to one, it indicates the start of a new frame.

  • Using this bytestream, the MCU's task as a frame buffer (I prefer say byte buffer) is to simply forward per 1357 bytes from the camera (including setting the frame indicator flag) to USART through DMA for faster since it's direct memory access. The MCU waits for the buffer to fill (up to 1357 bytes) before sending it to the ESP8266.

  • The server will reconstruct this bytestream into image frames, given that it understands the custom protocol.

  • At a resolution of ×ばつ240, each frame would require ×ばつ2 bytes, or 1.2288 Mbit per frame. Therefore, 30 FPS = 36.864 Mb/s, which comfortably fits within the ESP8266's USART-WIFI UDP passthrough capability of 41.472 Mb/s.

Is there anything I missed with my setup/calculation? Assume the network is reliable and UDP packet loss is tolerable (handled by server).

added 170 characters in body
Source Link
Loading
added 98 characters in body
Source Link
Loading
added 245 characters in body
Source Link
Loading
Source Link
Loading

AltStyle によって変換されたページ (->オリジナル) /