I need to know if there is a way to connect the camera of iPhone to mac. My aim is like to create a spying camera where iPhone will act as the spying device and we will see the view from its camera on mac screen.
There is no API for this. The "answer" is to build a client and then capture the images on the iPhone screen and transmit them to the client server.
Related
On my Mac Book Pro, I have a MAMP server.
Address: http://localhost:8888
I create a simple page with a video tag:
On my iPad Pro, I created an application that uses the camera of the iPad.
I would like to know how to send the video from the iPad's camera to my localhost server (on the video tag).
I have no idea how to do this.
Can you help me?
Thank you so much
Note: The iPad and the MacBook are not connected by a cable.
The iPad and MacBook are in 2 different rooms.
The issue with apple is the video format which can be streamed are not supported by other browsers (m3u8 format) which cannot be viewed in chrome / mozilla only works in safari browsers. so the solution for this is to capture images from iPad (frame extractor)
Below link will help to do it
https://medium.com/ios-os-x-development/ios-camera-frames-extraction-d2c0f80ed05a
after extracting the images send this images to the localhost in the form of MJPEG format. and you can view this in you browser player.
Make sure you use GCD and Autorelease pool or while sending the images the iPad UI may freeze as it is a heavy task to extract and send it to server at the same time.
Hope this helps.
TL;DR: Can I capture an iPhone's screen from my macOS application?
I've been searching for any APIs on macOS to to capture the screen of an iPhone that's connected to the computer, but haven't found any. Are there such public API's?
I've looked at SonOfGrab-example from apple, but that's only for processes running on the "current" computer from what I can figure out.
I want to do what QuickTime does when it records from the device, however I want to do it programmatically, by getting the image or a video stream of what's showing on the iPhone.
I want to record a video of my application which is running on my iPhone and use it for Replay. How can I do that?
I was searching for this and could't find any solution.
Your only options are:
1. Run the app in the simulator and use any screen capture tool for mac to record a video
2. Fix the iPhone on a pod/stand and record video of you app with another camera
If the app does not have any feature which is available only on the device i would avoid option no 2, because iPhone's glossy screen shows all kinds of reflections and the user's hand in the video is really annoying..
Well, if your phone is a 4S you can get a dongle from Apple that outputs the video as a HD stream. The dongle lets you plug in a HDMI cable, so you would need some way to capture that output.
How can I send video from an iPhone to an iPad?
I'm building a robot that is an iPhone controlling an arduino, for the next phase I would like to be able to send some live streaming video from the iPhone to see in an iPad and have the iPad sending commands to the iPhone.
so how to send live streaming video from one device to the other (WiFi preferred or BlueTooth), and how to control one device via wireless from the other?
EDIT:
The best example for what I intend to do is the Parrot AR Drone and another app for the toy,
app clone to pilot the Quadracopter
The difference is that I would be getting the image from an iPhone and sending the control orders to the iPhone [from an iPad] as well, not a separate hardware.
Thanks a lot!
Most of the apps I've seen that do this use AVFoundation to capture data form the video camera - then push the frames to a server somewhere. You probably won't want to push every frame. For the receiving side of things I would have a server hosting a web page with an html5 video tag looking at an m3u8 playlist. Have your files from the iphone go into the playlist folder.
<video src="http://yourserver.com/path/to/stream/yourPlaylist.m3u8">
Your browser does not support the VIDEO tag
</video>
Then set your view on the ipad or computer to look at that webpage. There is for sure a more direct way of sending the files straight to the ipad for viewing - but I like being able to view the video from any broswer :)
If you want to stay away from a web view on the ipad you can also get the files as you would retrieve any file over a network. The web view is just the easiest way in my opinion.
How to integrate Live555 in XCode (iOS SDK)
hope this helps!
Can we make able the iphone simulator to capture an image via webcam, I've written a program to take image from iphone camera. Can i test this with the iphone simulator??? Pls help
You cannot take image via Mac's webcam from iPhone Simulator. For camera, you need to test it on a device.
Imagine if this would be possible on the Simulator, your Mac camera resoultion would be very different from the device one and your mac performances too. This could lead to bad surprises when moving and testing the application on the device.
(Sorry for my english)
In android world, the phone emulator don't have a live camera preview so the solution is create a "Webcam Server" running on emulator host (PC/Mac). This program is a socket server to capture frames from the built-in Webcam and transmit them using a socket.
Then in the phone code (android emulator) you can read the frame through socket and then shows and simulate a real phone camera.
Is that posible in iPhone simulator?
You cannot use mac's camera. For camera, you need to test it on a device.
From Apple documentation:
The hardware features that are not simulated as of iOS 8.2 are:
Motion support (accelerometer and gyroscope) are unsupported.
Audio and video input (camera and microphone) are unsupported.
Proximity sensor
Barometer Ambient light sensor