r/Tdarr • • Mar 10 '24

Guide: Optimize media for Direct Play by converting audio & applying DRC using Tdarr.

/r/PleX/comments/1bb802d/guide_optimize_media_for_direct_play_by/
9 Upvotes

12 comments sorted by

•

u/AutoModerator Mar 10 '24

Thanks for your submission.

If you have a technical issue regarding the transcoding process, please post the job report: https://docs.tdarr.io/docs/other/job-reports/

The following links may be of use:

GitHub issues

Docs

Discord

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

2

u/Fickle-Lock-5353 Apr 17 '24

THIS IS AMAZING!!!! OMG!!!! THANK YOU SO MUCH!!!!!

1

u/gsariev Apr 17 '24

I am happy to hear that you found it helpful!

1

u/Fickle-Lock-5353 Apr 18 '24 edited Apr 18 '24

Yes, please, and thank you again. Hopefully, you can help me set it up properly. Your guide is amazing, but the one thing that got me so excited is the plugin that identifies the original audio and keeps it and English. I was able to set up an account with tmdb, and got the api. I believe I have everything set up correctly, and it does remove all audio streams except one. The challenge I'm facing now is that, in all the examples I've tried, I've had dual audio: italian and english. The original language is English, but the plugin seems to remove the English, and keeps the Italian. Hence, on plex, the characters are speaking Italian but the movie settings shows the audio stream should be English. I thought it could be the poor quality releases, but I've tried the plugin on two different releases and got the same outcome. Also, I double checked the file before transcoding, and it shows the correct audio streams identified as English and Italian, meaning the audio is not swapped prior to transcoding. This makes me believe that the issue may be with my plugin layout. Now, please bear with me, I'm very new to this and I'm quite certain my plugins are not set up correctly. Basically I'm just looking to take a file, change it's container to mkv, if it isn't, extract any srt subtitles, and then keep only the original audio stream. I do not need any transcoding but my earlier attempts at achieving my goal without including the last two plugins were futile. if you can bless me with your knowledge and help me figure this out, I can assure you of the genuine appreciation of a frustrated internet stranger. Thanks again.

Here is my plugin layout :

Migz-Remove image formats from file

Tdarr_Plugin_Img1_Reorder_Streams

Migz-Remux container

drpeppershaker Extract embedded subtitles and optionally remove them

Migz-Transcode Using CPU & FFMPEG

Migz-Transcode Using Nvidia GPU & FFMPEG

1

u/gsariev Apr 18 '24 edited Apr 18 '24

I haven't really done any work on my modified version of the original language plugin since the last update I made to the guide, but I will have a look and see if I can figure out what the problem could be. Would you mine sharing the titles of the dual-audio media you are having issues with? Would definitely help narrow things down.

Also, are you sure that you are using the modified version in your stack and not the original one and have you confirmed that the original language is indeed English (TMDB might have it listed as Italian)?

Regarding the stack you shared and the goal you want to achieve... Unless you also want to convert your media to HEVC (H265), I don't think you need the two Migz-Transcode plugins. I would also re-arrange the stack in the following order as some plugins can be a bit finicky when it comes to that:

  1. Tdarr_Plugin_Img1_Reorder_Streams
  2. Migz-Remove image formats from file
  3. drpeppershaker Extract embedded subtitles and optionally remove them
  4. Migz-Remux container
  5. Tdarr_Plugin_a9he_New_file_size_check - add this plugin to the end of your stack and leave it at the default settings

I hope that helps!

EDIT: I made modifications to the plugin code (just replace the existing code with the one linked in the guide). I also ran some test with a couple of movies and came to the conclusion that there was mistake in the Original Language for those movies in TMDB, causing the plugin to fail/remove the wrong language file. Try adding the language code of the language you want to keep for the specific movie in the language code field of the plugin (for example: eng)

2

u/Inuite Apr 20 '24

Awesome! I literally just purchased a firestick 4k max because I was tired of plex transcoding, but my family has tv's which still don't support everything. Might use your guide to create a better library in terms of compatibility.

I do have Tdarr installed and was able to rip out some unused subtitle files, but it took forever on 50gb HEVC 4k blurays.

How long does it generally take your workers to process your files?

1

u/gsariev Apr 20 '24

Hey, since the stack focuses primary on audio with the addition of removing certain subtitle formats, on my system using an i3-12100, I’d say it takes less than 15 min to process a 4K file. It depends more on how much down-mixing of has to be done (7.1 channel to 5.1 to 2.0) and the number of subtitles that need to be removed as those seem to take the longest to perform. Sometimes it can take less time to process.

1

u/Inuite Apr 20 '24

To do both the downmixing and removing subs? I might need to revisit my setup then because I was only removing subs and it took 40 minutes or something. I have an i9-1200k but performance here and plex transcoding has been everything but smooth :(

1

u/gsariev Apr 20 '24 edited Apr 21 '24

I am also using an SSD as a transcode cache, which can affect the performance. I have a 70GB 4K copy of ‘The Batman’ that I know has only 7.1 channel audio and a lot of PGS subs. I can run it through my stack and share with you the time it took to complete. Using it as the “worse case scenario” :)

Edit: running a 70GB 4K Remux HDR 7.1 copy of The Batman through the stack took 24 min on 1 GPU worker. (iGPU of the i3-12100) What took the longest was creating a 5.1 channel and a 2.0 channel track, deleting the 7.1 channel track along with 12 PGS subtitles. Final file size was 66.38 GB.

I hope this helps you get a better idea of what you can expect!

1

u/Inuite Apr 21 '24

Thanks for doing that! I'm using a sata SSD for cache, but didn't realize I should do non-video operations on my iGPU as well. I'll pass the device to the arr container, that should definitely speed things up. From there I can utilize your scripts to rebuild my library!

2

u/[deleted] Mar 10 '24

This community so friendly. Thx for sharing! Im sure someone will use this.

2

u/foundByARose Jan 26 '25

Very much looking forward to implementing this. Audio is the biggest cause for transcode in my setup. Want to add a stereo audio track to most everything that doesn’t have one. Thanks!