May 21May 21 Overview: Support for Docker image arch-trimarr in the binhex repo.Application: trimarr: https://github.com/binhex/trimarrDocker Hub: https://hub.docker.com/r/binhex/arch-trimarrGitHub: https://github.com/binhex/arch-trimarrDocumentation: https://github.com/binhex/documentation If you appreciate my work, then please consider buying me a beer 😁 For other Docker support threads and requests, news and Docker template support for the binhex repository please use the "General" thread here
May 21May 21 Author This one is a little special, another pet project of mine, it's been in development for well over a decade, first starting off as VideoSlimmer, and finally a massive re-write to finally release as trimarr.Important: Please ensure you read and understand ALL the options before configuring trimarr via the UNRAID Web UI template, sane default have been used to protect users on startup, but misconfiguration could lead to an unexpected loss of metadata.Note: The below answers are based on my hardware and are a rough idea as to how long processing can take, it maybe faster or slower on your system depending on your hardware.Q. What sort of space saving can i expect from trimarr?.A. With a library of around 4000 movies i saw a space saving of 2TB, this was when using the options to remove unwanted audio, subtitles and strip lower channel audio.Q. How long will it take for trimarr to process my media?.A. With a library of around 4000 movies and around 100 TV shows i saw an intial scan (empty sqlite database) time of aoruund 1 week to clean up my library of unwanted audio and subtitles, this number could be higher or lower depending on the number of audio and subtitles tracks to remove and the source type (2160p remux files take longer for example). Once the initial cleanup has been done then subsequent scans will be a minute or so, assuming no remuxes are required.Note: trimarr is CLI only, there is no web ui and i have no plans on creating one at this time, if you are uncomfortable with using command line tools then this is NOT the application for you. Having said that I have exposed all cli options via variables which can be configured via the unraid web ui, so no direct interaction with the CLI should be necessary.Transparency: trimarr has been re-written with the help of AI, i like to think i have a good grasp of good code vs bad code and i have put in a lot of effort to ensure the code quality is acceptable, if the use of A.I. worries you then this is NOT the application for you.
May 21May 21 Doesn't seem to run anything after start regardless of settings. Logs just read:2026-05-21 16:14:33,642 DEBG 'start-script' stderr output: Resolved 40 packages in 263ms 2026-05-21 16:14:33,653 DEBG 'start-script' stderr output: Building trimarr @ file:///opt/trimarr 2026-05-21 16:14:33,654 DEBG 'start-script' stderr output: Updating https://github.com/binhex/pytest-crap.git (v0.3.1) 2026-05-21 16:14:33,772 DEBG 'start-script' stderr output: Downloading virtualenv (7.2MiB) 2026-05-21 16:14:33,783 DEBG 'start-script' stderr output: Downloading pygments (1.2MiB) 2026-05-21 16:14:33,898 DEBG 'start-script' stderr output: Downloaded pygments 2026-05-21 16:14:33,981 DEBG 'start-script' stderr output: Downloaded virtualenv 2026-05-21 16:14:34,131 DEBG 'start-script' stderr output: Updated https://github.com/binhex/pytest-crap.git (6945824b6546af6f9a4430c8f773146feca9bd31) 2026-05-21 16:14:34,132 DEBG 'start-script' stderr output: Building pytest-crap @ git+https://github.com/binhex/pytest-crap.git@6945824b6546af6f9a4430c8f773146feca9bd31 2026-05-21 16:14:34,665 DEBG 'start-script' stderr output: Built trimarr @ file:///opt/trimarr 2026-05-21 16:14:34,765 DEBG 'start-script' stderr output: Built pytest-crap @ git+https://github.com/binhex/pytest-crap.git@6945824b6546af6f9a4430c8f773146feca9bd31 2026-05-21 16:14:34,766 DEBG 'start-script' stderr output: Prepared 39 packages in 1.11s 2026-05-21 16:14:34,819 DEBG 'start-script' stderr output: Installed 39 packages in 52ms 2026-05-21 16:14:34,820 DEBG 'start-script' stderr output: + certifi==2026.5.20 + cfgv==3.5.0 + charset-normalizer==3.4.7 + click==8.4.0 + colorama==0.4.6 + coverage==7.14.0 2026-05-21 16:14:34,820 DEBG 'start-script' stderr output: + croniter==6.2.2 + distlib==0.4.0 + filelock==3.29.0 + identify==2.6.19 + idna==3.15 + iniconfig==2.3.0 + loguru==0.7.3 + mando==0.7.1 + markdown-it-py==4.2.0 2026-05-21 16:14:34,820 DEBG 'start-script' stderr output: + mdurl==0.1.2 + nodeenv==1.10.0 + packaging==26.2 + platformdirs==4.9.6 + pluggy==1.6.0 + pre-commit==4.6.0 + pygments==2.20.0 2026-05-21 16:14:34,820 DEBG 'start-script' stderr output: + pytest==9.0.3 + pytest-cov==7.1.0 + pytest-crap==0.3.1 (from git+https://github.com/binhex/pytest-crap.git@6945824b6546af6f9a4430c8f773146feca9bd31) + pytest-mock==3.15.1 + python-dateutil==2.9.0.post0 + python-discovery==1.3.1 + pyyaml==6.0.3 + radon==6.0.1 + 2026-05-21 16:14:34,820 DEBG 'start-script' stderr output: requests==2.34.2 + rich==15.0.0 + six==1.17.0 + trimarr==1.1.6 (from file:///opt/trimarr) + types-croniter==6.2.2.20260518 + types-pyyaml==6.0.12.20260518 + types-requests==2.33.0.20260518 + urllib3==2.7.0 2026-05-21 16:14:34,821 DEBG 'start-script' stderr output: + virtualenv==21.3.3
May 22May 22 Author 9 hours ago, roofuskit said:Doesn't seem to run anything after start regardless of settings. Logs just read:check the trimarr logs, found in /config/trimarr/logs/
May 22May 22 8 hours ago, binhex said:check the trimarr logs, found in /config/trimarr/logs/It is working, thank you! I've been hoping for an automated solution like this. I was manually running a python script here and there.
May 24May 24 Are there any plans to introduce a feature that can identify a file's native/original language? Right now I use Tdarr to remove unwanted subtitle and audio tracks, but I want to preserve the original language track. I currently use a plugin that determines the original language and then keeps both eng and whatever the native language is.Would something like that be possible? Edited May 24May 24 by bkelly84
May 24May 24 Author 58 minutes ago, bkelly84 said:Are there any plans to introduce a feature that can identify a file's native/original language? Right now I use Tdarr to remove unwanted subtitle and audio tracks, but I want to preserve the original language track. I currently use a plugin that determines the original language and then keeps both eng and whatever the native language is.Would something like that be possible?That is an interesting idea!, at the moment trimarr will only remove a foreign language track is matching preferred language is found.So for instance lets take the german movie 'Das Boot' as an example, this only has german audio there is no english, but there are english subtitles for it, so given 'eng' as your preferred language trimarr would not touch the audio, as there is no english audio to keep, but it would remove all the other subtitle tracks that are not 'eng', so in reality you do keep the native/original language for the movie.However, if you had say a chinese action movie, this may include a dubbed english audio track as well as the original chinese audio track, and in this case you would loose the original chinese, is this the scenario you are trying to prevent?.I guess the real challenge here is identifying what the native/original language of the movie is, that would require a lookup from tmdb or similar for each video file, so that would slow things down a bit, but it could be cached in the database, so it would only be a single hit.
May 26May 26 Author On 5/24/2026 at 4:46 PM, bkelly84 said:Are there any plans to introduce a feature that can identify a file's native/original language? Right now I use Tdarr to remove unwanted subtitle and audio tracks, but I want to preserve the original language track. I currently use a plugin that determines the original language and then keeps both eng and whatever the native language is.Would something like that be possible?On 5/24/2026 at 9:43 PM, Jorgen said:I would love to see this “keep original language audio” feature as well!Tis done guys, of note this does slow down the scan somewhat as we need to call imdb to get the native language for each movie, so scan times will probably double, to give you some ref we are talking maybe 1 hour 30 mins for around 4000 movies when the new option is enabled (disabled by default) - once done though that's it its cached and all subsequent movies added will just be a lookup for those.So to use this pull down the latest image:Edit your container and add variable named TRIMARR_KEEP_NATIVE_AUDIO and set the value to yes apply and wait (check progress in log at /config/trimarr/logs/trimarr.log)if you want to see whether its worked then open the sqlite database and check for language against each movie.EDIT - forgot to mention there is an optional variable you can also add called TRIMARR_TMDB_API_KEY set the value to your tmdb api key to get you higher chances of identifying the language for each movie, imdb used as primary, tmdb used secondary as fallback.
May 27May 27 Looking through the dry-run logs, I assume the audio-tracks and subtitle-tracks indexes are the items to keep after processing?So in this example it would drop 3 audio tracks and only keep the current track 4.Checking the media info in Jellyfin seem to follow the same order, does anyone know if this a reliable way to quickly check which track(s) will be kept?
May 27May 27 Need help working out what's going wrong here.Dry-run completed on test folder, found 19 files to process. I stopped the container (had dinner), set dry-run variable to No and started it again. No other changes in between.No files processed. 😢Let me know if you need more logs or anything else.2026-05-27 19:34:34 | INFO | DRY-RUN | Complete — no files were modified. Would have processed: 19, no change needed: 2, skipped (already done): 0, failed: 0. 2026-05-27 20:15:08 | INFO | mkvmerge not found at '/home/nobody/.local/share/trimarr/bin/mkvmerge', downloading latest binary... 2026-05-27 20:15:43 | SUCCESS | mkvmerge installed at: /home/nobody/.local/share/trimarr/bin/mkvmerge 2026-05-27 20:15:43 | INFO | Found 21 .mkv file(s) under '/media/trimarr_test'. 2026-05-27 20:15:43 | INFO | Done — processed: 0, no change needed: 0, skipped (already done): 21, failed: 0. 2026-05-27 20:15:43 | INFO | Space saved (all sessions): 0.00 B.docker run -d --name='binhex-trimarr' --net='container:binhex-delugevpn' --pids-limit 2048 -e TZ="Australia/Sydney" -e HOST_OS="Unraid" -e HOST_HOSTNAME="Tower" -e HOST_CONTAINERNAME="binhex-trimarr" -e 'TRIMARR_LANGUAGE'='eng' -e 'TRIMARR_MEDIA_PATH'='/media/trimarr_test' -e 'TRIMARR_SCHEDULE'='' -e 'TRIMARR_EDIT_METADATA_TITLE'='no' -e 'TRIMARR_DELETE_METADATA_TITLE'='no' -e 'TRIMARR_KEEP_SUBTITLES'='no' -e 'TRIMARR_KEEP_AUDIO'='no' -e 'TRIMARR_NO_BACKUP'='no' -e 'TRIMARR_DRY_RUN'='no' -e 'TRIMARR_STRIP_LOWER_CHANNELS'='yes' -e 'TRIMARR_STRIP_COMMENTARY'='yes' -e 'TRIMARR_STRIP_SUBTITLE_REGEX'='' -e 'TRIMARR_RUN_ON_START'='no' -e 'ENABLE_STARTUP_SCRIPTS'='no' -e 'TRIMARR_KEEP_NATIVE_AUDIO'='yes' -e 'TRIMARR_TMDB_API_KEY'='<redacted>' -e 'TRIMARR_LOG_LEVEL'='INFO' -e 'TRIMARR_DATABASE_PATH'='/config/trimarr/db/trimarr.db' -e 'TRIMARR_LOG_PATH'='/config/trimarr/logs/trimarr.log' -e 'TRIMARR_MKVMERGE_PATH'='' -e 'TRIMARR_PRE_PROCESS'='' -e 'TRIMARR_POST_PROCESS'='' -e 'TRIMARR_COMMAND_TIMEOUT_MINS'='5' -e 'TRIMARR_NO_UPDATE_CHECK'='no' -e 'TRIMARR_SKIP_SIZE_CHECK'='no' -e 'ENABLE_HEALTHCHECK'='yes' -e 'HEALTHCHECK_COMMAND'='' -e 'HEALTHCHECK_ACTION'='' -e 'HEALTHCHECK_HOSTNAME'='google.com' -e 'PUID'='99' -e 'PGID'='100' -e 'UMASK'='000' -l net.unraid.docker.managed=dockerman -l net.unraid.docker.icon='https://raw.githubusercontent.com/binhex/templates/main/unraid/binhex/images/trimarr-icon.png' -v '/mnt/cache/appdata/binhex-trimarr':'/config':'rw' -v '/mnt/user/Media/':'/media':'rw' --restart=unless-stopped 'ghcr.io/binhex/arch-trimarr' a56b293673bce3afe798a50d8c9008931214e734cf9bd05923d8a1d5c33b33dd The command finished successfully!
May 27May 27 Author 17 minutes ago, Jorgen said:I assume the audio-tracks and subtitle-tracks indexes are the items to keep after processing?correct.1 minute ago, Jorgen said:Done — processed: 0, no change needed: 0, skipped (already done): 21, failed: 0.that looks like a dry run bug, in dry run mode it shoul not write to the database, but it looks like its marked them as done in the database even though you were running in dry run mode, the quick reoslution for now until i get the fix in is simply to delete the database, then re-run and it will re-scan your media, or wait for the fix, the choice is yours.
May 27May 27 ok thanks! I'll probably wait for the fix.Separate question, looking through the sqlite db for native_language I see quite a few no match from any source or no match from IMDbPie or TMDb (tried filename and directory name).Is the script only trying to match for filename and directory name, or are there other things it's trying as well?Would you consider parsing .nfo files stored in the same directory as the file for common things like: <uniqueid type="tmdb" default="true">527766</uniqueid> <uniqueid type="imdb">tt9472442</uniqueid> <title>Bamse and the Thunderbell</title> <originaltitle>Bamse och dunderklockan</originaltitle> <sorttitle>bamse and the thunderbell</sorttitle>
May 27May 27 Author 1 minute ago, Jorgen said:Is the script only trying to match for filename and directory name, or are there other things it's trying as well?its reasonable thorough, trimarr looks at your filename and then performs a search against imdb to try and identify the language, if that returns none, then it tries to use the directory name to perform the seatch against imdb, if that fails then it does the same again but for tmdb. so there are 4 attempts at trying to work out the native language.3 minutes ago, Jorgen said:Would you consider parsing .nfo files stored in the same directory as the file for common things like:sure, thats a possibility, i would probably have that as the first item to check, if .nfo then read, if no result then go onto imdb and tmdb searching, sound ok?, i would need to know the format of the .nfo though are you following a certain format here?, plex/kodi/jellyfin?
May 27May 27 14 minutes ago, binhex said:sure, thats a possibility, i would probably have that as the first item to check, if .nfo then read, if no result then go onto imdb and tmdb searching, sound ok?, i would need to know the format of the .nfo though are you following a certain format here?, plex/kodi/jellyfin?It appears I have both Radarr/Sonarr set up to save nfo files for kodi, AND I also have Jellyfin save metadata as nfo (no options for output formatthere). Not sure which one is winning out, probably Jellyfin. I should fix this...After some research, it appears they all follow roughly the same standard, established by Kodi in the first place. Especially for basic things like movie/show identificationLooks like they should all contain at least the fields below in the same format. I looked at the script code and <title> + <year> should slot in pretty seamlessly? But I think using <uniqueid type="imdb"> or <uniqueid type="tmdb"> would be more precise?<movie> <title>The Dark Knight</title> <originaltitle>The Dark Knight</originaltitle> <year>2008</year> <imdbid>tt0468569</imdbid> <tmdbid>155</tmdbid> <uniqueid type="imdb" default="true">tt0468569</uniqueid> <uniqueid type="tmdb">155</uniqueid> <plot>...</plot> <runtime>152</runtime> <genre>Action</genre> <genre>Crime</genre> <studio>Warner Bros.</studio> </movie><tvshow> <title>Breaking Bad</title> <year>2008</year> <imdbid>tt0903747</imdbid> <tmdbid>1396</tmdbid> <uniqueid type="imdb" default="true">tt0903747</uniqueid> <uniqueid type="tmdb">1396</uniqueid> <uniqueid type="tvdb">81189</uniqueid> <plot>...</plot> <genre>Drama</genre> </tvshow>
May 27May 27 You could also consider reading the filename for an imdb or tmdb ID for a match. TRaSH guides recommend this and I expect lots of people rely on TRaSH's suggestions. Typically in this format:{tmdb-345691}Regardless, this tool is phenomenal! Super simple and does exactly what I'd been wanting to do for library cleanup for a while. Thank you! Edited May 27May 27 by mudsloth
May 27May 27 Author 4 hours ago, Jorgen said:Would you consider parsing .nfo files stored in the same directory as the file for common things like:this is now done along with the fix for dry run mode, but even with the fix for dry run in place oyu will need to still delete your sqlite db for trimarr, then re-run either with dry run enabled or not, the choice is yours.
May 27May 27 Author Just now, mudsloth said:You could also consider reading the filename for an imdb or tmdb ID for a match.this is a good suggestion, i will consider adding that in, glad your liking the tool.Edit - Done.
May 27May 27 Author 1 hour ago, mudsloth said:You could also consider reading the filename for an imdb or tmdb ID for a match. TRaSH guides recommend this and I expect lots of people rely on TRaSH's suggestions. Typically in this format:{tmdb-345691}tis done, please pull down latest to pick up the change.FYI - This is now the flow for identifying the movie/tv name and year and thus the native language: https://github.com/binhex/trimarr#native-language-resolution-flow
May 28May 28 My testing continues, and I need more help!File permissions on the remuxed files are not correct for me, have I missed something in the docker setup?Edit, relevant variables from docker run command: -e 'PUID'='99' -e 'PGID'='100' -e 'UMASK'='000' Edited May 28May 28 by Jorgen
May 28May 28 @binhex I've created an issue in Github for the file permission issue: https://github.com/binhex/trimarr/issues/56
May 28May 28 Author 7 hours ago, Jorgen said:File permissions on the remuxed files are not correct for me, have I missed something in the docker setup?resolved in v1.2.4, please force update at your convienience.
May 28May 28 11 hours ago, binhex said:resolved in v1.2.4, please force update at your convienience.Successfully tested, permission issue resolved, thanks for the quick turnaround!Now running with backup file disabled across my full TV Show directory. Will report back if I come across anything else but looking very solid right now.Thanks again for making this avialbe, it's very useful!
May 29May 29 TV directory processing finished, just sharing stats in case anyone is interested:Found 2015 mkv files to processProcessed: 930, no change needed: 1085, skipped (already done): 0, failed: 0.Space saved this session: 43.92 GB (930 file(s) remuxed).Total elapsed time 16 hours
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.