I have managed to perform some benchmarking, if anyone is interested. I've used a USB UVC HD camera module from AliExpress (search for "usb camera module" and you'll find camera chips on a PCB), but I suppose an appropriate webcam should also apply here. I tested it on a TP-Link TL-MR3020 router (4M flash, 32M RAM, ar9331@400MHz) with OpenWRT CC on it. As an addition I had to install mjpg-streamer and kmod-video-uvc packages. Next I connected the router to a laptop via two ethernet cables and a gigabit switch in-between. Finally, I ran mjpg-streamer from command line via a serial shell and passed on various parameters to the input module. While the program was running I opened firefox on the laptop and pointed it towards the IP of the router so that the video stream was displayed.
The bandwidth was measures using iptraf on the laptop and cpu/memory was measured on the router itself via a serial cable by using the "top" command. During measurements I moved the camera around a bit from dark to light places and from places with no motion (wall) to heavily swinging the camera around to get lots of "motion". Meanwhile I measured the minimum and maximum values I could get on the counter. Here are the results:
FPS = 1, CPU = 10 - 20%, mfree = 11.8k, BW = 36 - 56 kB/s
FPS = 5, CPU = 3 - 3%, mfree = 11.7k, BW = 130 - 290 kB/s
FPS = 10, CPU = 5 - 20%, mfree = 11.7k, BW = 280 - 580 kB/s
FPS = 20, CPU = 14 - 24%, mfree = 11.7k, BW = 560 - 1120 kB/s
FPS = 30, CPU = 10 - 27%, mfree = 11.8k, BW = 690 - 1440 kB/s
FPS = 1, CPU = 4 - 12%, mfree = 10.3k, BW = 36 - 110 kB/s
FPS = 5, CPU = 2 - 12%, mfree = 10.1k, BW = 200 - 450 kB/s
FPS = 10, CPU = 3 - 9%, mfree = 10.3k, BW = 400 - 970 kB/s
FPS = 20, CPU = 5 - 21%, mfree = 10.2k, BW = 650 - 1540 kB/s
FPS = 30, CPU = 9 - 20%, mfree = 10.3k, BW = 1025 - 2210 kB/s
FPS = 1, CPU = 1 - 11%, mfree = 6.7k, BW = 75 - 120 kB/s
FPS = 5, CPU = 6 - 14%, mfree = 6.6k, BW = 420 - 560 kB/s
FPS = 10, CPU = 10 - 20%, mfree = 6.7k, BW = 785 - 1080 kB/s
FPS = 20, CPU = 12 - 27%, mfree = 6.4k, BW = 1250 - 1920 kB/s
FPS = 30, CPU = 19 - 32%, mfree = 6.5k, BW = 1600 - 3200 kB/s
FPS = 1, CPU = 2 - 9%, mfree = 3.4k, BW = 120 - 240 kB/s
FPS = 5, CPU = 9 - 14%, mfree = 3.5k, BW = 640 - 1060 kB/s
FPS = 10, CPU = 14 - 19%, mfree = 3.6k, BW = 1230 - 1850 kB/s
FPS = 20, CPU = 18 - 27%, mfree = 3.7k, BW = 1800 - 1780 kB/s
FPS = 30, CPU = 20 - 29%, mfree = 3.7k, BW = 1940 - 3100 kB/s
FPS = 1, CPU = 6 - 11%, mfree = 1.1k, BW = 180 - 250 kB/s
FPS = 5, CPU = 9 - 13%, mfree = 1.0k, BW = 760 - 1140 kB/s
FPS = 10, CPU = 10 - 17%, mfree = 1.2k, BW = 1440 - 1915 kB/s
FPS = 20, CPU = 14 - 21%, mfree = 0.9k, BW = 1600 - 2320 kB/s ***
FPS = 30, CPU = 17 - 26%, mfree = 0.9k, BW = 1680 - 2700 kB/s ***
Notice: I skipped the 1024x768 resolution because I had some problems with auto-lighting, as the camera didn't automatically adjust to the proper exposure. This only happened at resolution 1024x768, all others worked properly.
Comments: CPU usage was very low throughout the tests. Memory usage apparently increased with the resolution, but not the frame rate. The bandwidth increased with resolution as well as framerate and seems like very high for some streams. I've noticed that the bandwidth didn't increase proportional to the amout of motion applied to the camera. Instead it seemed to be dependent on what kind of surface the camera was recording i.e. a single-color plain wall showed the lowest bandwidth requirements while a heavily painted door (lots of pictures and graffiti) gave the highest results. In addition, most settings seem to perform quite well except at the final two measurements (full-hd resolution @ 20 to 30 fps) which gave a bit choppy playback (some frames were dropped and the video wasn't smooth). *** These tests were performed on mjpg-streamer with MJPG video format that the camera supported. I also wanted to perform benchmarks with ffmpeg/ffserver and gstreamer, but it would appear that the router does not have sufficient flash memory space to support these applications.
Conclusion: Apparently MJPEG truly is a waste of bandwidth, so if you plan to stream high resolution/framerate MJPEG from many cameras, perhaps get a secondary set of ethernet cables that are exclusively used for video streaming, so that your daily browsing habits/downloads don't interfere with the video stream. Either that or get some other camera that is capable in streaming in a better format i.e. h264. I have yet to test transcoding from YUYV/MJPEG to h264 on a more powerful hardware and compare the results.