nadjieb / cpp-mjpeg-streamer

C++ MJPEG over HTTP Library
MIT License
140 stars 39 forks source link

Two stream in same port #35

Closed DiagnozHub closed 1 year ago

DiagnozHub commented 2 years ago

Hello, Can I send stream from two cameras into same port (8081 for example), but with different paths (publish id) ?

localhost:8081/uid1 localhost:8081/uid2

CYL-Oscar commented 2 years ago

Yes! You can refer to the example and modify it.

for example : streamer.start(8080); /////////////////////// streamer.publish("/uid1", std::string(buff_bgr.begin(), buff_bgr.end())); streamer.publish("/uid2", std::string(buff_bgr.begin(), buff_bgr.end()));