Xpra: Ticket #1231: win32 and osx webcam capture
A native port should solve #1113 on OSX (also blocked by #840) and will allow us to improve platform support and remove the dependency on opencv.
Also remove the hard-coded csc dependency.
Thu, 16 Jun 2016 16:04:16 GMT - Antoine Martin: status, description changed
changed from new to assigned
Hopefully we can use the same code for enumerating video devices on osx. (see ticket:1113#comment:4)
The same code can probably be used to capture the whole desktop on win32: DirectShow and may help with #389.
Fri, 30 Dec 2016 07:56:32 GMT - Antoine Martin:
Alternatively, we may be able to the same thing using pyobjc:
Sun, 26 Nov 2017 13:03:37 GMT - Antoine Martin: milestone changed
changed from 1.0 to 2.3
Thu, 01 Feb 2018 14:36:26 GMT - Antoine Martin: attachment set
set to webcam.py
working capture script
Thu, 01 Feb 2018 14:42:36 GMT - Antoine Martin:
The macos capture script above is based on How can I capture iSight frames with Python in Snow Leopard?. It works.. just not on my dev VM (light comes on, but frames never arrive), so I have to ssh to the mac mini to test it.
- clean it up and add it to "darwin" webcam module
- implement device enumeration
- improve memory management so we can compress in another thread and release the buffer after we're done
- port to Transitioning QTKit Code to AV Foundation
Note: the py2app packaging for
QTKit involved using packages and not modules? (IIRC)
See also #1627
Sun, 04 Feb 2018 06:32:25 GMT - Antoine Martin: description, summary changed
changed from ffmpeg webcam capture codec to win32 and osx webcam capture
Sun, 04 Feb 2018 08:08:40 GMT - Antoine Martin: attachment set
set to opencv.patch
PKGBUILD patch to limit the number of opencv modules we build with makepkg
Sun, 04 Feb 2018 08:40:27 GMT - Antoine Martin:
The patch above removes all the dependencies we don't need from the opencv MSYS2 package build, saving around 80MB of disk space.
The savings for our installer package are much smaller (~5MB) because we already trimmed it quite a bit and the file is compressed.
This should make things less brittle too: the opencv package seems to break very regularly in MSYS2 due to the huge amount of dependencies it has and because of the way the module loads them all - they would need to rebuild the package every time a dependency is updated.
Only problem is that the 32-bit version crashes hard, even the simple
opencv_version.exe tool does... so r18290 disables webcam support in 32-bit builds.
Sun, 04 Feb 2018 15:08:43 GMT - Antoine Martin: attachment set
set to webcam_avfoundation.py
port to AVFoundation
Sun, 04 Feb 2018 15:25:04 GMT - Antoine Martin:
We now build
AVFoundation (r18246, also for python3: r18296 + r18297), and we have a nasty py2app packaging workaround too: r18298.
The webcam port to
AVFoundation above might work, but we're blocked by this pyobjc bug: Support marshalling OS_dispatch_queue on macOS 10.10 and 10.11
I'm not sure if this can be worked around using ctypes either.
Once that's fixed, we'll need to to parse the
sampleBuffer object using:
from Quartz import CoreVideo then:
Wed, 28 Mar 2018 05:20:23 GMT - Antoine Martin: milestone changed
changed from 2.3 to 3.1
Wed, 20 Mar 2019 05:06:15 GMT - Antoine Martin: milestone changed
changed from 3.1 to 4.0
Wed, 12 Feb 2020 14:17:22 GMT - Antoine Martin: milestone changed
changed from 4.0 to 4.1
Mon, 02 Mar 2020 02:51:40 GMT - Antoine Martin:
pyobjc has moved to github: https://github.com/ronaldoussoren/pyobjc/.
But this particular issue was not, it's been wiped like it never existed!
Sun, 04 Oct 2020 12:58:20 GMT - Antoine Martin: milestone changed
changed from 4.1 to 4.2
Sat, 23 Jan 2021 05:18:33 GMT - migration script:
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1231