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

Info command to print GoPro settings #86

Open
wants to merge 13 commits into
base: development
Choose a base branch
from

Conversation

daktak
Copy link
Contributor

@daktak daktak commented Jan 10, 2023

Initial Info support

Closes #83

Added initial support for info command.
Needs work to give error for other cameras

$ ./mmt info -i 10.5.5.9
Using config file: /home/user/.mmt.yaml
SSID : GP34713698
Mode : Video
White Balance : Auto
Resolution : 2.7K
ISO Mode : Max
ISO Limit : 400
Protune : false

Type:

  • Bug fix
  • [ X] New feature
  • Breaking change
  • Documentation

Camera:

  • [X ] GoPro
  • Insta360
  • DJI
  • Android
  • This PR adds a new camera

Component:

  • Core logic
  • Import
  • Merging
  • Firmware Update
  • Video Manipulation
  • Info

Checklist before approval:

  • Linter pass
  • Build pass

pkg/gopro/detect.go Outdated Show resolved Hide resolved
@KonradIT
Copy link
Owner

Hi @daktak , for that issue I had more in mind to read a video file and output the protune info and other stuff, kinda like what its being done here: https://gopro.github.io/labs/control/metadata/

But printing it nicely in the terminal. This is also cool, but not what the issue is about.

@daktak
Copy link
Contributor Author

daktak commented Jan 10, 2023

Oh cool, maybe can switch between this and reading file by "sd_card" or "connect"

Comment on lines +11 to +18
func GetInfo(in string) (CameraStatus, error) {
var gpStatus = &CameraStatus{}
err := caller(in, "gp/gpControl/status", gpStatus)
if err != nil {
return *gpStatus, err
}
return *gpStatus, nil
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to:

return nil, err

and have CameraStatus be a pointer

Comment on lines +20 to +21
func GetISO(in int) int {
switch in {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private

Comment on lines +34 to +36

func GetVidRes(in int) string {
switch in {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also needs more resolutions, 5k, 5k 4:3, etc...

Comment on lines +65 to +67

func GetWhiteBalance(in int) string {
switch in {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private.

Not sure if hardcoding these values is the way to go, especially when we have that stuff on /gp/gpControl manifest. Better to parse the manifest and build functions / maps from it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Subcommand: print info about gopro video settings
2 participants