I have been trying to host a video to rtsp stream on a gcp vm instance.
My steps were :
a) Set up an external ip to my vm, and setup firewall rules to allow traffick.
b)Install mediamtx to my vm and start a server with ./mediamtx
c)install ffmpeg and stream my video with : ffmpeg -i video.mp4 -rtsp_transport tcp -f rtsp rtsp://externalip:8554/live.stream
The stream runs locally, but when I try to access in with vlc or ffplay rtsp://externalip:8554/live.stream, I cannot connect. I tried to ping the server from the client side, and it works ok.
What am I missing ? Are there any more configurations I need to do to my project ?
Since you can access the rtsp locally to the said machine, you can consider to check your ffmpeg configuration. Based on the mediamtx documentation, you may want to see this link to configure ffmpeg.
Also, you may want to verify if this could be folder permission issue (i.e. folder security user, group, etc) since you can only access it locally.
Lastly, you can also look if all the ports below are allowed thru the firewall.
You can see ports needed to be allowed from the documentation of mediamtx thru this link. For the documentation on how to allow ports on the GCP’s VPC, you may want to see this guide.
I hope this information is helpful.
If you need further assistance, you can always file a ticket on our support team.