bilde2910 / stitch-gear360

Stitching tool for 360° videos captured by the Samsung Gear 360 (SM-C200)
MIT License
13 stars 4 forks source link

Where to get spatialmedia as a binary? #1

Closed denizkoekden closed 2 years ago

denizkoekden commented 2 years ago

Hello, I tried everything to get spatialmedia installed as package / binary. The linked git repo from google tells me to use spatialmedia like this "python spatialmedia" and this script checks for "spatialmedia" like if its a linked binary. How to compile spatialmedia so it gets installed like this?

denizkoekden commented 2 years ago

I solved this by creating a file "spatialmedia" containing

 #!/bin/bash
python /opt/spatial-media/spatialmedia "$@"

make it executeable with chmod +x and the I moved it to /bin/spatialmedia

This works but I would like to know what the "correct" way would be.

bilde2910 commented 2 years ago

The spatialmedia binary was supposed to be a script file that calls the spatialmedia Python module with all arguments. I.e. something like this, in e.g. /usr/local/bin/spatialmedia (or elsewhere on your PATH):

#!/bin/sh
python -m spatialmedia $@

Assuming python /opt/spatial-media/spatialmedia "$@" works for you, then that would also be fine. I suppose the Python package can end up in different locations on the system, but the script assumes that it's installed as a Python module via pip, in which case calling it via python -m spatialmedia should always work. I'll make sure to add a note on this in the README.

denizkoekden commented 2 years ago

Okay thanks! So I was on the right track.