Answers for "play videos in python"

15

play videos in python

from playsound import playsound
playsound('audio.mp3')
Posted by: Guest on May-06-2020
1

how to play videos using python

import numpy as np
import cv2

cap = cv2.VideoCapture('vtest.avi')

while(cap.isOpened()):
    ret, frame = cap.read()

    gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)

    cv2.imshow('frame',gray)
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break

cap.release()
cv2.destroyAllWindows()
Posted by: Guest on August-02-2020

Code answers related to "play videos in python"

Python Answers by Framework

Browse Popular Code Answers by Language