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

Create a custom layout for this frame size #98

Open
shahargli opened this issue Feb 2, 2023 · 2 comments
Open

Create a custom layout for this frame size #98

shahargli opened this issue Feb 2, 2023 · 2 comments
Labels
documentation Improvements or additions to documentation not-a-bug This isn't a bug

Comments

@shahargli
Copy link

Hello,

Trying to work with files created by gopro10 with max resolution, I get the error:

docker run -v "D:\DATA\photos\gopro\2023-02-02\HERO10 Black 2":/work overlaydash/gopro-dashboard-overlay:0.81.0 gopro dashboard.py GX010009.MP4 aa.mp4
Starting gopro-dashboard version 0.81.0
Timer(GPMD - Called: 1, Total: 0.00164, Avg: 0.00164, Rate: 609.46)
Timer(extract GPS - Called: 1, Total: 0.00848, Avg: 0.00848, Rate: 117.98)
Timer(extract ACCL - Called: 1, Total: 0.02825, Avg: 0.02825, Rate: 35.40)
Timer(extract GRAV - Called: 1, Total: 0.01435, Avg: 0.01435, Rate: 69.68)
Timer(extract CORI - Called: 1, Total: 0.02229, Avg: 0.02229, Rate: 44.87)
Timer(parsing - Called: 1, Total: 0.07528, Avg: 0.07528, Rate: 13.28)
Note: 2 GoPro GPS readings were mapped to 'NO_LOCK', for the following reasons:

  • Heuristics -> 2
    Timer(loading timeseries - Called: 1, Total: 0.31896, Avg: 0.31896, Rate: 3.14)
    Generating overlay at Dimension(x=5312, y=2988)
    Timeseries has 21 data points
    Processing....
    Timer(processing - Called: 1, Total: 0.00026, Avg: 0.00026, Rate: 3,827.02)
    FFMPEG Output is in /tmp/tmp9c3gvz96
    Timelapse Factor = 1.145
    Timer(program - Called: 1, Total: 0.37050, Avg: 0.37050, Rate: 2.70)
    Traceback (most recent call last):
    File "/venv/bin/gopro-dashboard.py", line 280, in
    create_widgets=create_desired_layout(
    File "/venv/bin/gopro-dashboard.py", line 62, in create_desired_layout
    raise IOError(f"Unable to locate bundled layout resource: {resource_name}. "
    OSError: Unable to locate bundled layout resource: default-5312x2988. You may need to create a custom layout for this frame size

How would I go about adding a custom layout?

@time4tea
Copy link
Owner

time4tea commented Feb 2, 2023

Hi. There are built in layouts for some resolutions, but not for all - new resolutions keep being added!

I should document this a bit better perhaps.

You can take one of the builtin layouts, e.g. the 4k one - and modify it.

Here is a link: https://github.com/time4tea/gopro-dashboard-overlay/blob/main/gopro_overlay/layouts/default-3840x2160.xml

You can use the gopro-layout command to preview the layout. It will redraw the overlay whenever the file is changed, so you can use it for "live" editing.

Once you are happy, use the --layout-xml parameter to specify the location of the file.

In a docker container, you'll need to use the container path. If you're not sure, It's easiest to put the layout file in the same directory as the mp4 file, and just use the filename.

Please let me know how you get on!

@shahargli
Copy link
Author

Thanks.
Looking at the default-3840x2160.xml file, it is quite complex for me. I cannot find what should I change there.
Will the gopro-layout command be able to examine a gopro video file and extract the layout that can be later used by gopro-dashboard-overlay?
Can you recommend how can I use the gopro-layout command in such manner pls?

thanks

@time4tea time4tea added documentation Improvements or additions to documentation not-a-bug This isn't a bug labels Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation not-a-bug This isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants