Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for camera control #85

Open
GarthDB opened this issue Jun 16, 2020 · 17 comments
Open

Add support for camera control #85

GarthDB opened this issue Jun 16, 2020 · 17 comments
Labels
enhancement New feature or request pr wanted Something we are unlikely to implement soon, but will accept a PR for

Comments

@GarthDB
Copy link

GarthDB commented Jun 16, 2020

  • I'm submitting a ...
    [ ] bug report
    [x] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary

I'm trying to dig into the Blackmagic Developer documentation and all I can see in the manual are the SDI camera control docs, however, the ATEM software now can control cameras over HDMI (BMPCC 4K, etc). I'm wondering if it is possible to add camera control support to this package.

I'll try throwing some commands at my ATEM Mini connected to a BMPCC 4K and see if I can get anything to work.

I would like the feature if possible. It would be so handy to do simple things like autofocus over a network command.

@Julusian Julusian added the enhancement New feature or request label Jun 17, 2020
@Julusian
Copy link
Member

This is not something we are likely to implement any time soon, as it could take a bit of work to interpret everything correctly and we dont have any blackmagic cameras to test it with.
However we will happily accept a pr if you want to give it a go. I remember seeing https://github.com/haydendonald/blackmagic-atem-nodered/blob/master/commands/cameraControl.js the other day, which could serve as a good reference/starting point

@Julusian Julusian added the pr wanted Something we are unlikely to implement soon, but will accept a PR for label Jun 17, 2020
@GarthDB
Copy link
Author

GarthDB commented Jun 17, 2020

Excellent. Thanks.
I’m curious if the api for hdmi and sdi cameras/stems are the same.

@Julusian
Copy link
Member

It is unlikely for them to be different, except for in small areas if they have different functionality

@Julusian
Copy link
Member

I have recently been playing around with this in my C# library which has some unit tests, so it should be fairly straightforward to port to typescript.
https://github.com/LibAtem/LibAtem/tree/master/LibAtem/Commands/CameraControl
https://github.com/LibAtem/LibAtem/blob/master/LibAtem.State/Util/CameraControlUtil.cs#L45

@nitsuj102284
Copy link

Hi, @Julusian, have you had any progress with porting your code to TS? We would like to get camera control data from the ATEM.

@Julusian
Copy link
Member

No, I havent done anything on this. I dont expect to have the time for a couple of months

@nitsuj102284
Copy link

nitsuj102284 commented Nov 17, 2020

@Julusian, are those the only files that had to be added to get the camera control data in your C# library? Assuming that the same could be added for TS.

@Julusian
Copy link
Member

@nitsuj102284 There is also https://github.com/LibAtem/LibAtem/blob/master/LibAtem.State/CameraControllerState.cs and https://github.com/LibAtem/LibAtem/blob/master/LibAtem.State/Builder/CameraControllerUpdater.cs which are quite simple.
But yes, if you compare some of the other commands between the two libraries that should give a reference for how to go about porting it.
Unfortunately camera control is a quite annoying one to work with due to how it encodes the data, and the meaning of the enums was quite a bit of guesswork..

@haydendonald
Copy link

haydendonald commented Mar 7, 2021

This is not something we are likely to implement any time soon, as it could take a bit of work to interpret everything correctly and we dont have any blackmagic cameras to test it with.
However we will happily accept a pr if you want to give it a go. I remember seeing https://github.com/haydendonald/blackmagic-atem-nodered/blob/master/commands/cameraControl.js the other day, which could serve as a good reference/starting point

Haha that's my own project :) (I am aiming to move away from development of the specifics of that project)
I can do a PR to add the feature.

Is there any documents on how to add the feature to this project?

@Julusian
Copy link
Member

Julusian commented Mar 7, 2021

@haydendonald I have written up a bit of a guide on how to write commands for this library https://github.com/nrkno/tv-automation-atem-connection/blob/master/.github/CONTRIBUTING.md#api-stability

Let me know if anything is lacking or needs clarifying, I have probably overlooked something or am forgetting bits which are obvious to me :)

@nitsuj102284
Copy link

This is not something we are likely to implement any time soon, as it could take a bit of work to interpret everything correctly and we dont have any blackmagic cameras to test it with.
However we will happily accept a pr if you want to give it a go. I remember seeing https://github.com/haydendonald/blackmagic-atem-nodered/blob/master/commands/cameraControl.js the other day, which could serve as a good reference/starting point

Haha that's my own project :) (I am aiming to move away from development of the specifics of that project)
I can do a PR to add the feature.

Is there any documents on how to add the feature to this project?

@haydendonald, have you had any progress on adding the feature?

@haydendonald
Copy link

This is not something we are likely to implement any time soon, as it could take a bit of work to interpret everything correctly and we dont have any blackmagic cameras to test it with.
However we will happily accept a pr if you want to give it a go. I remember seeing https://github.com/haydendonald/blackmagic-atem-nodered/blob/master/commands/cameraControl.js the other day, which could serve as a good reference/starting point

Haha that's my own project :) (I am aiming to move away from development of the specifics of that project)
I can do a PR to add the feature.
Is there any documents on how to add the feature to this project?

@haydendonald, have you had any progress on adding the feature?

I have had some success but have not been able to test/implement all the features. I'll do a pull request but i'm not sure if it's good enough as features are not fully/correctly implemented and there may be bugs. (We are currently using it for a CCU and switcher)

You can grab it on my git as i forked it.

@nitsuj102284
Copy link

@haydendonald Great news! Will this also get camera control values from the ATEM. For instance, using the ATEM camera control panel or ATEM software control to change iris, etc. Does your pull request have an event to receive those changes?

@rohanwright
Copy link

Theres a merge waiting that would help with this but it has been waiting, how can we get it moved along?

@gavalierm
Copy link

+1

@Julusian
Copy link
Member

Julusian commented Feb 7, 2024

I have just published a library which extends this one to provide camera control functionality https://www.npmjs.com/package/@atem-connection/camera-control

I decided to make this a separate library for now, as I am uncertain how 'final' the types and implementation is. Once it is proven to be complete and to not need any large overhauls, I will consider trying to get it merged back into here.

Let me know how you get on with it, report any issues or anything that feels/looks/seems wrong at https://github.com/julusian/atem-connection-camera-control

It doesn't cover 100% of what the sdk docs say can be done, but as far as I can tell it covers everything that the camera I have supports, so it is all that I can be confident in.

@gavalierm
Copy link

@Julusian thank you. Looks very promising.

If you remember - somewere i asked for HEX payload messages, because i was working on this project

https://github.com/gavalierm/btbm-tally

It is BLE - WIFI proxy bridge to forward all BLE CCU data from BLE to WIFI endpoint. And with ATEM CCU messages (in raw format) it can be very usefull i think.

I will try how it goes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pr wanted Something we are unlikely to implement soon, but will accept a PR for
Projects
None yet
Development

No branches or pull requests

6 participants