How to Integrate Webcam with Flask application

Поделиться
HTML-код
  • Опубликовано: 18 ноя 2024

Комментарии • 68

  • @angelgabrielortiz-rodrigue2937
    @angelgabrielortiz-rodrigue2937 2 года назад +1

    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?

    • @archangelharsh0074
      @archangelharsh0074 Год назад

      I also have the same issue ...can you help if you tried it

  • @shivanshgangrade5409
    @shivanshgangrade5409 4 года назад +3

    Very good video can you also make a video on how to do this in django

  • @ppjaywant
    @ppjaywant 2 года назад

    Really good one Ashish!

  • @feelingamazing
    @feelingamazing 3 года назад

    How did you make web application?? Please ASAP I m doing now.. I am a beginner

  • @shubhankarbiswas1233
    @shubhankarbiswas1233 4 года назад +1

    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?

    • @souravrs657
      @souravrs657 4 года назад

      You can try to use an rtsp camera or use javascript to capture webcam rather than opencv

  • @mohammadsaraei4899
    @mohammadsaraei4899 3 года назад

    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?

  • @zaidsiddique5777
    @zaidsiddique5777 3 года назад +1

    How to stream multiple videos side by side?

  • @akankshagupta1826
    @akankshagupta1826 3 года назад

    Really a unique one. Thanks😍😍

  • @mansiverma7747
    @mansiverma7747 Год назад

    when we deploy this website then we can access webcam of any user or we will face some issue like permission not granted

    • @InnovateYourselfashu
      @InnovateYourselfashu  Год назад

      This is for local machines only. For any user data we have to do additional changes.

  • @joelfankam3719
    @joelfankam3719 4 года назад

    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 ?

  • @markojudas
    @markojudas 3 года назад

    How can I go about doing this but outside the network / localhost?

  • @MrSupermonkeyman34
    @MrSupermonkeyman34 3 года назад +1

    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

    • @itssuhail2291
      @itssuhail2291 3 года назад

      Try heroku...I've also hosted my web apps there

    • @frroossst4267
      @frroossst4267 2 года назад

      @@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

    • @ayushghosh5855
      @ayushghosh5855 9 месяцев назад

      @@frroossst4267exactly my concern! Will imutils access the client's webcam?

  • @rangabharath4253
    @rangabharath4253 4 года назад +2

    awesome

  • @meliodasy2822
    @meliodasy2822 4 года назад +1

    Hello, does this include audio?

  • @rohankurdekar7920
    @rohankurdekar7920 4 года назад +1

    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
      @InnovateYourselfashu  4 года назад

      You can use it along with. But we can use it directly as well

    • @rohankurdekar7920
      @rohankurdekar7920 4 года назад

      @@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??

    • @InnovateYourselfashu
      @InnovateYourselfashu  4 года назад

      Yes

    • @rohankurdekar7920
      @rohankurdekar7920 4 года назад

      @@InnovateYourselfashu Thank you so much.

    • @rohankurdekar7920
      @rohankurdekar7920 4 года назад

      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.

  • @hieuluutrong8591
    @hieuluutrong8591 3 года назад

    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

  • @chihebnouri5541
    @chihebnouri5541 9 месяцев назад

    how to integrate this camera in angular?

  • @mayssamayel6259
    @mayssamayel6259 7 месяцев назад

    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

  • @pranshusati5818
    @pranshusati5818 Год назад

    How to get webcam feed if the code is deployed on webserver

  • @sasank174
    @sasank174 3 года назад

    How to stop the yield on detection of face and redirect to another url

    • @InnovateYourselfashu
      @InnovateYourselfashu  3 года назад

      Put a condition before yield that will confirm that face is detected and redirect it to some other URL.

    • @hanhan-nx2nh
      @hanhan-nx2nh 2 года назад

      @@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

    • @hanhan-nx2nh
      @hanhan-nx2nh 2 года назад

      @@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')

  • @ashwinraj8918
    @ashwinraj8918 4 года назад +1

    Please provide the code

  • @bimalkhanal3940
    @bimalkhanal3940 3 года назад

    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

    • @dharmaraj5737
      @dharmaraj5737 3 года назад

      hello sir.. now am working on face detection. Would you please tell me how to access the user webcam through the browser?

  • @rameshk8013
    @rameshk8013 3 года назад

    ImportError: cannot import name 'VideoCamera' from 'camera'
    How to solve this error, sir?
    Iinstalled the camera module using "pip install camera"

    • @harshitsharma8215
      @harshitsharma8215 3 года назад

      use camera instead of video camera
      import camera from camera

  • @akshitkalita5032
    @akshitkalita5032 4 года назад

    AttributeError: 'VideoCamera' object has no attribute 'stream'
    How to fix this error

  • @odedbir5303
    @odedbir5303 4 года назад

    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
      @InnovateYourselfashu  4 года назад

      Unable to get the image, check the webcam

    • @odedbir5303
      @odedbir5303 4 года назад

      @@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???

    • @InnovateYourselfashu
      @InnovateYourselfashu  4 года назад

      No it works with builtin camera, check whether your camera is working or not

    • @odedbir5303
      @odedbir5303 4 года назад

      @@InnovateYourselfashu the camera is defently working
      I checked it
      I used chrome. Maybe that's the issue??

    • @odedbir5303
      @odedbir5303 4 года назад

      It's still not working. Can u help

  • @aifarmerokay
    @aifarmerokay 4 года назад

    Can you please share GitHub link of these project

  • @salahuddinabushaar7060
    @salahuddinabushaar7060 3 года назад

    You cant deploy this on any web service

  • @amansahu-cx6iz
    @amansahu-cx6iz 4 года назад

    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
      @kritikagarg8412 4 года назад

      Hi Aman! Have you done this via html?

    • @amansahu-cx6iz
      @amansahu-cx6iz 4 года назад

      @@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.

    • @hemantsah8567
      @hemantsah8567 4 года назад

      Mujhe webcam ki image save karni hai folder me... 2 din se lga hua hu

    • @souravrs657
      @souravrs657 4 года назад

      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