{"action":"opened","issue":{"url":"https://api.github.com/repos/Itseez/opencv/issues/4739","labels_url":"https://api.github.com/repos/Itseez/opencv/issues/4739/labels{/name}","comments_url":"https://api.github.com/repos/Itseez/opencv/issues/4739/comments","events_url":"https://api.github.com/repos/Itseez/opencv/issues/4739/events","html_url":"https://github.com/Itseez/opencv/issues/4739","id":97432019,"number":4739,"title":"Releasing VideoCapture / Webcam doesn't work","user":{"login":"opencv-pushbot","id":2051563,"avatar_url":"https://avatars.githubusercontent.com/u/2051563?v=3","gravatar_id":"","url":"https://api.github.com/users/opencv-pushbot","html_url":"https://github.com/opencv-pushbot","followers_url":"https://api.github.com/users/opencv-pushbot/followers","following_url":"https://api.github.com/users/opencv-pushbot/following{/other_user}","gists_url":"https://api.github.com/users/opencv-pushbot/gists{/gist_id}","starred_url":"https://api.github.com/users/opencv-pushbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencv-pushbot/subscriptions","organizations_url":"https://api.github.com/users/opencv-pushbot/orgs","repos_url":"https://api.github.com/users/opencv-pushbot/repos","events_url":"https://api.github.com/users/opencv-pushbot/events{/privacy}","received_events_url":"https://api.github.com/users/opencv-pushbot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Itseez/opencv/labels/affected:%20master","name":"affected: master","color":"ededed"},{"url":"https://api.github.com/repos/Itseez/opencv/labels/auto-transferred","name":"auto-transferred","color":"ededed"},{"url":"https://api.github.com/repos/Itseez/opencv/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/Itseez/opencv/labels/category:%20python%20bindings","name":"category: python bindings","color":"ededed"},{"url":"https://api.github.com/repos/Itseez/opencv/labels/priority:%20normal","name":"priority: normal","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-27T10:23:06Z","updated_at":"2015-07-27T10:23:07Z","closed_at":null,"body":"Transferred from http://code.opencv.org/issues/3672\r\n```\n|| Martijn van der Veen on 2014-05-02 21:02\n|| Priority: Normal\n|| Affected: branch 'master' (3.0-dev)\n|| Category: python bindings\n|| Tracker: Bug\n|| Difficulty: Medium\n|| PR: \n|| Platform: x64 / Linux\n```\n\nReleasing VideoCapture / Webcam doesn't work\n-----------\n```\nUsing python (3.4) bindings on Ubuntu 14.04 with build-in webcam using v4l4, master branch:\r\n\r\nIn [2]: cap = cv2.VideoCapture(0)\r\nHIGHGUI ERROR: V4L/V4L2: VIDIOC_S_CROP\r\n\r\nIn [3]: a,b = cap.read() # although error, reading frame works (a=True, b=np.array)\r\n\r\nIn [4]: cap.release()\r\n\r\nIn [5]: cap.isOpened()\r\nOut[5]: False\r\n\r\nIn [6]: cap = cv2.VideoCapture(0)\r\nHIGHGUI ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV\r\n\r\nIn [7]: a,b = cap.read()\r\nVIDIOC_STREAMON: Bad file descriptor\r\n\r\n\r\nAfter calling .release(), webcam light stays on and webcam stays unreachable for other programs (e.g., Cheese).\n```\n\nHistory\n-------\n##### Martijn van der Veen on 2014-05-02 21:24\n```\n(Btw, the webcam _is_ released when python exits, but in some cases that's not enough - e.g., for running programs that need to release the webcam now and then.)\n```\n##### Alexander Smorkalov on 2014-05-04 15:58\n```\n-   Category set to python bindings\n```\n##### Andrew Senin on 2014-05-06 14:21\n```\nHello Martijn, \r\n\r\nSince our resources are limited please consider investigating this issue and creating a fixing pull request (http://code.opencv.org/projects/opencv/wiki/How_to_contribute). All help to the project is highly appreciated!\n-   Difficulty set to Medium\n-   Assignee set to Martijn van der Veen\n-   Status changed from New to Open\n```\n##### Maksim Shabunin on 2015-04-27 09:12\n```\n-   Target version changed from 3.0-beta to 3.0\n```\n##### Maksim Shabunin on 2015-04-28 13:42\n```\nCan not reproduce with the 3.0-rc1 release. Webcam is successfully released and reopened.\r\n\r\nCan you, please, try to reproduce it with the latest version? Probably it has been fixed already.\n-   Assignee changed from Martijn van der Veen to Maksim Shabunin\n```\n##### Maksim Shabunin on 2015-04-28 13:42\n```\n-   Status changed from Open to Incomplete\n```"}}