stashapp / stash

An organizer for your porn, written in Go. Documentation: https://docs.stashapp.cc
https://stashapp.cc/
GNU Affero General Public License v3.0
9.38k stars 803 forks source link

[Feature] Add Aspect Ratio to File Info (i.e. to Filter VR Scenes, Pick Scenes for Screen Size) #3637

Open desertwitch opened 1 year ago

desertwitch commented 1 year ago

Is your feature request related to a problem? Please describe. I'm basically frustrated there's no real option to filter scenes by VR and non-VR (virtual reality). There are times when I'm looking for VR-scenes only and other times when I just want to watch regular scenes.

Describe the solution you'd like I'd like to see another field for "aspect ratio", which scenes could then be filtered with, in the "File Info" section.

By utilizing the "aspect ratio" attribute instead of another mechanism, users wouldn't just be limited to this VR/non-VR filter scenario. They could also filter their scenes by aspect ratios such as 16:9, 4:3 to choose appropriate videos for appropriate screens (and screen sizes).

Describe alternatives you've considered A plugin, but this would probably be much easier to implement as part of the existing "File Info" information gathering process.

Additional context It seems ffprobe is already used extensively to populate the "File Info" section (dimensions, frame rate, bit rate etc.). This would just mean fetching one more informational attribute (aspect ratio) during the existing scanning process and adding it as field.

Example for VR/non-VR detection utilizing ffprobe's aspect ratio information: https://askubuntu.com/questions/1217238/how-to-identify-on-command-line-vr-videos-and-batch-delete-them

Tweeticoats commented 1 year ago

use this plugin to add a tag https://github.com/scruffynerf/aspectratio

desertwitch commented 1 year ago

use this plugin to add a tag https://github.com/scruffynerf/aspectratio

Thanks a lot, that'll definitely help my situation, but I still think this would overall be a good addition to Stash. If not fetching the aspect ratio itself from the video file, it could rather easily be calculated via the resolution.

In any case I think it'd make a worthwhile new "File Info" parameter and filter in the baseline Stash application. Implementation shouldn't be too hard either compared to the benefits of offering more filter possibilities.

The existing plugin (linked above) basically does a mass-tag operation based on the calculated aspect ratio. This is both more invasive and hard to modify (tag names etc.) in the future, so I'd prefer a "simpler" solution.

If not for my use case of VR/non-VR, aspect ratio is still an important "File Info"/video attribute worth adding IMO.

itsame-luigi commented 8 months ago

I have a local branch where I've added relevant information to Scene. I'd started looking into doing it for VideoFile, but ended up using Scene for a number of reasons:

The information I'm currently tracking consists of:

I'm also planning to add VR correction information (x, y, brightness, contrast, and saturation) as this information is frequently used to correct for poor IPD, camera orientation, and lighting conditions and is also frequently stored along with scene information from various sites. I'm also planning to add VR passthrough information such as that supported by DeoVR including chroma keying, alpha packing, and external mask files.

In my working branch I'm able to use the user-supplied VR information to pass along additional video filter commands to ffmpeg when generating screenshots, scrubber sprites, thumbnails, and previews. The results aren't perfect, but

I've also tried setting the default projection in videojs-vr, but there are a number of modes supported by VR headsets that videojs-vr does not support.

If it's imperative that this information be stored on VideoFile and not Scene, I would need some guidance as to how best to structure the data entry UI to support that.