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

Perform conversion prior to transferring file to NAS #48

Closed
lizardfish0 opened this issue Jul 31, 2023 · 7 comments
Closed

Perform conversion prior to transferring file to NAS #48

lizardfish0 opened this issue Jul 31, 2023 · 7 comments

Comments

@lizardfish0
Copy link
Contributor

lizardfish0 commented Jul 31, 2023

Hello,

My issue is nearly identical to #39, just looking for some clarity.

I have Plex/Sonarr/Radarr running on a separate server w/ a more powerful CPU, GPU, NVMe drive, etc. I'd like to perform the transcoding operation using this hardware. My NAS does not have a GPU or a CPU sufficient for this work, which rules out "library-side" solutions like tdarr.

Based on your response in #39, it seems like this isn't possible due to the lack of a suitable event to subscribe to in sonarr/radarr. I think the next best solution would be to direct SMA to perform the transcoding on the host system's /dev/shm, which would result in the file first being written to the NAS, then read from the NAS, then transcoded and written back to the NAS.

If possible, I'd like to reduce this back-and-forth and the network overhead it creates to a single trip.

Hoping there's a way to accomplish this! I'm not sure how to utilize the scripts mentioned in #39.

@lizardfish0
Copy link
Contributor Author

Also worth adding that my qBittorrent is hosted on a remote server. From what I can tell, the download client scripts in the sickbeard_mp4_automator repo are specific to scenarios where the client is hosted on the same device that's running SMA.

@lizardfish0
Copy link
Contributor Author

lizardfish0 commented Aug 1, 2023

Thinking out loud, is there a way to take advantage of the remote path mappings feature in sonarr/radarr? I use syncthing to mirror my qBit downloads back to my server (the one I'd like to do the transcoding on). Presumably, qBit is unaware of syncthing's existence and just fires back an API request to sonarr/radarr when it completes the download, which triggers sonarr/radarr to wait till the file appears in the folder you specify in the remote path mappings section.

Is there anything stopping you from giving a different path? I'm thinking:

  • I tell sonarr that /etc/downloads/completed on remote maps to /downloads/completed on my local.
  • In syncthing, I have it sync /etc/downloads/completed to /downloads/processing.
  • Some script (not sure how hard this would be to package into the container) that invokes something like manual.py to perform the conversion on this file, outputting it to /downloads/completed.
  • Sonarr picks up this file just like it would have picked it up from syncthing.

@mdhiggins
Copy link
Owner

You have a few options here without needing to mess with path mapping

The easiest option for /dev/shm which I use on my own setup is to just use the output-directory option. All conversion and processing of temporary files will be done in that directory and then the final product moved to the final destination

As mentioned in #39, SMA also includes a whole host of scripts to run after the download client completes, so you have the option of running things after SAB/Deluge/etc finish downloading before Radarr/Sonarr are notified that the download is complete which depending on your configuration might be more opportune. The readme covers how to set up these scripts

@lizardfish0
Copy link
Contributor Author

Right, having qBittorrent trigger a script seems like the best option. However, I'm running qBittorent on a remote VPS and then syncing the files back to my machine running the sonarr-sma container. I may be misunderstanding, but this script seems specific cases where you want to transcode media on the same machine that runs qBittorrent.

@mdhiggins
Copy link
Owner

Yeah in that case that's probably not what you're looking for. The output-directory option might be the way to go then

@lizardfish0
Copy link
Contributor Author

Is there any way to set up some monitored directory within the container? Could then utilize the move-to option to move the file to the directory that sonarr is monitoring.

@mdhiggins
Copy link
Owner

Would need a custom solution for something like that, nothing supported currently

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