User Story
As a software maintainer,
I want to add a timeout parameter to the download_video method's HTTP requests
so that the application avoids indefinite hangs when servers are unresponsive.
Background
The current download_video method in frame_story/video_describer.py uses requests.get(video_url) without a timeout. This creates reliability risks:
- Unresponsive servers or unstable connections could freeze the process indefinitely.
- No error recovery mechanism exists for stalled downloads, impacting user experience.
The method is critical for fetching remote videos (e.g., get_video_descriptions uses it to retrieve URLs like http://example.com/video.mp4).
Acceptance Criteria
User Story
As a software maintainer,
I want to add a timeout parameter to the
download_videomethod's HTTP requestsso that the application avoids indefinite hangs when servers are unresponsive.
Background
The current
download_videomethod inframe_story/video_describer.pyusesrequests.get(video_url)without a timeout. This creates reliability risks:The method is critical for fetching remote videos (e.g.,
get_video_descriptionsuses it to retrieve URLs likehttp://example.com/video.mp4).Acceptance Criteria
download_videoinvideo_describer.pyto include atimeoutparameter in therequests.getcall (default: 10 seconds).test_download_videointests/test_video_describer.pyto validate timeout behavior:requests.gettimeout and verify graceful error handling (e.g., exception raised/logged).get_video_descriptionspropagates timeout configurations todownload_videoif applicable.