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

is there a way to keep both audio/subtitle track of same language? #48

Closed
rmnavz opened this issue Jun 9, 2023 · 4 comments
Closed
Assignees
Labels
question Further information is requested

Comments

@rmnavz
Copy link

rmnavz commented Jun 9, 2023

I'm currently having issue with a series on sonarr that have actual audio (audio track 1) and commentary (audio track 2). I'm wondering if there is a way to keep both.

I'm running this custom wrapper as I wanted it to run on every series I have in sonarr that have american, chinese, japanese, anime and more. so I used keep original audio.

#!/bin/bash

. /usr/local/bin/striptracks.sh --audio :org --subs :eng:und

this is the logs for specific issue that it's keeping only the commentary audio and original audio subtitle.

2023-6-9 14:38:16.5|[1563]Info|Sonarr event: Download, Video: /anime/Monogatari (2009)/Season 01/Monogatari (2009) - S01E01 - 001 - Hitagi Crab Part 1 [HDTV-1080p v2][10bit][x264][AAC 2.0][JA]-MTBB.mkv, Size: 881.124M, AudioKeep: , SubsKeep: :eng:und
2023-6-9 14:38:17.3|[1563]Info|Original tracks: 6 (audio: 2, subtitles: 3)
2023-6-9 14:38:17.3|[1563]Info|Chapters: 5
2023-6-9 14:38:17.3|[1563]Info|Keeping last audio track 2: jpn (AAC)
2023-6-9 14:38:17.3|[1563]Info|Keeping subtitles track 3: eng (SubStationAlpha)
2023-6-9 14:38:17.3|[1563]Info|Keeping subtitles track 5: eng (SubStationAlpha)
2023-6-9 14:38:17.3|[1563]Info|Removed audio tracks: 1: jpn (AAC)
2023-6-9 14:38:17.3|[1563]Info|Removed subtitles tracks: 4: enm (SubStationAlpha)
2023-6-9 14:38:17.3|[1563]Info|Kept tracks: 4 (audio: 1, subtitles: 2)
2023-6-9 14:38:41.0|[1563]Info|New size: 832.225M
2023-6-9 14:38:41.1|[1563]Info|Calling Sonarr API to rescan series, try #1
2023-6-9 14:38:43.9|[1563]Info|Completed in 0m 28s

Note: for now I imported this specific season by disabling striptracks as I wanted all that it have mostly. but if I plan to import more BD disks that have commentary in them,

I checked also on using tags but might be an issue as I mostly pull from lists like trakt and anilist. and language might vary. and checking them 1 by 1 would be an issue as family member also uses lists, and only have access to adding shows to lists.

@TheCaptain989
Copy link
Owner

TheCaptain989 commented Jun 9, 2023

You've just encountered a limitation of Sonarr. Specifying :org is only supported on Radarr (the last time I checked Sonarr it didn't have that capability.) I do document this in my README.

I'll check again, though.

What's happening is that you're effectively selecting no audio tracks. This is evidenced by the AudioKeep: , text on the first log entry and Keeping last audio track on the fourth log entry. However, I do think my script could handle this situation better. Let me think on that.

For your purposes, please discontinue the use of :org in Sonarr. Either create a Language Profile with the specific language(s) you want to keep, or use a wrapper with all possible languages. Something like:

#!/bin/bash

. /usr/local/bin/striptracks.sh --audio :ara:bul:zho:chi:ces:cze:dan:nld:dut:eng:fin:fra:fre:deu:ger:ell:gre:heb:hin:hun:isl:ice:ita:jpn:kor:lit:nor:pol:por:ron:rom:rus:spa:swe:tha:tur:vie:und --subs :eng:und

Inelegant, but I don't have a better way right now. (See issue #42 for some additional background.)

@TheCaptain989 TheCaptain989 self-assigned this Jun 9, 2023
@TheCaptain989 TheCaptain989 added the question Further information is requested label Jun 9, 2023
@TheCaptain989
Copy link
Owner

I've just pushed a new version that adds more warning messages, and will not exit if the code evaluates to selecting no audio languages.

TheCaptain989 added a commit to TheCaptain989/docker-mods that referenced this issue Jun 10, 2023
## What's changed
- Adds additional documentation, warnings, and modifies logic of `:org` code, with special warnings for [use in Sonarr](./README.md#original-language-code "(e.g., it doesn't work)")
  Resolves TheCaptain989/radarr-striptracks#48
- Fixed missing Romanian language selection when using 'Any' in Radarr profile
- Added language code support for: Bosnian, Bengali, Malayalam, Ukrainian, Catalan, Croatian, Estonian, Indonesian, Latvian, Serbian, Slovak, Tamil, Telugu, and Persian
@rmnavz
Copy link
Author

rmnavz commented Jun 10, 2023

Hi @TheCaptain989, thank you for quickly responding and attending to this appreciate it big time.

Will try to create a separate wrapper for sonarr without using org tag language.

btw if I use jpn (or any specific languages) tag for audio will it keep both audio for main audio track and commentary track?
image

or does it only keep 1 of the specified languages?

@TheCaptain989
Copy link
Owner

No problem.

It will keep all tracks that match the language(s) you specify. In your example, if you specify --audio :jpn both tracks would be kept.

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

No branches or pull requests

2 participants