Forums

OpenCv Problem

hello this code working, and print True.

import cv2

cap = cv2.VideoCapture('http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerMeltdowns.mp4')
print(cap.isOpened())
if cap.isOpened():
    cap.set(cv2.CAP_PROP_POS_MSEC,10000)
    ret,frame = cap.read()
    cv2.imwrite("image.jpg", frame)

But THis Code not working printing false.

import cv2


cap = cv2.VideoCapture('https://socialgods.xyz/4.mp4')
print(cap.isOpened())
if cap.isOpened():
    cap.set(cv2.CAP_PROP_POS_MSEC,10000)
    ret,frame = cap.read()
    cv2.imwrite("image.jpg", frame)

........................................................................... Both code running fine in my pc... please i want solution for this

[edit by admin: formatting]

In a free account, you can only access websites on our whitelist of official public APIs. If that site has one, then please post a link to the API documentation -- then we can look into adding it to the list.