Does not work on High Sierra
peterhellberg opened this issue ยท 27 comments
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)
I'm on Sierra (10.12.6) and am seeing this same issue. From the docs it seems like it should be outputting a filename after the ellipsis, but that isn't happening. I installed an Xcode update today so I wonder if a new version of Xcode is the underlying issue.
I run into the same problem as peterhellberg (similar terminal output and no output file). I'm running on macOS High Sierra 10.13.1 on a MacBook Air (Early 2014). I recently reinstalled macOS and also XCode (Version 9.1). I installed (and uninstalled and reinstalled and uninstalled and reinstalled) imagesnap with brew I would be happy for every hint on solving this problem :).
Hello, I would like to join the "image now saved" group!
Same problem here MacBook Air 2012 and High Sierra.
When I open imagesnap I see the green light of my iSight blinking, but no file was generated.
+1 :(
Capturing image from device "<AVCaptureDALDevice: 0x7fe87ec16b50 [FaceTime HD Camera (Display)][0x4015000005ac1112]>"...%
10.13.1 (17B1003)
Mac mini (Late 2014)
Apple Thunderbolt Display (Intel Iris 1536 MB graphics)
imagesnap Version: 0.2.5
Light blinks, but no data saved. Works fine on my iMac, same build.
Same here on High Sierra (10.13.1) with FaceTime HD Camera.
Trying to capture on 1 sec interval it generates the output files very well.
imagesnap -t 1
But still don't work with one-time capture
The same happens here with both the FaceTime and the HD Pro C920 Web Cam;
imagenap 0.2.5 on macOS High SIerra 10.13.1
the command imagesnap -t 1
works with both the cameras.
an alternative until this is fixed is
ffmpeg -f avfoundation -video_size 1280x720 -i "0" -vframes 1 "snapshot-$(date +%F-%T | tr : -).jpg"
@arkarkark Alternative how? Where do you run this?
@manico where I would previously type imagesnap
I type in the command above.
you might need to brew install ffmpeg
(just like you had to brew install imagesnap
)
Version 2.6 is still broken. I just figured out, that Version 2.5 ist still working under macOS 10.13. You can download the executable via SourceForge:
https://netix.dl.sourceforge.net/project/iharder/imagesnap/ImageSnap-v0.2.5.tgz
- 1
Temporary solution if you're using homebrew: brew switch imagesnap 0.2.5
that temporary solution didn't work for me. Is there any other way to make this work? How are those using ffmpeg to take a screenshot every 1 second for example?
imagesnap -t 1
i would normally use this, what's the equivalent for ffmpeg?
fwiw, I've got a fix for this:
Edit: Just noticed this is already addressed in this pull request.
Until it's fixed, this could be a quick and dirty solution:
imagesnap -t 10 -w 1 & sleep 3 && killall imagesnap
@arkarkark you had a typo missing the closing quote in the end... based on your solution + silencing the STDOUT and STDERR:
ffmpeg -f avfoundation -video_size 1280x720 -i "0" -vframes 1 "snapshot-$(date +%F-%T | tr : -).jpg" 1>/dev/null 2>&1
cc @manico
@pocketrocket May I ask why you don't like my solution?
By the way, the ffmpeg
command doesn't work for me for some reason. It makes this error, that's why I came up with that solution.
[avfoundation @ 0x7f8136802e00] Selected framerate (29.970030) is not supported by the device
[avfoundation @ 0x7f8136802e00] Supported modes:
[avfoundation @ 0x7f8136802e00] 1280x720@[1.000000 30.000000]fps
Last message repeated 2 times
[avfoundation @ 0x7f8136802e00] 640x480@[1.000000 30.000000]fps
Last message repeated 2 times
[avfoundation @ 0x7f8136802e00] 320x240@[1.000000 30.000000]fps
Last message repeated 2 times
0: Input/output error
@Sangdol because it didn't work (as of a typo? as well... now as it's working I'll change my reaction to ๐ )
@friedrichweise how to install 0.2.5?
as @memming mentioned, use brew switch imagesnap 0.2.5
@friedrichweise thanks for replay.
When in run โbrew switch imagesnap 0.2.5โ give me:
Error: imagesnap does not have a version โ0.2.5โ in the Cellar
@toshibochan yeah, my trick only works if you have installed 0.2.5 in the past via homebrew. Perhaps just install 0.2.5 manually?
@toshibochan brew switch
only switches to a version that was installed previously and is still on your drive. This Stack Overflow post discusses how to install old versions of homebrew formulas. Unfortunately the old formula is not available (and would point to a nonexistent download location).
It seems the only option is to install imagesnap manually then.
I was able to download from @friedrichweise link:
https://netix.dl.sourceforge.net/project/iharder/imagesnap/ImageSnap-v0.2.5.tgz
And I made 0.2.5 folder inside imagesnap folde and make bin folder in 0.2.5 folder and copy and paste imagesnap to the bin folder and run โbrew switch imagesnap 0.2.5. And now work good
I brew uninstalled imagesnap(2.6) and copy paste /usr/local/bin imagesnap v2.5 file and it works now!
I always had 0.2.5 installedโv0.2.6 was never available via Homebrewโ, and it still doesn't work. Didn't work on El Capitan 10.11.6, and now doesn't work on High Sierra 10.13.5.
EDIT: no, I actually have 0.2.6 installed, but imagesnap itself with imagesnap -h
prints 0.2.5
as the version number.
๐ I'm having the same issue
edit: I found I had to add the -r 30 option to ffmpeg to get it to work - to set the framerate to 30. I think this is the problem @Sangdol (and possibly others) were having.
Here's the script I used to take images once per second using ffmpeg:
#!/bin/bash
for i in $(seq -f "%04g" 1 3600)
do
fn=photo_$i.jpg
echo $i $fn
ffmpeg -f avfoundation -video_size 1280x720 -r 30 -i "0" -vframes 1 $fn
done