Coder Social home page Coder Social logo

Comments (22)

vrbajiva avatar vrbajiva commented on June 15, 2024 24

Hi! 🙂 Sadly, I encountered this issue too.

Connected iOS devices are not listed using videosnap -l (while QuickTime is running), although I can see them listed in QuickTime video sources.

MacBook Air (M1, 2020)

from videosnap.

matthutchinson avatar matthutchinson commented on June 15, 2024 4

I worked on this today and have a fix, will release a new version (0.0.7) and explain more soon. This isn't an M1 specific issue.

from videosnap.

matthutchinson avatar matthutchinson commented on June 15, 2024 2

I'll try to investigate this weekend, or early next week.

from videosnap.

matthutchinson avatar matthutchinson commented on June 15, 2024 2

Still having some intermittent issues with this.. looking into it further

from videosnap.

guptapunit avatar guptapunit commented on June 15, 2024 1

Hi, the videosnap -l command does not list my connected iPhone i am using the latest version.

Attaching the logs below if it helps, do let me know if i am doing something wrong of if there are some permissions to be enabled/disabled either on the device or the mac.

Punits-MacBook-Pro:bin punitgupta$ videosnap -l
Found 1 available video devices:
* FaceTime HD Camera
(base) Punits-MacBook-Pro:videosnap-main punitgupta$ videosnap -h
VideoSnap (0.0.6)

Record video and audio from a capture device

You can specify which device to capture from, the duration, encoding and a delay
period (before capturing starts). You can also disable audio recording.
By default videosnap will capture both video and audio from the default capture
device at 30fps, with a Medium quality preset and a short (0.5s) warm-up delay.

If no duration is specified, videosnap will record until you cancel with [Ctrl+c]
You can also use videosnap to list attached capture devices by name.

  usage: videosnap [options] [file ...]
example: videosnap -t 5.75 -d 'Built-in iSight' -p 'High' my_movie.mov

  -l          List attached capture devices
  -w x.xx     Set delay before capturing starts (in seconds, default 0.5s)
  -t x.xx     Set duration of video (in seconds)
  -d device   Set the capture device (by name, use -l to list attached devices)
  --no-audio  Don't capture audio
  -v          Turn ON verbose mode (OFF by default)
  -h          Show help
  -p          Set the encoding preset (Medium by default)
                High
                Medium (default)
                Low
                640x480
                1280x720

As you can see the version is 0.0.6.
The Version of Mac OS i am trying this on is Big Sur 11.2.2.

Something I've noticed is that if I launch Quicktime Player, select New Movie Recording and select my device as a Camera source, then my device is listed when i run the " videosnap -l " command.

from videosnap.

matthutchinson avatar matthutchinson commented on June 15, 2024 1

I've replicated the issue here, same problem; and if I close Quicktime Player, the device is no longer listed.
I've re-opened this issue for now.

When I have some time available I'll try to investigate further.

from videosnap.

IGPenguin avatar IGPenguin commented on June 15, 2024 1

Hey @matthutchinson, I know you are probably quite busy lately as we all are, but this is a huge opportunity to fix a problem potentionaly affecting hundreds of M1 chip Mac users.

You can really make a difference by providing efficient command line solution to iOS device screen recording for many of the Mobile Toolkit users as well as all of those using your Videosnap tool on latest Macbooks.

Please take a quick look at this issue, maybe there is a simple hotfix just waiting for your action.

Thank you for your time and all your priceless contributions to our community.

from videosnap.

IGPenguin avatar IGPenguin commented on June 15, 2024 1

Cool, thank you very much for your effort!

Looking forward to new update. 🤞

from videosnap.

matthutchinson avatar matthutchinson commented on June 15, 2024 1

So turns out while the device is now recognised OK on M1 Macs (and listed OK), capturing fails, with this error - this seems to be an Apple issue.

It is possible to record/screen capture via Quicktime Movie recording, so this must be do-able. I think the best course of action is to rewrite this project in Swift, using more up-to-date framework classes, and adhering to the latest guidelines in the AVFoundation documentation.

from videosnap.

matthutchinson avatar matthutchinson commented on June 15, 2024

So the reason for this is, I still haven't updated videosnap to use the AVFoundation framework. The command is still using the old QTKit libraries.

I had started an av-foundation branch a while ago, but many things have got in the way and I haven't had the time I'd like to devote to this. As soon as it's release I'll update this issue to notify you..

from videosnap.

brooksc avatar brooksc commented on June 15, 2024

+1 for this request -- found videosnap as I was looking for an alternative to the broken and abandoned xrecord project... https://github.com/WPO-Foundation/xrecord/issues . Please let us know if you add ios recording! I often capture ios videos for bug reports and I'd love to automate this!

from videosnap.

aryalakshmi avatar aryalakshmi commented on June 15, 2024

Is there any update on this issue? Will it work now for iphones connected to mac?

from videosnap.

matthutchinson avatar matthutchinson commented on June 15, 2024

Sorry I haven't had time to work on this project for a while, pull requests are always welcome!

from videosnap.

muuuh avatar muuuh commented on June 15, 2024

https://stackoverflow.com/a/32703158

It seem to work somehow with this patch:

#import <CoreMediaIO/CMIOHardware.h>

int main(int argc, const char * argv[]) {
    @autoreleasepool {
        CMIOObjectPropertyAddress prop = {
            kCMIOHardwarePropertyAllowScreenCaptureDevices,
            kCMIOObjectPropertyScopeGlobal,
            kCMIOObjectPropertyElementMaster
        };
        UInt32 allow = 1;
        CMIOObjectSetPropertyData(kCMIOObjectSystemObject, &prop, 0, NULL, sizeof(allow), &allow);
    }

from videosnap.

matthutchinson avatar matthutchinson commented on June 15, 2024

Thanks @muuuh for this suggestion!

I've just released v0.0.5, you should now be able to capture from any attached iOS device!

Here's an example capture from my iPhone X at -p High quality

from videosnap.

IGPenguin avatar IGPenguin commented on June 15, 2024

Hello @matthutchinson, any news on this issue? 🥺

from videosnap.

matthutchinson avatar matthutchinson commented on June 15, 2024

OK, please try this new release and let me know (on Intel and/or M1).

This works for me (Intel and M1), but I have noticed that if I run the command quickly in succession, it can sometimes fail to pick up connected devices for screen capture.

After (a LOT) of debugging and googling, I've traced this down to a Kernel error thrown when macOS attempts to connect to the DAL assistant to grab a port to communicate with the virtual capture device.


NOTE: when capturing the device will not output any audio, but audio will be recorded to the movie file.

Also note, the --no-audio flag won't work when recording from an attached device - for now just mute the device if you want that. This is down to the fact that the virtual capture device that AVFoundation sees for this is a muxed device type.

from videosnap.

matthutchinson avatar matthutchinson commented on June 15, 2024

If you continue to have issues, please add -v to your command and paste your output here, along with device and macOS version #'s

from videosnap.

matthutchinson avatar matthutchinson commented on June 15, 2024

I've added this section to the README explaining the following...

Capturing from connected iOS devices

It is possible to screen capture video & audio from an attached iOS device.

For the device to be discovered you must confirm that you
Trust This Computer on the device when it is connected and unlocked.

There are some limitations and issues with iOS screen capturing.

  • (issue) the --no-audio flag currently has no effect (workaround: mute the device)
  • (issue) currently broken on M1 macs (due to this error)
  • (limitation) when capturing, the device will not output any audio (but audio will be recorded to the movie file)
  • (limitation) occasionally the device fails to be discovered, this can happen when
    • another process is already capturing from the device
    • the macOS kernel fails to connect to the DAL assistant to communicate with the virtual capture device

from videosnap.

IGPenguin avatar IGPenguin commented on June 15, 2024

Hi @matthutchinson so there are still some issues on M1 after all. I am not able to capture any recording. See the verbose output below:

(caught signal: [2])
(stopping recording)
(finished writing to movie file)
(stopping capture session)

Failed to capture any video
(reason: Cannot Record)

Are there any steps we can take to fix this, or everything we can do is to hope that Apple will resolve this somehow?
Also i think that this issue should be reopened, since it is not resolved for now.

from videosnap.

matthutchinson avatar matthutchinson commented on June 15, 2024

So the issue title/description here is based around

can not find iphone devices which I plugged into my Mac

That should now be resolved on M1 and Intel Macs. Capturing from a connected iPhone on an M1 Mac is currently broken, so we need another issue for that. Capturing from a connected webcam should work tho.

Can you pls create another issue and describe what's happening ... i.e. what command you're running and the output with -v flag on.

from videosnap.

IGPenguin avatar IGPenguin commented on June 15, 2024

Alright, im on it. 🤝

Edit: So I created following issue: #24

from videosnap.

Related Issues (20)

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.