time4tea / gopro-dashboard-overlay

Programs to process GoPro MP4 & Generic GPX/FIT files and create video dashboards & maps
GNU General Public License v3.0
327 stars 48 forks source link

Python 3.12 incompatibility #163

Closed JimmyS83 closed 6 months ago

JimmyS83 commented 7 months ago

Would be possible to bump wheel/dependencies, to be able compile it with py 3.12? pillow==9.4.0

<string>:45: RuntimeWarning: Pillow 9.4.0 does not support Python 3.12 and does not provide prebuilt Windows binaries. We do not recommend building from source on Windows.

time4tea commented 7 months ago

Thanks for raising this. I'll check python 3.12 compatibility. I hadn't previously checked as it only came out in October.

time4tea commented 6 months ago

This is a bit more involved than it might seem as Python3.12 is only supported, as I understand from https://pillow.readthedocs.io/en/stable/installation.html#platform-support in the very latest version of Pillow.

Unfortunately, we use some Pillow APIs from 9.4.0 that are removed by 10.1.0, so its not a simple case of just updating the dependencies.

JimmyS83 commented 6 months ago

Unfortunately, we use some Pillow APIs from 9.4.0 that are removed by 10.1.0, so its not a simple case of just updating the dependencies.

ou, understand :( As I dont want to downgrade python version at this moment, is this a big dealbreaker - I mean, it will take much more time to fix (I mean roughly estimated, few weeks vs year and more)? I am planning try Pillow-SIMD as recommended on Performance guide, not sure if that changes something in that matter.

time4tea commented 6 months ago

Hi - This is a fairly big change. Multiple libraries that are used in the software also depend on features of Pillow that are removed in version 10.

As a possible workaround, on Linux it is possible to install multiple different versions of Python, I assume the same is true in Windows.

time4tea commented 6 months ago

Actually - I can contradict myself immediately. Seem to have managed it. Python 3.12 should work with v0.117.0 - should be visible on PyPI soon.

JimmyS83 commented 6 months ago

Actually - I can contradict myself immediately. Seem to have managed it. Python 3.12 should work with v0.117.0 - should be visible on PyPI soon.

Will test installation as soon I will see it there :)

Thank you!

P.S: Do you see any possible related issues with SIMD version in that regard (newer python)? image

time4tea commented 6 months ago

It's a good question. Not sure! Especially on Windows... as I don't have a Windows machine to test on really. But please do let me know if it works.

Depending on your cpu and graphics card, and use of double buffer mode (not supported on windows) pillow-simd might not make much difference, as at some point the limiting factor is the video encoding.

Using my current cpu (i9-14xxx) I can easily saturate my nvidia 4060 gfx card when in double buffer mode, so pillow simd makes no difference (it reduces cpu load a bit, but encoding speed is the same)

JimmyS83 commented 6 months ago

Planning use Windows, i5-14xxx with rtx 4070 (Gopro8 footage as source).. No double buffer then, unfortunatelly, so I will see, if simd could help. Of course, if there would be an issue, I am fine with reverting back to pillow, if it will work. After all, working setup is more important than speed.

I am planning doing almost 100% overlays only, as I am editing videos in other software. But the fact is, that I am just used for limitation of Dashware, I need to test and play with dashboard a bit (or more, considering all nvdec and ffmpeg options), and maybe some usecases changes in future.

time4tea commented 6 months ago

There's now a build check for 3.12 compatibility. The builds can't test all features, but should give a good indication if there is a big problem. Thanks for raising.