0

I have this url https://www.earthcam.com/js/video/embed.php?type=h264&vid=AbbeyRoadHD1.flv

And I want get frames from the streaming and save them in Python. Is this possible? I looked into the streamlink library, but I'm not sure if it will work. Sorry for my bad English, thanks.

streams = streamlink.streams("https://www.earthcam.com/js/video/embed.php?type=h264&vid=AbbeyRoadHD1.flv")
Karl
  • 1,664
  • 2
  • 12
  • 19
Kraddy
  • 1
  • 1
  • 1

1 Answers1

-2

Copied from this question: Python - Extracting and Saving Video Frames

Try this:

import cv2
vidcap = cv2.VideoCapture('https://www.earthcam.com/js/video/embed.php?type=h264&vid=AbbeyRoadHD1.flv')
success,image = vidcap.read()
count = 0
while success:
    cv2.imwrite("frame%d.jpg" % count, image) # save frame as JPEG file      
    success,image = vidcap.read()
    print('Read a new frame: ', success)
    count += 1
Ethan Koch
  • 267
  • 1
  • 6
  • 2
    I think cv2.Videocaoture() is for vídeos un local or webcams... I'm wrong? Thanks – Kraddy Oct 26 '18 at 06:48
  • This code does not work in OpenCV 3.4.2 ... I can't find any OpenCV documentation which states you can pass a URL to it. – CraigDavid Aug 09 '19 at 20:06