from App to html Live Stream

asked 2018-06-02 16:24:52 -0600

WaleedJubeh gravatar image

Hello... i have connect my camera to python app by VideoCapture and its work fine and i made some image processing to the video ... so i'm asking how can i after finish from image processing make a live stream of my video to html page ... i mean how can have an ip or something to broadcast my video to ip that can showed in a web page ?

i'm using python ... so let my code to make the issue simple to be like that :

import cv2
import numpy as np
import os
import sys
import pickle
from PIL import Image

cap=cv2.VideoCapture(0)
while(True):

    ret,frame=cap.read()
    gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
    cv2.imshow('gray?',gray)
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break;

cap.release()    
cv2.waitKey(0)
cv2.destroyAllWindows()

Any Help please

edit retag flag offensive close merge delete

Comments

did you build your cv2 with gstreamer support ? (look at cv2.getBuildInformation())

in that case you could use the VideoWriter with a gstreamer ip sink pipeline

berak gravatar imageberak ( 2018-06-03 00:44:49 -0600 )edit