parent
7a32a3eb6f
commit
f4aae2b2e5
|
@ -46,8 +46,8 @@ services:
|
|||
- RUN_BY_COMPOSE=true
|
||||
depends_on:
|
||||
- bridge
|
||||
# Use wait-for-it to wait for the bridge at port 8554 to be ready and then run /app/main.py
|
||||
command: /bin/bash -c "wait-for-it.sh -h bridge -p 1935 --timeout=0 --strict -- echo "done" && python /app/main.py"
|
||||
# Use wait-for-it to wait for the bridge at port 8888 (hls) to be ready and then run /app/main.py
|
||||
# command: /bin/bash -c "wait-for-it.sh -h bridge -p 8888 --timeout=0 --strict -- echo "done" && python /app/main.py"
|
||||
|
||||
|
||||
# How can this be run and a .env file passed?
|
||||
|
|
3
main.py
3
main.py
|
@ -90,7 +90,8 @@ for i in range(5):
|
|||
# If it is not, print an error and exit
|
||||
try:
|
||||
# Replace rtsp with http and the port with 8888
|
||||
r = requests.get(URL.replace("rtsp", "http").replace(":8554", ":8888"))
|
||||
url = URL.replace("rtsp", "http").replace(":8554", ":8888")
|
||||
r = requests.get(url)
|
||||
if r.status_code != 200:
|
||||
print("HLS stream not available, please check your URL")
|
||||
exit()
|
||||
|
|
Loading…
Reference in New Issue