leonowski / scout-h264

a small python webserver subscribed to the h264 topic running on Moorebot Scout
1 stars 0 forks source link

Issues when connecting. #1

Open PaskoMoto opened 10 months ago

PaskoMoto commented 10 months ago

Hi. This are the messages I receive whenever I try to stream from my MooreBot Scout:

root:~# python h264_server.py 

[INFO] [1703524355.566301]: Accepted new connection
[WARN] [1703524355.894464]: Failed to send data: [Errno 32] Broken pipe
[INFO] [1703524356.588875]: Accepted new connection
[WARN] [1703524356.630539]: Failed to send data: [Errno 104] Connection reset by peer
[INFO] [1703524359.836416]: Accepted new connection
[WARN] [1703524360.194443]: Failed to send data: [Errno 32] Broken pipe
[INFO] [1703524360.858523]: Accepted new connection
[WARN] [1703524360.895533]: Failed to send data: [Errno 104] Connection reset by peer

I have tried so far with VLC and Firefox connecting at http://ip_of_bot:5005

Any clues as to what can be wrong?

Best regards and thanks for this piece of software. ;)

leonowski commented 10 months ago

Hi Paskomoto,

Sorry for the delayed response and for the lack of documentation. In addition to this server running on Moorebot, you need to run an RTMP server that connects to this python server and then relays it via RTMP. I created another project here that modies an existing nginx-rtmp server:

https://github.com/leonowski/nginx-rtmp-docker

I run this on another separate server in docker. After you build the docker container, you can run it like this:

docker run -d --restart=always -p 1935:1935 --name nginx-rtmp -e ROS_ROBOT_LOCATION=192.168.250.114 leonowski/rtmp-server

The ROS_ROBOT_LOCATION env var specifies where the ros robot running the python server is. I have already built an nginx-rtmp server and pushed it do dockerhub leonowski/rtmp-server but feel free to build and run your own.

Finally, you can connect with VLC to this server running Docker with this URL:

rtmp:///live/robot