-
Notifications
You must be signed in to change notification settings - Fork 192
Description
What is the bug in?
- Demos (python sdk, etc)
I'm testing the 'video.py' demo.
I set it to record, say, for 10 seconds (I've tried multiple durations), and the script successfully exits automatically after downloading the video.
After a few loops, it will crash with:
ERROR 12:18:36.832 ConnectionError(ReadTimeoutError("HTTPConnectionPool(host='172.27.154.51', port=8080): Read timed out."))
This is random, it can happen after 2 or 3 loops, or after 3+ hours of loops without crashing.
When adding more logging for debugging, I've even found out this error:
WARNING 17:47:12.624 ConnectionError(MaxRetryError("HTTPConnectionPool(host='172.27.154.51', port=8080): Max retries exceeded with url: /gopro/camera/control/wired_usb?p=1 (Caused by gopro_base.py:391
NewConnectionError('<urllib3.connection.HTTPConnection object at 0x1055a0ec0>: Failed to establish a new connection: [Errno 64] Host is down'))"))
These are very small video files I'm testing with, since the camera is static, shooting at 1080p. They are usually less than 2MB in size. Generally speaking they will download in less than a second.
I also found that when it times out, it's always after having already downloaded more than 90% of the file.
This is a full error output:
INFO 12:18:31.688 gopro_base.py:380
<<<<<<<<--------------
"id" : "Media List",
"protocol" : "Protocol.HTTP",
"endpoint" : "gopro/media/list",
<<<<<<<<--------------
INFO 12:18:31.706 gopro_base.py:400
-------------->>>>>>>>
"id" : "http://172.27.154.51:8080/gopro/media/list",
"status" : "ErrorCode.SUCCESS",
"protocol" : "Protocol.HTTP",
"data" : {
"identifier" : "2391561004809514755",
"media" : [
{
"directory" : "100GOPRO",
"file_system" : [
{
"filename" : "100GOPRO/GX011325.MP4",
"creation_timestamp" : "1741954696",
"modified_time" : "1741954696",
"low_res_video_size" : "1130887",
"lrv_file_size" : "-1",
}
],
}
],
},
-------------->>>>>>>>
Downloading 100GOPRO/GX011325.MP4...
INFO 12:18:31.708 gopro_base.py:380
<<<<<<<<--------------
"id" : "Camera State",
"protocol" : "Protocol.HTTP",
"endpoint" : "gopro/camera/state",
<<<<<<<<--------------
INFO 12:18:31.751 gopro_base.py:400
-------------->>>>>>>>
"id" : "http://172.27.154.51:8080/gopro/camera/state",
"status" : "ErrorCode.SUCCESS",
"protocol" : "Protocol.HTTP",
"data" : {
"StatusId.BATTERY_PRESENT" : "False",
"StatusId.INTERNAL_BATTERY_BARS" : "InternalBatteryBars.ZERO",
"StatusId.OVERHEATING" : "False",
"StatusId.BUSY" : "False",
"StatusId.QUICK_CAPTURE" : "False",
"StatusId.ENCODING" : "False",
"StatusId.LCD_LOCK" : "False",
"StatusId.VIDEO_ENCODING_DURATION" : "0",
"StatusId.WIRELESS_CONNECTIONS_ENABLED" : "True",
"StatusId.PAIRING_STATE" : "PairingState.NEVER_STARTED",
"StatusId.LAST_PAIRING_TYPE" : "LastPairingType.NOT_PAIRING",
"StatusId.WIFI_SCAN_STATE" : "WifiScanState.NEVER_STARTED",
"StatusId.LAST_WIFI_SCAN_SUCCESS" : "0",
"StatusId.WIFI_PROVISIONING_STATE" : "WifiProvisioningState.NEVER_STARTED",
"StatusId.REMOTE_CONNECTED" : "False",
"StatusId.CONNECTED_WIFI_SSID" : "",
"StatusId.ACCESS_POINT_SSID" : "Mauro cam",
"StatusId.CONNECTED_DEVICES" : "0",
"StatusId.PREVIEW_STREAM" : "False",
"StatusId.PRIMARY_STORAGE" : "PrimaryStorage.OK",
"StatusId.REMAINING_PHOTOS" : "3755",
"StatusId.REMAINING_VIDEO_TIME" : "19386",
"StatusId.PHOTOS" : "0",
"StatusId.VIDEOS" : "1",
"StatusId.OTA" : "Ota.IDLE",
"StatusId.PENDING_FW_UPDATE_CANCEL" : "False",
"StatusId.LOCATE" : "False",
"StatusId.TIMELAPSE_INTERVAL_COUNTDOWN" : "0",
"StatusId.SD_CARD_REMAINING" : "63781601",
"StatusId.PREVIEW_STREAM_AVAILABLE" : "True",
"StatusId.WIFI_BARS" : "4",
"StatusId.ACTIVE_HILIGHTS" : "0",
"StatusId.TIME_SINCE_LAST_HILIGHT" : "0",
"StatusId.MINIMUM_STATUS_POLL_PERIOD" : "500",
"StatusId.LIVEVIEW_EXPOSURE_SELECT_MODE" : "LiveviewExposureSelectMode.DISABLED",
"StatusId.LIVEVIEW_Y" : "0",
"StatusId.LIVEVIEW_X" : "0",
"StatusId.GPS_LOCK" : "False",
"StatusId.AP_MODE" : "False",
"StatusId.INTERNAL_BATTERY_PERCENTAGE" : "0",
"StatusId.MICROPHONE_ACCESSORY" : "MicrophoneAccessory.ACCESSORY_NOT_CONNECTED",
"StatusId.ZOOM_LEVEL" : "0",
"StatusId.WIRELESS_BAND" : "WirelessBand.NUM_5_GHZ",
"StatusId.ZOOM_AVAILABLE" : "False",
"StatusId.MOBILE_FRIENDLY" : "False",
"StatusId.NUM_5GHZ_AVAILABLE" : "True",
"StatusId.READY" : "True",
"StatusId.OTA_CHARGED" : "False",
"StatusId.COLD" : "False",
"StatusId.ROTATION" : "Rotation.NUM_90_DEGREES_LAYING_ON_RIGHT_SIDE_",
"StatusId.ZOOM_WHILE_ENCODING" : "False",
"StatusId.FLATMODE" : "12",
"StatusId.VIDEO_PRESET" : "8",
"StatusId.PHOTO_PRESET" : "65536",
"StatusId.TIMELAPSE_PRESET" : "131072",
"StatusId.PRESET_GROUP" : "1000",
"StatusId.PRESET" : "8",
"StatusId.PRESET_MODIFIED" : "100663304",
"StatusId.CAPTURE_DELAY_ACTIVE" : "False",
"StatusId.MEDIA_MOD_STATE" : "MediaModState.MICROPHONE_REMOVED",
"StatusId.TIME_WARP_SPEED" : "TimeWarpSpeed.NUM_15X",
"StatusId.LENS_TYPE" : "LensType.DEFAULT",
"StatusId.HINDSIGHT" : "False",
"StatusId.SCHEDULED_CAPTURE_PRESET_ID" : "4294967295",
"StatusId.SCHEDULED_CAPTURE" : "False",
"StatusId.DISPLAY_MOD_STATUS" : "DisplayModStatus.NUM_000_DISPLAY_MOD_0_HDMI_0_DISPLAY_MOD_CONNECTED_FALSE",
"StatusId.SD_CARD_WRITE_SPEED_ERROR" : "False",
"StatusId.SD_CARD_ERRORS" : "0",
"StatusId.TURBO_TRANSFER" : "False",
"StatusId.CAMERA_CONTROL_ID" : "CameraControlId.CAMERA_IDLE_NO_ONE_IS_ATTEMPTING_TO_CHANGE_CAMERA_SETTINGS",
"StatusId.USB_CONNECTED" : "False",
"StatusId.USB_CONTROLLED" : "UsbControlled.ENABLED",
"StatusId.SD_CARD_CAPACITY" : "63854084",
"StatusId.PHOTO_INTERVAL_CAPTURE_COUNT" : "0",
"SettingId.VIDEO_RESOLUTION" : "VideoResolution.NUM_1080",
"SettingId.FRAMES_PER_SECOND" : "FramesPerSecond.NUM_30_0",
"SettingId.VIDEO_TIMELAPSE_RATE" : "VideoTimelapseRate.NUM_0_5_SECONDS",
"SettingId.PHOTO_TIMELAPSE_RATE" : "PhotoTimelapseRate.NUM_0_5_SECONDS",
"SettingId.NIGHTLAPSE_RATE" : "NightlapseRate.NUM_10_SECONDS",
"SettingId.WEBCAM_DIGITAL_LENSES" : "WebcamDigitalLenses.LINEAR",
"SettingId.AUTO_POWER_DOWN" : "AutoPowerDown.NEVER",
"SettingId.LED" : "Led.ALL_ON",
"SettingId.VIDEO_ASPECT_RATIO" : "VideoAspectRatio.NUM_16_9",
"SettingId.VIDEO_LENS" : "VideoLens.SUPERVIEW",
"SettingId.PHOTO_LENS" : "PhotoLens.WIDE",
"SettingId.TIME_LAPSE_DIGITAL_LENSES" : "TimeLapseDigitalLenses.WIDE",
"SettingId.PHOTO_OUTPUT" : "PhotoOutput.STANDARD",
"SettingId.MEDIA_FORMAT" : "MediaFormat.TIME_LAPSE_VIDEO",
"SettingId.ANTI_FLICKER" : "Anti_Flicker.NUM_60HZ",
"SettingId.HYPERSMOOTH" : "Hypersmooth.AUTO_BOOST",
"SettingId.HINDSIGHT" : "Hindsight.OFF",
"SettingId.PHOTO_SINGLE_INTERVAL" : "PhotoSingleInterval.OFF",
"SettingId.PHOTO_INTERVAL_DURATION" : "PhotoIntervalDuration.OFF",
"SettingId.CONTROLS" : "Controls.PRO",
"SettingId.EASY_MODE_SPEED" : "EasyModeSpeed.NUM_1X_SPEED_LONG_BATT_LOW_LIGHT_V2_",
"SettingId.WIRELESS_BAND" : "WirelessBand.NUM_5GHZ",
"SettingId.STAR_TRAILS_LENGTH" : "StarTrailsLength.MAX",
"SettingId.VIDEO_BIT_RATE" : "VideoBitRate.STANDARD",
"SettingId.BIT_DEPTH" : "BitDepth.NUM_8_BIT",
"SettingId.PROFILES" : "Profiles.STANDARD",
"SettingId.VIDEO_EASY_MODE" : "VideoEasyMode.HIGHEST_QUALITY",
"SettingId.LAPSE_MODE" : "LapseMode.TIMEWARP",
"SettingId.MAX_LENS_MOD" : "MaxLensMod.NONE",
"SettingId.MAX_LENS_MOD_ENABLE" : "MaxLensModEnable.OFF",
"SettingId.EASY_NIGHT_PHOTO" : "EasyNightPhoto.SUPER_PHOTO",
"SettingId.MULTI_SHOT_ASPECT_RATIO" : "MultiShotAspectRatio.NUM_16_9",
"SettingId.FRAMING" : "Framing.WIDESCREEN",
},
-------------->>>>>>>>
ERROR 12:18:36.832 ConnectionError(ReadTimeoutError("HTTPConnectionPool(host='172.27.154.51', port=8080): Read timed out.")) video.py:68
I've recreated the error in 2 different Gopro 12 cameras.
Steps to reproduce the behavior:
I run the script with this loop:
python3 video.py --wired -r 10
if [ $? -ne 0 ]; then
echo "Python script crashed. Exiting loop."
break
fi
echo 'sleeping for 3'
sleep 3
done
Hardware
2 different Gopro 12 cameras.
Tested on macOS Sequoia 15.3.1 and 2 different Raspberry pi 5.
Tried with several different cables, both USB-C and USB-C to USB-A.