Cannot play RTSP stream from mediamtx
minhhoai1001 opened this issue · comments
Cannot play RTSP stream from mediamtx.
- I using mediamtx as RTSP server.
- I using ffmpeg to publish RTSP stream to server: ffmpeg -re -stream_loop -1 -i file.ts -c copy -f rtsp rtsp://localhost:8554/mystream
- In config.json: "url": "rtsp://localhost:8554/mystream"
I got error:
2023/12/22 09:05:58 WritePacket WebRTC Codec Not Supported
2023/12/22 09:05:58 Set ICEServers [stun:stun.l.google.com:19302]
How to fix it.
Codec problems are usually caused by a problem accessing the RTSP source. Therefore, I recommend that you make sure that your application has access to the RTSP address and that you are typing the correct RTSP address.
Another reason could be the firewall/nat structure. Stun servers do not work for this type of structure. Therefore use a turn server.