pikvm / ustreamer

µStreamer - Lightweight and fast MJPEG-HTTP streamer
https://pikvm.org
GNU General Public License v3.0
1.67k stars 223 forks source link

Whether a remote mjpg-server can be used instead of a built-in HTTP server #98

Closed Luupw3d closed 3 years ago

Luupw3d commented 3 years ago

Hi! This is prefect project, but I want to transport mjpeg-stream to remote server to use it on the Internet instead of LAN.How can I do this? Do you have a plan to do a Client/Server separation project? Thanks a lot.

mdevaev commented 3 years ago

Ignore the deleted comment, I turned on my head and reread your post again. How do you imagine sending a stream to a remote server? For example, there is nothing stopping you from using nginx right now to restream the video.

Luupw3d commented 3 years ago

Use the --host MY_SERVER_IP and --port MY_SERVER_PORT and how should I receive MJPG-Stream on my server?Just install the Nginx? Sorry for this stupid question because I'm a rookie in this field:(

mdevaev commented 3 years ago

@Luupw3d Hey, I'm not refusing to solve your problem. I'm just like a squirrel in a wheel right now because of the release of my hardware. Sorry, I completely forgot to write to you. The host and port parameters are responsible for the native ustreamer server. It does not support push data, which means that your remote web server must pull the video stream.

Like this:

Luupw3d commented 3 years ago

Got it.I've successfully implemented server functionality, but as you said, the client can't actively push the stream, only the server can actively pull the stream.

mdevaev commented 3 years ago

In theory, you can push a stream using rtsp and gstreamer, if that means anything to you. Ustreamer can write a stream to memory, this stream can be extracted and fed to gstreamer, and the latter can push anywhere in a format that suits you. However, I don't guarantee that there will be no delays in this scheme. If I can vouch for the speed of ustreamer, then gstreamer will add 150-300 ms.