Stash-vr-companion

Hi everyone,

I would like to mention the tool I have written stash-vr-companion.
This is a tool that bridges the gap between stash and vr video players like deovr and heresphere.

About
Stash is an open source porn organizer with good support for scraping metadata for scenes.
It has handy support but no vr support currently (but there are pull requests being developed)
My tool sits between stash and provides web based json api for /deovr and /heresphere to provide an index of videos that are available allowing you to play content in the players.
This works in a similar way to xbvr.

Installation
This is designed to run inside docker on linux, to configure you need to provide the stash url as an environment variable as well as a docker volume to store an image cache.

docker stop stash-vr-companion
docker rm stash-vr-companion
docker volume create stash-cr-companion
docker pull ghcr.io/tweeticoats/stash-vr-companion:latest
docker run -d  --name=stash-vr-companion --restart=unless-stopped -v stash-cr-companion:/cache/ -p 5000:5000 -e API_URL=http://192.168.0.22:9999/graphql ghcr.io/tweeticoats/stash-vr-companion:latest

If you do not use docker note that the application is written in python and flask so it should run on windows or mac fine.
The process would be to install python, download the source from github, install the dependencies using pip, set the API_URL environment variable and run uwsgi in the folder containing the source code.

Scene Configuration
The list of scenes that show up in the list are configured by adding tags to scenes in stash.
For a vr scene you will typically apply the tags ā€œexport_deovrā€, ā€œDOMEā€, ā€œSBSā€ to the scene to indicate that it is a 180 vr scene.
For 2d scenes you would add the tags ā€œexport_deovrā€, ā€œFLATā€ to indicate it is a 2d scene.

Player Usage
This tool runs a web server on port 5000, access http://ip_address:5000 in deovr or heresphere and it should have a wall tagged scenes.

Script support
Stash has script support and if you have matched it there it should be provided to your video player.
if there is a funscript with the same name as the scene it can be associated with the scene, ie video.mp4 and video.funscript
I do not have an interactive device myself so I have not tested this myself but I believe it should work with deovr and heresphere.

Bug reports best made in the stash discord in the #plugins channel.

5 Likes

What is the advantage/disadvantage of stash vs xbvr?

Short answer is why not run both.
By default both run on port 9999 but you can easily change the port that stash uses by editing config.yml and changing it.
Both can co-exist on the same machine and index the same sets of files so there is no disadvantage to using both.

XBVR
Advantages:

  • Scrapers are all built in and support a wide set of sites, metadata is scraped automatically and can automatically match files as scene file names tend to be predictable
  • Support for deovr, heresphere, interactive toys etc
  • Easier to use

Disadvantages:

  • As scrapers are built in they may not cover all studios and adding studios require a new release of xbvr
  • Scenes can now be created manually to fill gaps
  • VR only

Stash
Advantages

  • Good metadata with a community maintained set of scrapers
  • stashdb.org we are building our own crowd sourced, user edited metadata database based on file hashes to allow us to provide better metadata to others
  • Great for 2d scenes
  • Web based, all you need is a browser so good support for watching on a tablet or phone in bed
  • Graphql api with third party scripts / tools to rename files based on metadata, export metadata to kodi, plex etc

Disadvantages:

  • VR support, is still being developed, so you need my tool to bridge the gap while that is being worked on.
1 Like

Seems like the perfect companion to Stash(!), but would you be willing to write an ā€œidiotā€™s guideā€ to installing the plugin in an Unraid environment? Thereā€™s a large community using Stash on Unraid, but Iā€™m guessing most [of us] arenā€™t all that technically versed. Iā€™ve been trying all day, but I just canā€™t get the hang of if (I think itā€™s the nginx thing messing me up, but I honestly have no idea at this point). Anyway, thanks for all your work!

2 Likes


In Deovr, itā€™s successful.
Unfortunately, I found it difficult to use funscript in deovr.
So I tried to connect from Heresphere.
But in Heresphere, I only get a desktop-like screen.
Am I missing something?

In heresphere click the button next to the url the icon with 4 squares and a triangle ie a play button to switch to the api.

As you mentioned funscripts there is a configuration option: set the scene title to the file name.
This is useful if you use script player or multifun player to talk with your device so it can match the fun script.
Go to the config in the top right of the web site and toggle the option.

2 Likes

Hi @Tweeticoats, thanks for this! Iā€™ve tried to configure this for many hours, not sure where Iā€™ve gone wrong. Would you be my hero and help me figure this out?

I ran the docker lines to get things started:

docker stop stash-vr-companion
docker rm stash-vr-companion
docker volume create stash-vr-companion
docker volume create stash-vr-companion-hsp
docker pull ghcr.io/tweeticoats/stash-vr-companion:latest
docker run -d  --name=stash-vr-companion --restart=unless-stopped -v stash-vr-companion:/cache/ -v stash-vr-companion-hsp:/hsp/ -p 5000:5000 -e API_URL=http://192.168.2.82:9999/graphql ghcr.io/tweeticoats/stash-vr-companion:latest

Then I tried to access after it had completed by going to http://192.168.2.82:5000, with Stash running, and I get Internal Server Error. Here is the log:

2024-07-05 19:57:54 --- no python application found, check your startup logs for errors ---
2024-07-05 19:57:54 [pid: 1|app: -1|req: -1/5] 172.17.0.1 () {40 vars in 875 bytes} [Fri Jul  5 23:57:54 2024] GET / => generated 21 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 83 bytes (0 switches on core 0)
2024-07-05 19:57:54 --- no python application found, check your startup logs for errors ---
2024-07-05 19:57:54 [pid: 1|app: -1|req: -1/6] 172.17.0.1 () {38 vars in 801 bytes} [Fri Jul  5 23:57:54 2024] GET /favicon.ico => generated 21 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 83 bytes (0 switches on core 0)

Not too sure how to rectify this or where Iā€™ve turned wrong - would you be willing to give me a hand?

Thanks so much in advance