Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Custom Transcodes Folder / Transcode Video Replace #2065

Open
Emilaia opened this issue Nov 26, 2021 · 2 comments
Open

[Feature] Custom Transcodes Folder / Transcode Video Replace #2065

Emilaia opened this issue Nov 26, 2021 · 2 comments

Comments

@Emilaia
Copy link

Emilaia commented Nov 26, 2021

Is your feature request related to a problem? Please describe.

I think there should be an option to specify a custom path to save generated videos at, mainly given how a single transcode can potentially outweigh by a lot the rest of the items within the generated folder.

Where an equally important alternative (for the problem that will be described below), would be the option to replace a scene with its generated video, after a successful generation.

Describe the solution you'd like

A new custom path for generated (mp4 transcoded) videos in Settings > Configuration.

A sub checkbox for the option located at Settings > Tasks > Generate (Settings) > [ ] Transcodes (MP4 conversions of unsupported video formats) that reads something along the lines of [ ] Discard unsupported format video and replace with generated.

Additional context

I have stash hosted in a raspberry pi with an SD card of 32GB, that accesses a drive for the videos. Among those videos, quite a few are in a less than favorable format, like wmv, and so, I wish to convert them to mp4 so I can view them within stash as intended.

And at first glance it seems like a no brainer to use the built-in transcode tool for this problem, but in this configuration it comes with a major drawback.
Basically, my generated folder, which holds thumbnails, markers, AND transcodes, still points to a folder within my raspberry pi. This is mainly for speed for accessing this data locally, else pretty much every single image and short preview video would have to be fetched from a network drive, which depending on the page and filters, can involve seconds of loading time per page load.
So the problem becomes that if I make use of the transcode tool, the generated mp4 videos will be saved within this folder.

This leaves me with two options. I can make use of the transcode tool, extract the transcoded video from the generated folder, and move it to my network drive, so that I can re-introduce it as a new video, which then allows me to delete the old wmv if I want (though I'll have to re enter any metadata the old entry had). Or find an external tool that converts to mp4 and skip the extraction process of the previous method, while doing the rest pretty much the same.

Where, small parenthesis, if you're wondering why am I moving the transcoded video and deleting the old one, there's two main reasons:

  1. The SD card can only hold so much, and transcoded videos will quickly fill that up.
  2. I'm deleting the old video to save space, especially if I'm going to do this for a big number of entries. When I first made use of the transcode tool, I noticed it still kept the old video with the not so favorable extension, and after a successful transcode, personally, I'd prefer to only keep the new one.

To solve this, I believe an additional/optional custom folder path for transcoded vids could be of great help, singling this folder out, mainly due to the potential size it can have.
In this same context, I could very well just set the transcodes path to point to the network drive, keeping the rest of the generated folder within the SD card.

However, this still leads to the problem of what if one still doesn't want to have both videos (original and transcoded), because of space limitations.
If one manually deletes the old video, or moves the transcoded video to the old video folder, the new mp4 video is treated (as expected) as a completely different scene entry, instead of a transcode of an existing scene. And depending on how much metadata you manually added or scraped for the old video, this can be quite a pain to do 1 by 1, mainly given due to how there isn't a "Replace With..." context menu or equivalent, akin to a tag's "Merge Into...", nor there is a way to manually edit the file path of a scene.
So I think the most sensible solution, would be to give an option for a video transcode to replace the original, change the video path to now point to the mp4, and keep your existing markers, metadata, etc.

This dual solution would provide A) a way for people with limited space, to reroute the transcodes to a custom path/drive (even if just for during the time it takes to generate that transcode). And B) a way to avoid investing twice the space on one transcoded video, while keeping the already existing metadata.

@its-josh4
Copy link
Contributor

I am interested in the first part of this issue too, to be able to specify where transcoded content is saved, for pretty much the same reason as @Emilaia

I have tried with symlinks, but they are causing errors (probably because I'm running in Docker).

@its-josh4
Copy link
Contributor

Upon further investigation, I was able to get symlinks to a separate partition (including using a separate Docker volume that mounts a path from a different partition) to work, but it requires #4104.

So it may not be necessary to have this feature, symlinks should be enough after the fix is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants