Skip to content

Commit f08fa10

Browse files
authored
feat: make QuickCam rtsp_transport configurable (#129)
1 parent 693bb6d commit f08fa10

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

octoeverywhere/Webcam/quickcam.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,14 +663,17 @@ def Connect(self, url:str) -> None:
663663
# For auth, if there's a username and password it will already be in the URL in the http:// basic auth style,
664664
# So there's nothing else we need to do.
665665

666+
# Use a default value of 0, so both TCP and UDP can be used.
667+
rtspTransport = os.environ.get("OCTO_QUICKCAM_RTSP_TRANSPORT", "0")
668+
666669
# Notes
667670
# We use the default jpeg image quality, for the same FPS reasons above.
668671
# pylint: disable=consider-using-with # We handle this on our own.
669672
self.Process = subprocess.Popen(["ffmpeg",
670673
"-hide_banner",
671674
"-y",
672675
"-loglevel", logLevel,
673-
"-rtsp_transport", "0", # Use a value of 0, so both TCP and UDP can be used.
676+
"-rtsp_transport", rtspTransport,
674677
"-use_wallclock_as_timestamps", "1",
675678
"-i", url,
676679
"-filter:v", f"fps={fps}",

0 commit comments

Comments
 (0)