Automatic custom covers for XBVR

Thanks, I appreciate the tips. I had initially looked at both XBVR and STASH, only went with XBVR because there were some good tutorials out there. I just loaded STASH this morning, and I have to say it’s awesome. Thanks for the recommendation to just go ahead and pull the trigger on that. I have to get StashVR loaded next and check out how that integrates with Heresphere, but seems pretty straightforward. Thanks again!

I decided to write up a little guide, because I couldn’t find someone telling me step by step what to do, so I had to research and problem-solve each tool and “train of thought” myself. Perhaps it might be of use. I’m assuming you have Stash up and running with some Stash-box endpoints (used to identify your videos and download covers, text, tags and more automatically), and that you’ve added a bunch of videos and matching funscripts to Stash.

Here’s how to get the best VR experience (afaik):

  1. In Stash, check your API key under CogwheelSecurity

  2. Start Stash-VR with parameters. On my computer (where I run Stash and Stash-VR), it looks like this:
    /opt/stash-vr/stash-vr --HSP_DIR /opt/stash-vr/hsp/ --STASH_GRAPHQL_URL=http:/192.168.1.20:9999/graphql --STASH_API_KEY=YOUR_API_KEY_HERE --LISTEN_ADDRESS=:80
    Replace the API key and URL with the IP:port Stash runs on - I will use 192.168.1.20:9999 as a placeholder.
    The :80 means that Stash-VR will be listening on port 80 on the same machine, which means it must run as root/admin to bind to the port. This is to avoid having to type out the port in HereSphere. You can change it if you want to.

  3. Now we need to tell StashVR exactly what content to serve from Stash… so we need to set a tag on all the videos we want to see in StashVR. The tag name is export_deovr. Create it in Stash if you don’t have it.
    Go to http://192.168.1.20:9999 (your stash installation) in your browser. Create a new filter, name it z-Not exported to StashVR. The filter should have Interactive is true, and Tags excludes export_deovr. This is all the video files that have funscripts, but is not viewable inside HereSphere yet. Now click the three dots “...” which is next to the search input field, Select All, Edit Pen appears, click it, under Tags, click Add and type export_deovr. Click Apply.
    BOOM. You just sent all these funscript-enabled videos to be viewable in StashVR.

  4. (Optional) Create a bunch of filters for easy access in HereSphere:

  • Interactive 2D Blowjob
  • Interactive 2D Created
  • Interactive VR Blowjob
  • Interactive VR Created
  • … and more.
    You can make any filter you want basically - it also remembers sort order, so I sort mine by Created at to see the newest videos first in HereSphere.
  1. StashVR is now ready, so lets fire up HereSphere in your headset!
    In HereSphere, go to http://192.168.1.20/heresphere (the IP of where you’re running Stash-VR).
    You should now see a big wall of thumbnails with videos - with video preview on hover if you’ve generated the files in Stash.
    You should also see a thin bar with buttons, each button named whatever your filters are named - so you can filter and find what you’re looking for easily inside HereSphere. The reason we named one of our filters z-Not exported to StashVR is because the list of filters is sorted alphabetically, and I want it out of the way as much as possible when I’m inside my headset.

  2. Once all that is done, whenever I add a new video to Stash, I check the z-Not exported to StashVR filter, and add the export_deovr tags to those videos, so that I can see them in my headset. Easy peasy.

  3. (Optional) Add some plugins in Stash to make the HereSphere experience more enjoyable - first, install the Misc Tags plugin. Under Plugins after it has been installed, check Add tags for stash-vr-companion, and Add VR related tags. They automatically add some VR tags, such as 180, 360, SBS and so on, which HereSphere picks up on (you can always override in HereShere ofc).
    Another great plugin is Stash Interactive Tools, which enables Stash to handle multiple funscripts for the same video, and perhaps Timestamp.Trade which is a database of timestamps for videos. For example, I can see inside HereSphere that 14:04 is where the Cowgirl starts, and 21:02 is reverse cowgirl.
    You can even do ratings inside HereSphere and have them show up in Stash - my favorite videos get a 5 star rating - and I have another filter for “only 5 star rating” videos, so I can easily find my favs :slight_smile:

1 Like

Hi,
I made a python script that generates covers for every scene with the placeholder image in xbvr and automatically links them to the corresponding scene.

You will need ffmpeg for this (either in path or just ffmpeg.exe and ffprobe.exe in the same folder as this script).

You will first have to select your XBVR database file and after that your root directory containing all your media files.
The script will scan through your database and get all scenes that have the placeholder image as cover, it will then search through your media and generate thumbnails one by one based on the first file it finds in the database for the scene (it ignores .funscript and .srt).

The thumbnails are saved in the myfiles directory of xbvr.

After all thumbnails are generated it will link the thumbnails to the corresponding scene.
Assuming you just use the standard folder structure of xbvr this script will do everything automatically.
It also works with the docker version as long as your xbvr-config and database are accessible outside of the container (through docker volume mapping).

The Thumbnails are generated in 720x480, only using the right side of a SBS video file.
It also detects how long the video is (well kind of) and chooses when to grab a thumbnail based on that.

The Thumbnails will also look kinda borked (but at least there are thumbnails) since i only crop the vr video file and dont do any lens correction or anything like that, if someone knows how to do that please let me know.

I tested it on windows but it should work on macos and linux aswell.

I can also make a .exe file for this if anyone wants to use it without having to set up python, but sharing .exe is pretty unsafe since you can’t see whats in it easily.

Here is the python file as .txt, you can just rename it back and execute it.
I its allowed to share like that.

main.txt (11.7 KB)

2 Likes

Nice job!
Had this script been available I wouldn’t have had to pull my hair doing what I did :smiley:

2 Likes

ty, i hope it still helps someone in need, what you did inspired me to do the script but with a smaller barrier of entry(i hope)
i still think xbvr should do that automatically and better (like detecting if its a vr file and then doing lens correction, which should be possible but i don’t know ffmpeg well enough)
i made a small improvement, it now does an automatic backup of your database before editing it, so no one fucks up their database on accident

main.txt (12.5 KB)

2 Likes