I have a python application using open cv and want to host it in a server so that others can use the app i designed but the problem is the app uses webcam of the person using it so like how to deploy it?
very good. i have problem this code just work in local server and when i have camere on server ...i runned this code in server that not have camera ...when i take request from clinet it not work and i cant see camera ...the server must be have camera ?? and how run this in deffrent server like vps?
thx for the tutorial , i am not able to navigate between different endpoints when using your method, after i leave the page streaming the video and come back , the camera is still activated but the page shows nothing. Is there a way to handle it ?
@@itssuhail2291 since cv2.VideoCapture(0) accesses the local webcam it would also fail on heroku as it would try to access the server's webcam and not the client's
Sir, this is great content but don't we need webrtc for web application that works with webcam or camera, as i tried this it works only locally and i was not able to make it globally.
@@InnovateYourselfashu Thank you so much for reply sir,one more question, so basically you are saying if we directly deploy this videos web app, user's webcam will be started??
Sir i tried this app by deploying but it doesn't work globally,as after deploying web cam i was not able to access web cam, can you please help me out here.
Sorry, How can I turn off the webcam when I redirect to another page ??? I got a bug: when I turn on the webcam and then I go to other page, when I come back, webcam cannot show again. I think because my streams do not turn off when I am in other page
i want to have a live stream from webcam in my webcam.html acctualy i m using yolov8 for object detection for products in a store i wanna to be video that can dispaly the webcam feed with predection the flask function are ok i don't know what to put in the html i don't want a button like here i want a video
@@InnovateYourselfashu sir i need help with this also i am using django but it will be the same i guess , i tried writing before yield if frame is None: return HttpResponseRedirect('/welcome') but nothing happen
I used HTML, python flask and be able to capture from video and save it on server and also on oracle database, but I'm facing a problem that i could not able to save it as customer name. I want to type a customer name and capture their image and store in server and also inside database, i just facing a problem that in could not able to save customer name. Please help me... Thanks on advance
y do i get this ? cv2.error: OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\imgcodecs\src\loadsave.cpp:877: error: (-215:Assertion failed) !image.empty() in function 'cv::imencode'
@@InnovateYourselfashu ok I used a phone cam for this and it didn't work. I also tried with a laptop webcam and it didn't work Do I need a usb webcam for this ? And how dose this record webcam without asking for access???
I want to read webcam video from my html into flask application. Is there a way to do it.. I spent 2 days finding it but m still stuck.. can you help me ??
@@kritikagarg8412 still unable to do it .. flask se html me video steam ho gya bt html se flask me video captur nii ho pa rha h.. so I directly captured the video using flask.
Try to use javascript to read the frames search for it in stackoverflow then you might need to convert it to bytes to stream it to a python function to rebuild the frame
Awesome video! If I were to deploy the web app so other people can access it with a link, does the code for accesing the webcam change?
I also have the same issue ...can you help if you tried it
Very good video can you also make a video on how to do this in django
Really good one Ashish!
How did you make web application?? Please ASAP I m doing now.. I am a beginner
I have a python application using open cv and want to host it in a server so that others can use the app i designed but the problem is the app uses webcam of the person using it so like how to deploy it?
You can try to use an rtsp camera or use javascript to capture webcam rather than opencv
very good. i have problem this code just work in local server and when i have camere on server ...i runned this code in server that not have camera ...when i take request from clinet it not work and i cant see camera ...the server must be have camera ?? and how run this in deffrent server like vps?
How to stream multiple videos side by side?
Really a unique one. Thanks😍😍
when we deploy this website then we can access webcam of any user or we will face some issue like permission not granted
This is for local machines only. For any user data we have to do additional changes.
thx for the tutorial , i am not able to navigate between different endpoints when using your method, after i leave the page streaming the video and come back , the camera is still activated but the page shows nothing. Is there a way to handle it ?
How can I go about doing this but outside the network / localhost?
Could you make a video showing how you would host this on the web. Tried using python anywhere but it won't let me use the webcam
Try heroku...I've also hosted my web apps there
@@itssuhail2291 since cv2.VideoCapture(0) accesses the local webcam it would also fail on heroku as it would try to access the server's webcam and not the client's
@@frroossst4267exactly my concern! Will imutils access the client's webcam?
awesome
Hello, does this include audio?
No
Sir, this is great content but don't we need webrtc for web application that works with webcam or camera, as i tried this it works only locally and i was not able to make it globally.
You can use it along with. But we can use it directly as well
@@InnovateYourselfashu Thank you so much for reply sir,one more question, so basically you are saying if we directly deploy this videos web app, user's webcam will be started??
Yes
@@InnovateYourselfashu Thank you so much.
Sir i tried this app by deploying but it doesn't work globally,as after deploying web cam i was not able to access web cam, can you please help me out here.
Sorry, How can I turn off the webcam when I redirect to another page ??? I got a bug: when I turn on the webcam and then I go to other page, when I come back, webcam cannot show again. I think because my streams do not turn off when I am in other page
Release the cam object
how to integrate this camera in angular?
i want to have a live stream from webcam in my webcam.html acctualy i m using yolov8 for object detection for products in a store i wanna to be video that can dispaly the webcam feed with predection the flask function are ok i don't know what to put in the html i don't want a button like here i want a video
How to get webcam feed if the code is deployed on webserver
You need to change the port specified for camera in the code
How to stop the yield on detection of face and redirect to another url
Put a condition before yield that will confirm that face is detected and redirect it to some other URL.
@@InnovateYourselfashu sir i need help with this also i am using django but it will be the same i guess , i tried writing before yield if frame is None: return HttpResponseRedirect('/welcome') but nothing happen
@@InnovateYourselfashu
def gen(cam):
while True:
frame = cam.get_frame(login_id)
if frame is None:
cam.__del__()
return HttpResponseRedirect('/welcome')
yield (b'--frame
'
b'Content-Type: image/jpeg
' + frame + b'
')
def face_login(request):
return StreamingHttpResponse(gen(face()), content_type='multipart/x-mixed-replace; boundary=frame')
Please provide the code
I used HTML, python flask and be able to capture from video and save it on server and also on oracle database, but I'm facing a problem that i could not able to save it as customer name.
I want to type a customer name and capture their image and store in server and also inside database, i just facing a problem that in could not able to save customer name. Please help me... Thanks on advance
hello sir.. now am working on face detection. Would you please tell me how to access the user webcam through the browser?
ImportError: cannot import name 'VideoCamera' from 'camera'
How to solve this error, sir?
Iinstalled the camera module using "pip install camera"
use camera instead of video camera
import camera from camera
AttributeError: 'VideoCamera' object has no attribute 'stream'
How to fix this error
May be you are using some variable with the name VideoCamera
y do i get this ? cv2.error: OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\imgcodecs\src\loadsave.cpp:877: error: (-215:Assertion failed) !image.empty() in function 'cv::imencode'
Unable to get the image, check the webcam
@@InnovateYourselfashu ok I used a phone cam for this and it didn't work. I also tried with a laptop webcam and it didn't work
Do I need a usb webcam for this ?
And how dose this record webcam without asking for access???
No it works with builtin camera, check whether your camera is working or not
@@InnovateYourselfashu the camera is defently working
I checked it
I used chrome. Maybe that's the issue??
It's still not working. Can u help
Can you please share GitHub link of these project
You cant deploy this on any web service
I want to read webcam video from my html into flask application. Is there a way to do it.. I spent 2 days finding it but m still stuck.. can you help me ??
Hi Aman! Have you done this via html?
@@kritikagarg8412 still unable to do it .. flask se html me video steam ho gya bt html se flask me video captur nii ho pa rha h.. so I directly captured the video using flask.
Mujhe webcam ki image save karni hai folder me... 2 din se lga hua hu
Try to use javascript to read the frames search for it in stackoverflow then you might need to convert it to bytes to stream it to a python function to rebuild the frame