Revisiting a Mac OS version

Got an idea for something that SharpCap should do? Share it here.
Forum rules
'+1' posts are welcome in this area of the forums to indicate your support for a particular feature suggestion. Suggestions that get the most +1's will be seriously considered for inclusion in future versions of SharpCap.
tmonogue
Posts: 2
Joined: Thu Sep 09, 2021 3:49 pm

Revisiting a Mac OS version

#1

Post by tmonogue »

Greetings!

With the advent of the M1 based Apple Mac computers it's no longer possible to run Boot Camp, and Windows virtualization isn't a viable option either. For those of us wedded to the Apple ecosystem it would be amazing to have SharpCap running on our new machines. I'm still fairly new to EAA but I haven't found anything that gets close to what SharpCap can do.

As someone who has worked in software development for 35 years, I understand how difficult it is to port from one OS to another. I've ported three different programs over the course of my career and it's never been easy but it's always been doable. Would you be open to a collaboration to attempt a port of SharpCap to MacOS?

Thanks!
User avatar
admin
Site Admin
Posts: 13173
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Revisiting a Mac OS version

#2

Post by admin »

Hi,

I'm sorry to say that this is somewhere I really don't want to go :(

One of the reasons is personal preference - I've used Mac OS at times for my previous job and done some development for it, and I have to say that I hated it - both the OS and XCode... I have more stuff to do in SharpCap than I have time to do anyway, so I just don't feel the inclination to start on something that I'm not going to enjoy.

Secondly is just the amount of work involved - the UI of SharpCap would need to be largely replaced - it's written mostly in WPF (which has no porting path to non Windows OS) and partly in Winforms (which has a flaky implementation in mono, but I'm trying to switch away from winforms anyway). That doesn't even cover the C++ code and OS level bypasses of C# functionality for performance that are used.

Interestingly, I've had reports of SharpCap working on M1 hardware inside Parallels (I think). The report was for a webcam being used, but to be honest USB transfer virtualization should be perfectly possible to allow other hardware to work.

cheers (and sorry for any disappointment)

Robin
tmonogue
Posts: 2
Joined: Thu Sep 09, 2021 3:49 pm

Re: Revisiting a Mac OS version

#3

Post by tmonogue »

Greetings Robin,

I completely understand your position. Mac development can be a real pain, and I'm glad your focusing all your effort on making SharpCap a better product. I was suggesting that you might find another developer who could try the port of SharpCap to MacOS as a side project, or "on spec" at no upfront cost to you. I'd certainly like to take a swing at it. Still, even that would consume some of your time in working with the other developer and the distraction may not be worth it in the end.

I haven't tried SharpCap with Windows 10 for ARM (the developer preview) but I'll give it a shot. I might be pleasantly surprised.

Thanks for the reply,

Ted
User avatar
admin
Site Admin
Posts: 13173
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Revisiting a Mac OS version

#4

Post by admin »

Hi Ted,

I wouldn't expect the ARM version of Win10 to work - although ~90% of the code in SharpCap is C#/.NET and should work on any CPU, the remaining 10% includes the camera SDKs and a lot of image processing stuff - that code is either x86 or x64, so would only run if Windows-on-arm has CPU emulation (does it??)

Thanks for the offer of looking at the Mac version - however as you suspected I am concerned that the amount of work needed to make the UI code even close to portable would be considerable :(

cheers,

Roibn
rwillett
Posts: 9
Joined: Wed Apr 14, 2021 6:56 am

Re: Revisiting a Mac OS version

#5

Post by rwillett »

Late to the party as normal :)

Just to let people know my experiebnces of SharpCap on Windows 11 ARM under Parallels 17.1.14 (51567) on an M1 Mac.

I've been out of action for a while and just started getting back to using my scopes. I use Mac's exclusively at home, and until I moved from an Intel based Mac to an M1 based Mac would use VMWare Fusion. Always used VMWare Fusion and its worked well enough for me.

However since I had to upgrade to the M series hardware on Mac Mini's, VMWare Fusion has not been an option. Never really liked Parallels TBH but the latest version (or at least the Pro edition) is very, very nice.

Here's what I did:
  • Downloaded and installed trial edition of Parallels Desktop 17 for Mac Pro.
  • There is a mdoe to download Windows 11 for Arm built in. This is not an officially released version fo Windows 11 as it is for ARM. It's a beta and therefore capable of being pulled, causing your system to crash making your hair fall out and neutering your dog and possibly all four. This is all automatic and just works.
  • Once Win 11 installed and played about with (e.g. 8GB of memory), 250GB of hard disk (I was trying out (ahem) battlefield 4 (/ahem). A man has to have a hobby :), fired up and it just works. I think it works better than VMWare fusion used to. It is really slick and I'm very surprised as it was never this good. Performance is excellent for applications, though BF4 is poor.
  • Windows 11 allows X86 apps to run in emulated mode. So I downloaded the 64 bit version of SharpCap and installed it.
  • I had to tell Parallels which USB camera to connect (which is normal), so I chose an Altair mono guide cam.
    Parallels connected the guide cam to Windows 11 and SharpCap displayed it as a camera in the Cameras menu pull down.
  • Set the view to LiveView
  • Set the framerate to 15fps and got very little frames per sec through. The SharpCap displayed 4-5 fps and then this dropped to 0.1 fps. To be honest it's so slow to be unusable.
  • Changing the USB Speed from 0 - 4 seems to make little difference.
  • I'm getting approx 1 frame per 15 secs though.
  • Played about with lots of the settings and couldn't seem to get an better throughput.
So not good really, however since I've not used SharpCap for nearly a year and was never that competent, this may be user erorr. I'll try the 32 but version to see if that makes a difference.

Rob
rwillett
Posts: 9
Joined: Wed Apr 14, 2021 6:56 am

Re: Revisiting a Mac OS version

#6

Post by rwillett »

Bad form to reply to my own email but....

So moving the size of the image from 1290x960 to 640x480 gets the frame up to 11fps, so this is a bandwidth issue.

Now I know I can something I'll investigate further.

Rob
User avatar
admin
Site Admin
Posts: 13173
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Revisiting a Mac OS version

#7

Post by admin »

Hi Rob,

well, I'm impressed that it even works that far to be honest!

My suspicion is that a lot of cameras have a fairly basic way of transferring data over USB (the camera sends it all and the Windows driver receives the bits and pieces them together). If anything goes missing (any packets) then you get a dropped frame - there is no attempt to retry or deal with error correction. This works fairly well for 'normal' hardware USB, but once you start adding in emulation of x86 and parallels and MacOS, the chances of a dropped data packet out of the 1000s that make up a frame goes up to the point that not many frames get through.

Not sure if there is much you can do about this. I wonder how windows on ARM with just x86 emulation and no MacOS/Parallels would work out.

cheers,

Robin
rwillett
Posts: 9
Joined: Wed Apr 14, 2021 6:56 am

Re: Revisiting a Mac OS version

#8

Post by rwillett »

Robin

I suspect that we would have a very similar experience with Windows ARM and Sharpcap on top. You might get more data through as it’s not got a hypervisor underneath it and the usb isn’t emulated.

I was hoping to use an M1 MacBook as a laptop for this as the battery life is so good, but the speed simply isn’t enough. However I will persevere and see if I can get any more throughput. I’m not hopeful but I’ll try.

If this was an ESXI server we’d do pass thru on the hardware and get full speed out of the USB port as it’s straight onto the hardware.

The cheapest solution is still to use my old Lenovo laptop but I’d like to use my MacBook.

Rob
han59
Posts: 32
Joined: Wed Apr 01, 2020 11:02 am

Re: Revisiting a Mac OS version

#9

Post by han59 »

Just for info, I have just created a Windows ARM64 version of the ASTAP command line solver. It is 375% faster then the X86 version. I tested it under Win11 running on a Raspberry Pi. Compiling the GUI version of ASTAP was not successful. So X86 emulation slows down a lot.

Han
User avatar
admin
Site Admin
Posts: 13173
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Revisiting a Mac OS version

#10

Post by admin »

Hi,

a factor of ~4 for emulation makes sense - not a bad idea to use a RPi for testing - unfortunately the one I have is in use for another project and they are out of stock everywhere right now. I was thinking of perhaps getting a second hand Win11 Arm laptop to play with (I think that a lot of them go second hand because people buy them, realise they are not proper Windows machines and then try to sell them on).

Anyway, the frame rate slowdown is much more than x4 - I still suspect dodgy USB virtualization performance :)

cheers,

Robin
Post Reply