Skip to content

Commit 7056364

Browse files
committed
update
1 parent 2a02d7a commit 7056364

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

education-ai-suite/smart-classroom/api/endpoints.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,14 +237,15 @@ def start_video_analytics_pipeline(
237237
service = va_services[x_session_id]
238238

239239
# Prepare pipeline options
240+
from utils.config_loader import config
240241
project_config = RuntimeConfig.get_section("Project")
241242
location = project_config.get("location", "outputs")
242243
name = project_config.get("name", "default")
243244
output_dir = os.path.join(location, name, x_session_id, "va")
244245

245246
options = PipelineOptions(
246247
output_dir=output_dir,
247-
output_rtsp="rtsp://127.0.0.1:8554",
248+
output_rtsp=config.va_pipeline.output_rtsp_url,
248249
)
249250

250251
# Launch pipeline
@@ -260,12 +261,11 @@ def start_video_analytics_pipeline(
260261
detail=f"Failed to start pipeline '{request.pipeline_name}'",
261262
)
262263

263-
hls_base_url = "http://127.0.0.1:8888"
264264
response_data = {
265265
"status": "success",
266266
"pipeline_name": request.pipeline_name,
267267
"session_id": x_session_id,
268-
"hls_stream": f"{hls_base_url}/{request.pipeline_name}_stream",
268+
"hls_stream": f"{config.va_pipeline.hls_base_url}/{request.pipeline_name}_stream",
269269
"overlays_embedded": True
270270
}
271271

education-ai-suite/smart-classroom/config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,5 @@ va_pipeline:
6464
mediamtx_path: components/va/bin/mediamtx
6565
plugin_path: components/va
6666
rtsp_codec: h264 # h264 or h265
67+
output_rtsp_url: rtsp://127.0.0.1:8554
68+
hls_base_url: http://127.0.0.1:8888

0 commit comments

Comments
 (0)