Buffer too small from mjpg-streamer

Command: mjpg_streamer -i "input_http.so -H 192.168.12 -p 81" -o "output_http.so -p 8082

It capture well the ip and then I got this output:

: Success
Buffer too small
: Success

It keeps repeating. The code related: mjpg-streamer/mjpg-proxy.c at 310b29f4a94c46652b20c4b7b6e5cf24e532af39 · jacksonliam/mjpg-streamer · GitHub

maybe something to ask in mjpg-streamer GitHub on how to work around.

The http_input plugin uses a NETBUFFER_SIZE variable, but it seems to be hardcoded to 4k. There is no parameter to adjust it.

What is the format of the stream you are trying to proxy here? Probably try it with a smaller resolution. Looks like adjusting the buffer size is a reasonable feature to suggest to mjpg-streamer dev(s).

Btw 192.168.12 is a typo and should be or similar, I guess?

I created an issue here : Buffer too small · Issue #375 · jacksonliam/mjpg-streamer · GitHub

Format is jpeg and I just tried with 96x96 resolution and got same issue. The code I am using on esp32cam is here: GitHub - thomas-pegot/camera_web_server: Camera webserver esp32 with motion library

The stream related part is in src/app_httpd.c file

Yes it’s a typo.

Also it works on motioneye if I put :

But it’s pretty slow compared to opening a webpage and entering this url (I know there is a motion feature triggering but it’s way slower than the motion I used on esp32cam).

1 Like

Based on reply http_input works with mjpg-streamer as input only, which is good to know. I was already wondering why no URI can be given but a hostname only.

I dug around, try this on the command or the config
stream - Raspberry Pi MJPG-Streamer low latency - Stack Overflow

This might work too (maybe)
MJPG-Streamer on a Raspberry Pi Zero W with a USB Webcam Streaming Setup - Krystof.IO

Streaming a locally attached camera shouldn’t be an issue, but forwarding/proxing a remote network camera seems to work only with a remote mjpg-streamer, or a streamer which emulates the streaming behaviour of mjpg-streamer exactly. The http_input plugin simply is not generic webcam/RTSP/MJPEG input plugin.