GithubHelp home page GithubHelp logo

imagesnap's People

Contributors

abackstrom avatar aw avatar jchampemont avatar nkirsch avatar noreaster76 avatar rharder avatar ryandesign avatar strml avatar warmwaffles avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

imagesnap's Issues

Caps on previous iSights saved at double CCD sensor resolution

I poked around in the code very briefly and it may be a consequence of the camera returning digitally interpolated data, but the color performance is so noisy the quadrupled pixel count is especially wasteful. Is there an easy way to downconvert the image before returning it?

imagesnap support for Elgato Game Capture

I have an Elgato HD60 Game Capture connected to my MacBook via USB. When I run imagesnap -l it is not appearing on the list

Are the Elgato capture cards supported with imagesnap? If so, any idea how I can use imagesnap to capture from the card?

Does not work on High Sierra

It seems like imagesnap doesn't actually work on High Sierra. (It looks like it does, no errors, but there is no output file)

$ ./imagesnap -w 1 foo.jpg
Capturing image from device "<AVCaptureDALDevice: 0x7f9b7ad2f800 [FaceTime Camera][CC27173CH6UHGWCAE]>"...~

(I've tried with both 0.2.5 and the latest commit d947e68)

Stuck in macOS Ventura when executed from SSH-session

HW/OS:
image

imagesnap works well when executed in local terminal:

$ imagesnap -vvv
Verbose mode
No filename specified. Using snapshot.jpg
No device specified. Using FaceTime HD Camera
Capturing image from device "FaceTime HD Camera"...Starting device...Device started.
Delaying 3.00 seconds for warmup...Warmup complete.
snapshot.jpg
Stopping session...
	CaptureSession != nil
	Stopping CaptureSession...Done.
	Shutting down 'stopSession(..)'

but it gets stuck when executed within an ssh-session (log in to this Macbook via ssh):

$ imagesnap -vvv
Verbose mode
No filename specified. Using snapshot.jpg
No device specified. Using FaceTime HD Camera
Capturing image from device "FaceTime HD Camera"...Starting device...Device started.
Delaying 3.00 seconds for warmup...Warmup complete.

help

how to chose device?
I did:
imagesnap -l

Video Devices:
USB Camera
Built-in iSight

and:
imagesnap -d USB Camera

Device "USB" not found.

or

imagesnap -d Built-in iSight

Device "Built-in" not found.

if I use just "imagesnap" will take with Built-in iSight

but I can't take the I chose with -d

please help

Please rebuild imagesnap executable

Per Pull request #17 the binary here is out of date, so brew or direct download from GitHub is not usable on high sierra.

I've got it built locally and working, but it'd be better if a trusted user actually pushed the binary to this repo :)

problem whit imagesnap -t

I have a problem with using -t.
this is my code: "imagesnap -w 2 ~/Desktop/$(date +%y%m%d%H%M%S).jpg" this is work good and photo is saved in desktop with "180331141210.jpg"
but if use "imagesnap -w 2 -t 10 ~/Desktop/$(date +%y%m%d%H%M%S).jpg" the file only save in user folder with name "snapshot-00000-2018-03-31_14-11-27.933.jpg".
please help

Mojave support

ImageSnap doesn't seem to work with Mojave. Is it something to do with the new hardened runtime?

Causes kernel panic if run rapidly as background task

I have a gitshot file in my bin that looks like this:

#!/usr/bin/env sh
imagesnap -q -w 3 "$HOME/.gitshots/$(date -j -f "%a %b %d %T %Z %Y" "`date`" "+%s").jpg"

with a post-commit hook like

#!/bin/sh

gitshot

rebases can take forever. To prevent it from blocking I ran gitshot in the background like so:

nohup gitshot &>/dev/null &

This caused the camera light to flicker and then the system to kernel panic with the light stuck on.

Support --help and --version/-V flags; ignore invalid flags

Unexpectedly, imagesnap ignores unknown flags and does not know several standard flags.


$ imagesnap --version
Changed waitThread to realtime priority!
Asked for all format descriptions...
Capturing image from device "EpocCam"...Asked for all format descriptions...
[setting] Setting kCMIODevicePropertyDeviceMaster to 55109
[setting] Setting kCMIOStreamPropertyFormatDescription
Got new format : 1920x1080
[setting] Setting kCMIODevicePropertyDeviceMaster to -1
[setting] Setting kCMIODevicePropertyDeviceMaster to 55109
[setting] Setting kCMIODevicePropertyDeviceMaster to -1
Asked for all format descriptions...
[RemoteFrameSource] Releasing RemoteFrameSource
snapshot.jpg
[RemoteFrameSource] Releasing RemoteFrameSource

I expected this to print something like "ImageSnap 0.2.10". imagesnap -V could be added as a synonym.


$ imagesnap --help
Changed waitThread to realtime priority!
Asked for all format descriptions...
Capturing image from device "EpocCam"...Asked for all format descriptions...
[setting] Setting kCMIODevicePropertyDeviceMaster to 55144
[setting] Setting kCMIOStreamPropertyFormatDescription
Got new format : 1920x1080
[setting] Setting kCMIODevicePropertyDeviceMaster to -1
[setting] Setting kCMIODevicePropertyDeviceMaster to 55144
[setting] Setting kCMIODevicePropertyDeviceMaster to -1
Asked for all format descriptions...
[RemoteFrameSource] Releasing RemoteFrameSource
snapshot.jpg
[RemoteFrameSource] Releasing RemoteFrameSource

I expected this to tell me what command line flags are available, just like imagesnap -h already does.


$ imagesnap --foo
Changed waitThread to realtime priority!
Asked for all format descriptions...
Capturing image from device "EpocCam"...Asked for all format descriptions...
[setting] Setting kCMIODevicePropertyDeviceMaster to 55197
[setting] Setting kCMIOStreamPropertyFormatDescription
Got new format : 1920x1080
[setting] Setting kCMIODevicePropertyDeviceMaster to -1
[setting] Setting kCMIODevicePropertyDeviceMaster to 55197
[setting] Setting kCMIODevicePropertyDeviceMaster to -1
Asked for all format descriptions...
[RemoteFrameSource] Releasing RemoteFrameSource
snapshot.jpg
[RemoteFrameSource] Releasing RemoteFrameSource

I expected this to exit with an error saying that the flag --foo is unknown.

OpenGL Renderer

Getting this error now -- and it does go extremely slow -- please help! I have it set to -t 1 and it takes a screen once every 30 seconds or so instead!!

Core Image is now using the software OpenGL renderer. This will be slow.

snapshot resolution

Is there anyway reduce the snapshot resolution OR changing the image mode (e.g. black&white) by only using imagesnap?

Filename and newline no longer printed after taking snapshot

The readme shows that when taking a snapshot, the filename is printed, presumably followed by a newline:

$ imagesnap
Capturing image from device "iSight"..................snapshot.jpg

With 0.2.6, this no longer happens:

$ imagesnap
Capturing image from device "<AVCaptureDALDevice: 0x7fad05719cc0 [FaceTime HD Camera][0x1420000005ac8600]>"...$

Note even the lack of newline at the end of the line before my command prompt is printed again.

Looks like this regression crept in when the code was restructured as a companion to QTKit being replaced by AVFoundation in #13.

Problem with paths starting with / or ~

This works:

imagesnap -w 3 "Documents/test.jpg"

This works:

imagesnap -w 3 "./Documents/test.jpg"

This doesn't:

imagesnap -w 3 "/Documents/test.jpg"

This doesn't:

imagesnap -w 3 "~/Documents/test.jpg"

Stacktrace:

No device specified. Using FaceTime HD Camera
Starting device...Starting capture session...
    Creating QTCaptureSession...Done.
    Creating QTCaptureDeviceInput with FaceTime HD Camera...Done.
    Creating QTCaptureDecompressedVideoOutput...Done.
    Entering synchronized block to clear memory...Done.
Session started.
Device started.
Skipping warmup period.
Taking snapshot...
..Snapshot taken.
Stopping session...
    CaptureSession != nil
    Stopping CaptureSession...Done.
    Shutting down 'stopSession(..)'Error.

It fails here:

// Image capture
if( [ImageSnap saveSingleSnapshotFrom:device toFile:filename withWarmup:warmup withTimelapse:timelapse] ){
    console( "%s\n", [filename UTF8String] );
} else {
    error( "Error.\n" );
}   // end else

Any idea? :)

Images extremely dark on new Mac Air Mid 2013s A1466

Camera works fine in photobooth, but command line shots that are dark. If theres tons of light they sort of come out, but are still very dark. I'm guessing some sort of iso setting is now available and needs to be set during capture?

Macosx 10.8 Build 12E3067

imagesnap

Photobooth

Catalina support

I've just upgraded to Catalina.

imagesnap -l returns "No video devices found."

It worked well with Mojave.

Does not work on Yosemite

Simply calling imagesnap returns error

$ imagesnap 
    Could not create capture session.
Error.
Capturing image from device "FaceTime HD Camera (Built-in)"...

imagesnap: command not found

When I am trying to use imagesnap via shell script its not working.
Here is the code :

camera_filename="IMG_${timestamp}.jpg"
echo "Take picture $camera_filename"

imagesnap "$camera_filename"

Error that I am getting is :
imagesnap: command not found

But via terminal same command is working. using in shell script its not working.

path of "imagesnap" is : /usr/local/bin

I don't know where I am wrong.

Warnings when using OBS virtual cam

When using OBS's virtual webcam then I get the following warnings / errors with imagesnap -l ๐Ÿ‘

2021-03-15 08:30:50.760 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): PlugInMain version=1.2.0
2021-03-15 08:30:50.760 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): HardwarePlugIn_QueryInterface
2021-03-15 08:30:50.760 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): HardwarePlugIn_Release sRefCount now = 0
2021-03-15 08:30:50.760 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): HardwarePlugIn_InitializeWithObjectID self=0x10a8f9768
2021-03-15 08:30:50.760 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): HardwarePlugIn_ObjectSetPropertyData Device(36) kCMIOObjectPropertyListenerAdded self=0x10a8f9768 data(int)=1684629094
2021-03-15 08:30:50.760 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled setPropertyDataWithAddress for kCMIOObjectPropertyListenerAdded
2021-03-15 08:30:50.760 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): HardwarePlugIn_ObjectSetPropertyData Device(36) kCMIOObjectPropertyListenerAdded self=0x10a8f9768 data(int)=1869180523
2021-03-15 08:30:50.760 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled setPropertyDataWithAddress for kCMIOObjectPropertyListenerAdded
2021-03-15 08:30:50.760 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): HardwarePlugIn_ObjectSetPropertyData Device(36) kCMIOObjectPropertyListenerAdded self=0x10a8f9768 data(int)=1885762592
2021-03-15 08:30:50.760 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled setPropertyDataWithAddress for kCMIOObjectPropertyListenerAdded
2021-03-15 08:30:50.786 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): HardwarePlugIn_ObjectSetPropertyData Device(36) kCMIOObjectPropertyListenerAdded self=0x10a8f9768 data(int)=1818850926
2021-03-15 08:30:50.786 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled setPropertyDataWithAddress for kCMIOObjectPropertyListenerAdded
2021-03-15 08:30:50.786 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): HardwarePlugIn_ObjectSetPropertyData Device(36) kCMIOObjectPropertyListenerAdded self=0x10a8f9768 data(int)=1869180523
2021-03-15 08:30:50.786 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled setPropertyDataWithAddress for kCMIOObjectPropertyListenerAdded
2021-03-15 08:30:50.786 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): HardwarePlugIn_ObjectSetPropertyData Device(36) kCMIOObjectPropertyListenerAdded self=0x10a8f9768 data(int)=1937009955
2021-03-15 08:30:50.786 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled setPropertyDataWithAddress for kCMIOObjectPropertyListenerAdded
2021-03-15 08:30:50.786 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): HardwarePlugIn_ObjectSetPropertyData Device(36) kCMIOObjectPropertyListenerAdded self=0x10a8f9768 data(int)=1886156132
2021-03-15 08:30:50.786 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled setPropertyDataWithAddress for kCMIOObjectPropertyListenerAdded
2021-03-15 08:30:50.786 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): HardwarePlugIn_ObjectSetPropertyData Device(36) kCMIOObjectPropertyListenerAdded self=0x10a8f9768 data(int)=1935833461
2021-03-15 08:30:50.786 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled setPropertyDataWithAddress for kCMIOObjectPropertyListenerAdded
2021-03-15 08:30:50.786 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.786 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.786 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.786 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Stream unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.786 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Stream unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Stream unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Stream unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Stream unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Stream unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Stream unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Stream unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Stream unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Stream unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Stream unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Stream unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Stream unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Stream unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Stream unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): HardwarePlugIn_ObjectSetPropertyData Stream(37) kCMIOObjectPropertyListenerAdded self=0x10a8f9768 data(int)=1885762592
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Stream unhandled setPropertyDataWithAddress for kCMIOObjectPropertyListenerAdded
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled hasPropertyWithAddress for kCMIODevicePropertySuspendedByUser
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): Device unhandled hasPropertyWithAddress for kCMIOObjectPropertyOwnedObjects
Video Devices:
<AVCaptureDALDevice: 0x7fd87b46ee60 [OBS Virtual Camera][obs-virtual-cam-device]>
<AVCaptureDALDevice: 0x7fd87b469580 [FaceTime HD Camera (Built-in)][0x8020000005ac8514]>
<AVCaptureDALDevice: 0x7fd87b46e0e0 [Iriun Webcam][1400-IriunCamera]>
<AVCaptureDALDevice: 0x7fd87d814470 [HD Pro Webcam C920][0x14423300046d082d]>
2021-03-15 08:30:50.787 imagesnap[97514:1617176] obs-mac-virtualcam(DAL): HardwarePlugIn_Teardown self=0x10a8f9768

If this warning is not harmful and only affects that OBS webcam but not the other devices, it would be call if this warning could be muted (or shown only when providing a higher loglevel)

Add an OSI-approved license

Hi, thanks for creating this great software, unfortunately, I do think the license text is not really helpful. But I am happy to help you out on that. If you really looking for public domain license, I can see two choices can be used:

The good thing with those two are they are more formal and recognized in the OSI governance body and easy to help your software distribution and adoption.

If you are looking for permissive software licenses:

  • Apache-2.0
  • MIT
  • BSD-3-Clause

are the good ones.

Not saving under snapshot.jpg, saving elsewhere by default.

It appears it is not snapshot.jpg, but rather snapshot-00000-2017-12-19_09-26-46.543.jpg.

The root challenge is there is no easy way to find out which snapshot was created via software; issue #18 is compounding that by eliminating the option to pipe.

No filename specified. Using snapshot.jpg
No device specified. Using <AVCaptureDALDevice: 0x7fe46e430940 [FaceTime HD Camera (Display)][0x4015000005ac1112]>
Capturing image from device "<AVCaptureDALDevice: 0x7fe46e430940 [FaceTime HD Camera (Display)][0x4015000005ac1112]>"...%                                                                           [ .src/tmp/imagesnap ]
home % ls -l snapshot*.jpg
-rw-r--r--  1 nick  staff  163059 Dec 19 09:26 snapshot-00000-2017-12-19_09-26-46.543.jpg
[ .src/tmp/imagesnap ]

AVCaptureDevicetypeExternal is deprecated for Continuity Cameras

I've started seeing deprecation warnings:

2023-11-02 15:23:24.748 imagesnap[59379:6669550] WARNING: AVCaptureDeviceTypeExternal is deprecated for Continuity Cameras. Please use AVCaptureDeviceTypeContinuityCamera and add NSCameraUseContinuityCameraDeviceType to your Info.plist.

Running from cron job

hi, I was just curious, has anyone managed to run this from a cron tab on macos x? I seem to get stuck.

When I run the command:

/usr/local/bin/imagesnap /Users/username/Documents/Projects/Timelapse/snapshot_$(date +\%Y\%m\%d\%H\%M\%S).jpg

manually, it captures it correctly including adding the date and time to the filename.

If I run the command from within a shell script, it works as well.

But if I run the command or the shell script from a cron tab, it wouldn't work. It would omit the part between the two *s /Users/username/Documents/Projects/Timelapse/snapshot_20221220184251.jpg below and no picture is being captured:

(base) CBU-Macbook-Pro-498: $ ./capture.sh 
CMIOObjectID:	0x22
	Class:		CMIO Stream
	Name:		Sample Stream
	Direction:	Input
	Channels:	1
CMIOObjectID:			0x21
	Class:				CMIO Device
	Name:				ManyCam Virtual Webcam
	Input Channels:		1
	Output Channels:	0
CMIOObjectID:			0x20
	Class:				CMIO PlugIn
	Name:				com.visicom.ManyCam.VideoDevice.plugin
Capturing image from device "FaceTime HD Camera"... */Users/username/Documents/Projects/Timelapse/snapshot_20221220184251.jpg*

Any ideas how to solve this?

Thanks!

Camera names

Hi
When running multiple webcams of the same kind imagesnap -l no longer returns unique names. Example:

% imagesnap -l
2022-04-05 11:51:34.840 imagesnap[4162:93101] =>> Checked Property: [cfen] 1667655022
2022-04-05 11:51:34.840 imagesnap[4162:93101] =>> Checked Property: [cfen] 1667655022
2022-04-05 11:51:34.840 imagesnap[4162:93101] =>> Checked Property: [cfen] 1667655022
2022-04-05 11:51:34.840 imagesnap[4162:93101] =>> Checked Property: [cfac] 1667653987
Video Devices:
=> Logitech BRIO
=> Logitech BRIO
=> Logi Capture
=> FaceTime HD Camera (Built-in)

Would it be possible to add #1, #2 etc. to the names that are not unique?
Thanks Jacob

Terminating app due to uncaught exception 'NSInvalidArgumentException'

On a MacBookPro10,1 running macOS 12.3.1:

% imagesnap -h | grep Version
Version: 0.2.16
% imagesnap 
Capturing image from device "FaceTime HD Camera (Built-in)"...2023-02-24 19:28:29.374 imagesnap[64493:733390] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[AVCaptureStillImageOutput_Tundra captureStillImageAsynchronouslyFromConnection:completionHandler:] Inactive/invalid connection passed'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007ff80240a7fb __exceptionPreprocess + 242
	1   libobjc.A.dylib                     0x00007ff80216be58 objc_exception_throw + 48
	2   AVFCapture                          0x00007ff81c4a7df4 -[AVCaptureStillImageOutput_Tundra _receiveSampleBuffer:] + 0
	3   imagesnap                           0x00000001045232d1 imagesnap + 25297
	4   imagesnap                           0x0000000104522a15 imagesnap + 23061
	5   imagesnap                           0x0000000104521928 imagesnap + 18728
	6   imagesnap                           0x0000000104521279 imagesnap + 17017
	7   dyld                                0x00000001106a651e start + 462
)
libc++abi: terminating with uncaught exception of type NSException
zsh: abort      imagesnap

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.