{"action":"closed","issue":{"url":"https://api.github.com/repos/tux3/qTox/issues/1638","labels_url":"https://api.github.com/repos/tux3/qTox/issues/1638/labels{/name}","comments_url":"https://api.github.com/repos/tux3/qTox/issues/1638/comments","events_url":"https://api.github.com/repos/tux3/qTox/issues/1638/events","html_url":"https://github.com/tux3/qTox/issues/1638","id":75809798,"number":1638,"title":"Ditch OpenCV for FFmpeg?","user":{"login":"tux3","id":5155966,"avatar_url":"https://avatars.githubusercontent.com/u/5155966?v=3","gravatar_id":"","url":"https://api.github.com/users/tux3","html_url":"https://github.com/tux3","followers_url":"https://api.github.com/users/tux3/followers","following_url":"https://api.github.com/users/tux3/following{/other_user}","gists_url":"https://api.github.com/users/tux3/gists{/gist_id}","starred_url":"https://api.github.com/users/tux3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tux3/subscriptions","organizations_url":"https://api.github.com/users/tux3/orgs","repos_url":"https://api.github.com/users/tux3/repos","events_url":"https://api.github.com/users/tux3/events{/privacy}","received_events_url":"https://api.github.com/users/tux3/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tux3/qTox/labels/proposal","name":"proposal","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-05-13T01:59:06Z","updated_at":"2015-06-04T20:24:26Z","closed_at":"2015-06-04T20:24:26Z","body":"Given the trouble we've had with the video code and OpenCV in particular, I'm considering replacing it with FFmpeg and rewriting the video code accordingly.\r\nOpenCV is good, but it has some quirks that I'd gladly do without (resolution probing taking way too long, use of exceptions, strange crashes/freezes, etc).\r\n\r\nPros:\r\n- FFmpeg is fast and has a lot of large users backing it\r\n- OpenCV tends to crash in mysterious ways, FFmpeg less so\r\n- We get fast image conversion for free and can directly interface with VPX/Qt.\r\n- We could disable exceptions and get smaller/faster binaries\r\n- Get rid of all the unneeded OpenCV image processing/GUI/math code we don't need.\r\n- The capability APIs are non-portable, but they work. No more spending 10s probing the cam.\r\n\r\nCons:\r\n- FFmpeg (the library) has barely any documentation. The best doc is reading existing code.\r\n- Libav won't cut it, we need FFmpeg's libavdevice, this may complicate packaging.\r\n- No cross-platform way to get/set device capabilities, one API per device (v4l2/dshow/qtkit/...)\r\n\r\nSo far I'm cautiously optimistic that this would be a substantial improvement in quality and stability, if I can show a reasonable way to work with device capabilities on all platforms.\r\n\r\n"}}